Skip to content

Commit b27d43a

Browse files
jsharkeyAndroid (Google) Code Review
authored andcommitted
Merge "Clear ident when obtaining provider across users." into lmp-dev
2 parents 9cf01b6 + c0322ec commit b27d43a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

services/core/java/com/android/server/am/ActivityManagerService.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9349,6 +9349,7 @@ && isValidSingletonCall(r.uid, cpi.applicationInfo.uid)) {
93499349
checkTime(startTime, "getContentProviderImpl: after getProviderByClass");
93509350
final boolean firstClass = cpr == null;
93519351
if (firstClass) {
9352+
final long ident = Binder.clearCallingIdentity();
93529353
try {
93539354
checkTime(startTime, "getContentProviderImpl: before getApplicationInfo");
93549355
ApplicationInfo ai =
@@ -9366,6 +9367,8 @@ && isValidSingletonCall(r.uid, cpi.applicationInfo.uid)) {
93669367
cpr = new ContentProviderRecord(this, cpi, ai, comp, singleton);
93679368
} catch (RemoteException ex) {
93689369
// pm is in same process, this will never happen.
9370+
} finally {
9371+
Binder.restoreCallingIdentity(ident);
93699372
}
93709373
}
93719374

0 commit comments

Comments
 (0)