summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2017-02-14 00:49:41 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-02-14 00:49:44 +0000
commit7556690cf50ef3fdad266571e088a45618f90c1b (patch)
tree6fcf789c408ed5156b50921d457e2b4351a6aedf
parent55ef8ba763ce33e48cb6d75794198887b1e5547f (diff)
parent55100571da7f6d142c39d6baed85cbd4c153e5ad (diff)
downloadbase-7556690cf50ef3fdad266571e088a45618f90c1b.tar.gz
Merge "DO NOT MERGE : Revert "DO NOT MERGE. No direct Uri grants from system."" into nyc-mr1-dev
-rw-r--r--services/core/java/com/android/server/am/ActivityManagerService.java7
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 da34a92c087b..7b21822093fa 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -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)) {