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

Commit a427d626 authored by Thomas Vannet's avatar Thomas Vannet
Browse files

Do not leak whether package exists in revokeOwnPermissionsOnKill

Previously, a direct call to the PermissionManagerService API would
reveal if the target package uid is -1 (package not installed) or >0

Bug: 219739967
Test: None, this is a string update
Change-Id: Ifbe5a30330d5569ed301d23d88989bb3a094bb97
Merged-In: Ifbe5a30330d5569ed301d23d88989bb3a094bb97
parent 521df749
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1604,8 +1604,7 @@ public class PermissionManagerServiceImpl implements PermissionManagerServiceInt
        int targetPackageUid = mPackageManagerInt.getPackageUid(packageName, 0, callingUserId);
        if (targetPackageUid != callingUid) {
            throw new SecurityException("uid " + callingUid
                    + " cannot revoke permissions for package " + packageName + " with uid "
                    + targetPackageUid);
                    + " cannot revoke permissions for package " + packageName);
        }
        for (String permName : permissions) {
            if (!checkCallingOrSelfPermission(permName)) {