diff options
| author | 2017-02-14 01:09:39 +0000 | |
|---|---|---|
| committer | 2017-02-14 01:09:39 +0000 | |
| commit | 05d24ccdb5a0dc5dca9feb248f74ebb649e2d34f (patch) | |
| tree | 60248c4e1078551948901c1b683450370a2f1356 | |
| parent | a0dff34532f2b5bf3c95b5b7561964649aa4c7a2 (diff) | |
| parent | ee37330dff5da75a874a0e12a818332bba5d697c (diff) | |
Merge "DO NOT MERGE : Revert "DO NOT MERGE. No direct Uri grants from system."" into nyc-mr1-dev am: 7556690cf5 am: c510e19d18
am: ee37330dff
Change-Id: I9f75a9309a91de3a6145861189534c8ab10ca6f3
| -rw-r--r-- | services/core/java/com/android/server/am/ActivityManagerService.java | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 7748c2b94962..064ee4cd6efb 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -8212,12 +8212,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)) { |