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

Commit 798bf9a3 authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

Check if bp.perm is null before resolving it

Test: Built
Change-Id: I757a28cb6d403267914f5c63f9b4e2cf0cdb079e
parent 12d0ee09
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -2122,7 +2122,8 @@ public class PermissionManagerService {
                // Only system declares background permissions, hence mapping does never change.
                // Only system declares background permissions, hence mapping does never change.
                mBackgroundPermissions = new ArrayMap<>();
                mBackgroundPermissions = new ArrayMap<>();
                for (BasePermission bp : mSettings.getAllPermissionsLocked()) {
                for (BasePermission bp : mSettings.getAllPermissionsLocked()) {
                    if (bp.perm.info != null && bp.perm.info.backgroundPermission != null) {
                    if (bp.perm != null && bp.perm.info != null
                            && bp.perm.info.backgroundPermission != null) {
                        String fgPerm = bp.name;
                        String fgPerm = bp.name;
                        String bgPerm = bp.perm.info.backgroundPermission;
                        String bgPerm = bp.perm.info.backgroundPermission;