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

Commit f443384d authored by Svet Ganov's avatar Svet Ganov
Browse files

Handle renamed packages during default grants

If an L device has a privileged app on the system image which was
updated and an M OTA renames the app package (supported only for
privileged apps) we end up with a disabled system package setting
with no package information. Since we are not doing a null check
of the package we get from the disabled package settings during
default grants we crash leaving the system in a bad state.

bug:25687380

Change-Id: I4f2ebcaf471e4bd1696298eab4716b50c52ca5c4
parent 5603eca3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -848,7 +848,7 @@ final class DefaultPermissionGrantPolicy {
            return false;
        }
        PackageSetting sysPkg = mService.mSettings.getDisabledSystemPkgLPr(pkg.packageName);
        if (sysPkg != null) {
        if (sysPkg != null && sysPkg.pkg != null) {
            if ((sysPkg.pkg.applicationInfo.flags & ApplicationInfo.FLAG_PERSISTENT) == 0) {
                return false;
            }