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

Commit 55100571 authored by Amith Yamasani's avatar Amith Yamasani
Browse files

DO NOT MERGE : Revert "DO NOT MERGE. No direct Uri grants from system."

Reason: Breaking setting the user avatar in Settings.
Bug: 35158271
This reverts commit b61338ec.

Change-Id: Ia08c12be3da06b0d02e71635b46350c8ff50ec19
parent b61338ec
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -8150,12 +8150,7 @@ public final class ActivityManagerService extends ActivityManagerNative
        // Third...  does the caller itself have permission to access
        // this uri?
        final int callingAppId = UserHandle.getAppId(callingUid);
        if ((callingAppId == Process.SYSTEM_UID) || (callingAppId == Process.ROOT_UID)) {
            Slog.w(TAG, "For security reasons, the system cannot issue a Uri permission"
                    + " grant to " + grantUri + "; use startActivityAsCaller() instead");
            return -1;
        } else {
        if (UserHandle.getAppId(callingUid) != Process.SYSTEM_UID) {
            if (!checkHoldingPermissionsLocked(pm, pi, grantUri, callingUid, modeFlags)) {
                // Require they hold a strong enough Uri permission
                if (!checkUriPermissionLocked(grantUri, callingUid, modeFlags)) {