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

Commit a0c99623 authored by Christopher Tate's avatar Christopher Tate Committed by Android (Google) Code Review
Browse files

Merge "Don't crash in addPackageHoldingPermissions()..." into lmp-dev

parents c378b3e0 30f349d2
Loading
Loading
Loading
Loading
+15 −11
Original line number Diff line number Diff line
@@ -3783,6 +3783,9 @@ public class PackageManagerService extends IPackageManager.Stub {
        } else {
            pi = generatePackageInfoFromSettingsLPw(ps.name, flags, userId);
        }
        // The above might return null in cases of uninstalled apps or install-state
        // skew across users/profiles.
        if (pi != null) {
            if ((flags&PackageManager.GET_PERMISSIONS) == 0) {
                if (numMatch == permissions.length) {
                    pi.requestedPermissions = permissions;
@@ -3799,6 +3802,7 @@ public class PackageManagerService extends IPackageManager.Stub {
            }
            list.add(pi);
        }
    }
    @Override
    public ParceledListSlice<PackageInfo> getPackagesHoldingPermissions(