From 214b6b9ef91320cd7b2eab592fbe0eec1614f3cb Mon Sep 17 00:00:00 2001 From: Bryan Mawhinney Date: Wed, 7 Oct 2009 13:02:35 +0100 Subject: Only dismiss search dialog after launching intent. This fixes an NPE that occurs when launching the intent tries to access state cleared by onStop. Bug: 2171752 Change-Id: I29232f2a44d8dfa27b2c79933093c0c8983b2e92 --- core/java/android/app/SearchDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java index 933c2fc..697ac76 100644 --- a/core/java/android/app/SearchDialog.java +++ b/core/java/android/app/SearchDialog.java @@ -1314,13 +1314,13 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS // source. this is because GlobalSearch may not have permission to launch the // intent, and to avoid the extra step of going through GlobalSearch. if (mGlobalSearchMode) { + launchGlobalSearchIntent(intent); if (mStoredComponentName != null) { // If we're embedded in an application, dismiss the dialog. // This ensures that if the intent is handled by the current // activity, it's not obscured by the dialog. dismiss(); } - launchGlobalSearchIntent(intent); } else { // If the intent was created from a suggestion, it will always have an explicit // component here. -- cgit v1.1