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

Commit 7d2449a8 authored by Andy Mast's avatar Andy Mast Committed by Steve Kondik
Browse files

Fix PackageManager crashes w/ queryIntent using callerUID of 0

This will fix MonkeyRunner

Change-Id: I7b455607539bb9eab51f19b114e8047731bc0eca
parent 371ef19c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -9292,7 +9292,8 @@ public class PackageManagerService extends IPackageManager.Stub {
                    (flags & PackageManager.MATCH_DEFAULT_ONLY) != 0, userId);
            // Remove protected Application components
            int callingUid = Binder.getCallingUid();
            List<String> packages = Arrays.asList(getPackagesForUid(callingUid));
            String[] pkgs = getPackagesForUid(callingUid);
            List<String> packages = (pkgs != null) ? Arrays.asList(pkgs) : Collections.EMPTY_LIST;
            if (callingUid != Process.SYSTEM_UID &&
                    (getFlagsForUid(callingUid) & ApplicationInfo.FLAG_SYSTEM) == 0) {
               Iterator<ResolveInfo> itr = list.iterator();