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

Commit 9ba8d36a authored by Jackal Guo's avatar Jackal Guo
Browse files

Fix NPE in queryPermissionsByGroup

It's possible that the given groupName is null. We should handle this
normal case.

Fix: 232566949
Test: manually verify with 'pm list permissions'.
Change-Id: I267fa62d2d46818c5a41363ebdafb66d59309c25
parent f2506ea5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -593,8 +593,8 @@ public class PermissionManagerServiceImpl implements PermissionManagerServiceInt
        }

        final int callingUserId = UserHandle.getUserId(callingUid);
        if (mPackageManagerInt.filterAppAccess(permissionGroup.getPackageName(), callingUid,
                callingUserId)) {
        if (permissionGroup != null && mPackageManagerInt.filterAppAccess(
                permissionGroup.getPackageName(), callingUid, callingUserId)) {
            return null;
        }
        out.removeIf(it -> mPackageManagerInt.filterAppAccess(it.packageName, callingUid,