Merge "Prevent some key system applications from losing storage permissions" into main
This commit is contained in:
@@ -2116,6 +2116,12 @@ public class PermissionManagerServiceImpl implements PermissionManagerServiceInt
|
|||||||
if (!isStorageOrMedia) {
|
if (!isStorageOrMedia) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
boolean isSystemOrPolicyFixed = (getPermissionFlags(newPackage.getPackageName(),
|
||||||
|
permInfo.name, userId) & (FLAG_PERMISSION_SYSTEM_FIXED
|
||||||
|
| FLAG_PERMISSION_POLICY_FIXED)) != 0;
|
||||||
|
if (isSystemOrPolicyFixed) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
EventLog.writeEvent(0x534e4554, "171430330", newPackage.getUid(),
|
EventLog.writeEvent(0x534e4554, "171430330", newPackage.getUid(),
|
||||||
"Revoking permission " + permInfo.name + " from package "
|
"Revoking permission " + permInfo.name + " from package "
|
||||||
|
|||||||
Reference in New Issue
Block a user