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

Commit da576e8c authored by Bjorn Bringert's avatar Bjorn Bringert Committed by Android (Google) Code Review
Browse files

Merge "Don't start global search from system dialogs"

parents 53332883 b8144a9c
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -822,13 +822,15 @@ public class Dialog implements DialogInterface, Window.Callback,
        final SearchManager searchManager = (SearchManager) mContext
                .getSystemService(Context.SEARCH_SERVICE);

        // associate search with owner activity if possible (otherwise it will default to
        // global search).
        // associate search with owner activity
        final ComponentName appName = getAssociatedActivity();
        final boolean globalSearch = (appName == null);
        searchManager.startSearch(null, false, appName, null, globalSearch);
        if (appName != null) {
            searchManager.startSearch(null, false, appName, null, false);
            dismiss();
            return true;
        } else {
            return false;
        }
    }

    /**
+1 −0
Original line number Diff line number Diff line
@@ -1639,6 +1639,7 @@ public class SearchManager
            return;
        }
        Intent intent = new Intent(INTENT_ACTION_GLOBAL_SEARCH);
        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        intent.setComponent(globalSearchActivity);
        // TODO: Always pass name of calling package as an extra?
        if (appSearchData != null) {