summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jeff Sharkey <jsharkey@android.com> 2014-09-30 21:10:47 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2014-09-30 21:10:49 +0000
commitb27d43a8805769f9a9dfdc024b5cd19b71cfd8d7 (patch)
treee6fa053fec8ae280e78fe5597ee8971af789779e
parent9cf01b63cb0023aec0e05b1ce050ff572532b876 (diff)
parentc0322ecda54d9c2db12e861f4d36ef50595b9740 (diff)
Merge "Clear ident when obtaining provider across users." into lmp-dev
-rwxr-xr-xservices/core/java/com/android/server/am/ActivityManagerService.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 12c98c17166c..c7eb54665c3b 100755
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -9349,6 +9349,7 @@ public final class ActivityManagerService extends ActivityManagerNative
checkTime(startTime, "getContentProviderImpl: after getProviderByClass");
final boolean firstClass = cpr == null;
if (firstClass) {
+ final long ident = Binder.clearCallingIdentity();
try {
checkTime(startTime, "getContentProviderImpl: before getApplicationInfo");
ApplicationInfo ai =
@@ -9366,6 +9367,8 @@ public final class ActivityManagerService extends ActivityManagerNative
cpr = new ContentProviderRecord(this, cpi, ai, comp, singleton);
} catch (RemoteException ex) {
// pm is in same process, this will never happen.
+ } finally {
+ Binder.restoreCallingIdentity(ident);
}
}