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

Commit da3412f3 authored by Kun Liang's avatar Kun Liang
Browse files

AppOps: allow MEDIA_RW uid to start activity

Sdcard daemon, which is running with MEDIA_RW uid, need start activity
to show dialog to users when apps try to access protected files.

Change-Id: Iac1efb862e9579d3f59786c57cf18fe6518ce87b
parent 39ff7200
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -14824,7 +14824,9 @@ public final class ActivityManagerService extends ActivityManagerNative
        // we will switch to the calling user if access to the current user fails.
        int targetUserId = unsafeConvertIncomingUser(userId);
        if (callingUid != 0 && callingUid != Process.SYSTEM_UID) {
        // There is no definition like MEDIA_RW_UID, so use MEDIA_RW_GID instead.
        if (callingUid != 0 && callingUid != Process.SYSTEM_UID
                && callingUid != Process.MEDIA_RW_GID) {
            final boolean allow;
            if (checkComponentPermission(INTERACT_ACROSS_USERS_FULL, callingPid,
                    callingUid, -1, true) == PackageManager.PERMISSION_GRANTED) {