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

Commit 7e79d354 authored by Todd Kennedy's avatar Todd Kennedy
Browse files

Handle renamed packages during default grants

If a device has a privileged app on the system image which was
updated and a future 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.

Test: Manual
Change-Id: Id7255c92a4a52e368266739cd331977256eee2d3
Fixes: 62376260
parent 4972aa30
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -936,7 +936,7 @@ final class DefaultPermissionGrantPolicy {
        // permissions if the version on the system image does not declare them.
        if (!isDefaultPhoneOrSms && pkg.isUpdatedSystemApp()) {
            PackageSetting sysPs = mService.mSettings.getDisabledSystemPkgLPr(pkg.packageName);
            if (sysPs != null) {
            if (sysPs != null && sysPs.pkg != null) {
                if (sysPs.pkg.requestedPermissions.isEmpty()) {
                    return;
                }