Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 214b6b9e authored by Bryan Mawhinney's avatar Bryan Mawhinney
Browse files

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
parent 4625758d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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.