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

Commit 67dbaa8a authored by Amith Yamasani's avatar Amith Yamasani Committed by android-build-merger
Browse files

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

Merge "DO NOT MERGE : Revert "DO NOT MERGE. No direct Uri grants from system."" into nyc-mr1-dev am: 7556690c
am: c510e19d

Change-Id: I532b675a10ae9e21f28f3aa38d0f2e85ac080faa
parents a26e371c c510e19d
Loading
Loading
Loading
Loading
+1 −6
Original line number Original line Diff line number Diff line
@@ -8204,12 +8204,7 @@ public final class ActivityManagerService extends ActivityManagerNative
        // Third...  does the caller itself have permission to access
        // Third...  does the caller itself have permission to access
        // this uri?
        // this uri?
        final int callingAppId = UserHandle.getAppId(callingUid);
        if (UserHandle.getAppId(callingUid) != Process.SYSTEM_UID) {
        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 (!checkHoldingPermissionsLocked(pm, pi, grantUri, callingUid, modeFlags)) {
            if (!checkHoldingPermissionsLocked(pm, pi, grantUri, callingUid, modeFlags)) {
                // Require they hold a strong enough Uri permission
                // Require they hold a strong enough Uri permission
                if (!checkUriPermissionLocked(grantUri, callingUid, modeFlags)) {
                if (!checkUriPermissionLocked(grantUri, callingUid, modeFlags)) {