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

Commit 5e4a01c4 authored by Nate Myren's avatar Nate Myren Committed by Automerger Merge Worker
Browse files

Merge "Prevent some key system applications from losing storage permissions"...

Merge "Prevent some key system applications from losing storage permissions" into main am: 969a52a6

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2673055



Change-Id: I78b4887496e31d871faad0181949d4878af6225e
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 253d9336 969a52a6
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -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 "