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

Commit 8e7d8fac authored by Adnan Begovic's avatar Adnan Begovic Committed by Gerrit Code Review
Browse files

pm: Don't call into AppSuggestManager before service available.

TICKET: CYNGNOS-2319
Change-Id: I08687e91ad69260379a336a1f50ca99c6156805c
parent 92f5b2e3
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -4712,9 +4712,14 @@ public class PackageManagerService extends IPackageManager.Stub {
    }
    private boolean shouldIncludeResolveActivity(Intent intent) {
        // Don't call into AppSuggestManager before it comes up later in the SystemServer init!
        if (!mSystemReady) {
            return false;
        }
        synchronized(mPackages) {
            AppSuggestManager suggest = AppSuggestManager.getInstance(mContext);
            return mResolverReplaced && (suggest != null) ? suggest.handles(intent) : false;
            return mResolverReplaced && (suggest.getService() != null) ?
                    suggest.handles(intent) : false;
        }
    }