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

Unverified Commit b03d54af authored by Steve Kondik's avatar Steve Kondik Committed by Michael Bestas
Browse files

pm: Fix NPE

 * We should check for null before passing into Arrays.asList.

Change-Id: I5c42e2340355dd449319e6dc09f5701e1b1ed239
parent 373a1cb2
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -10581,7 +10581,8 @@ public class PackageManagerService extends IPackageManager.Stub {
            // Remove protected Application components if they're explicitly queried for.
            // Implicit intent queries will be gated when the returned component is acted upon.
            int callingUid = Binder.getCallingUid();
            List<String> packages = Arrays.asList(getPackagesForUid(callingUid));
            String[] pkgArray = getPackagesForUid(callingUid);
            List<String> packages = pkgArray == null ? null : Arrays.asList(pkgArray);
            final boolean isNotSystem = callingUid != Process.SYSTEM_UID &&
                    (getFlagsForUid(callingUid) & ApplicationInfo.FLAG_SYSTEM) == 0;