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

Commit 8d103afa authored by Steven Wu's avatar Steven Wu Committed by android-build-merger
Browse files

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

am: d0545395

Change-Id: I5411ba9cacf0fa4f9308f83d00677a23a95155da
parents b0a4b71b d0545395
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);