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

Commit d0545395 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fixes a NPE in search manager in slice CTS tests." into pi-dev

parents 8997b7e4 3aa2cf75
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -156,9 +156,12 @@ public class AssistUtils {
        if (activeServiceSupportsAssistGesture()) {
            return getActiveServiceComponentName();
        }

        Intent intent = ((SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE))
                .getAssistIntent(false);
        final SearchManager searchManager =
            (SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE);
        if (searchManager == null) {
            return null;
        }
        final Intent intent = searchManager.getAssistIntent(false);
        PackageManager pm = mContext.getPackageManager();
        ResolveInfo info = pm.resolveActivityAsUser(intent, PackageManager.MATCH_DEFAULT_ONLY,
                userId);