Fix issue #7175553: GRANT_URI_PERMISSION doesn't apper to work on secondary user
Change-Id: I0ab372978f8599d0fe8d5da8aeb73965ab85797f
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index b8072b3..989477f 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -5036,7 +5036,6 @@
pid = tlsIdentity.pid;
}
- uid = UserHandle.getAppId(uid);
// Our own process gets to do everything.
if (pid == MY_PID) {
return PackageManager.PERMISSION_GRANTED;
@@ -5088,7 +5087,8 @@
} else {
try {
pi = pm.resolveContentProvider(name,
- PackageManager.GET_URI_PERMISSION_PATTERNS, UserHandle.getUserId(callingUid));
+ PackageManager.GET_URI_PERMISSION_PATTERNS,
+ UserHandle.getUserId(callingUid));
} catch (RemoteException ex) {
}
}