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

Commit 160761ec authored by android-build-team Robot's avatar android-build-team Robot Committed by android-build-merger
Browse files

Merge "Fixes a NPE in search manager in CTS tests." into pi-dev am: 188b642a

am: 9ec1c3fe

Change-Id: I7f5a0deb21e89d8b9f66af4cd88e63056edb1373
parents 0a6dc035 9ec1c3fe
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -207,8 +207,12 @@ public class AssistManager implements ConfigurationChangedReceiver {
        boolean structureEnabled = Settings.Secure.getIntForUser(mContext.getContentResolver(),
                Settings.Secure.ASSIST_STRUCTURE_ENABLED, 1, UserHandle.USER_CURRENT) != 0;

        final Intent intent = ((SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE))
                .getAssistIntent(structureEnabled);
        final SearchManager searchManager =
            (SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE);
        if (searchManager == null) {
            return;
        }
        final Intent intent = searchManager.getAssistIntent(structureEnabled);
        if (intent == null) {
            return;
        }