Merge "Fix side channel disclosure via add or remove permission api"

This commit is contained in:
Rhed Jao
2021-08-24 02:36:56 +00:00
committed by Android (Google) Code Review

View File

@@ -497,13 +497,10 @@ public final class Permission {
if (permissionTree.getUid() == UserHandle.getAppId(callingUid)) {
return permissionTree;
}
throw new SecurityException("Calling uid " + callingUid
+ " is not allowed to add to permission tree "
+ permissionTree.getName() + " owned by uid "
+ permissionTree.getUid());
}
}
throw new SecurityException("No permission tree found for " + permissionName);
throw new SecurityException("Calling uid " + callingUid
+ " is not allowed to add to or remove from the permission tree");
}
@Nullable