Clear calling identity when determining instant app status.
This requires INTERACT_ACROSS_USERS_FULL, which the current caller (MediaProvider) lacks. Bug: 199988018 Test: inspect logs Change-Id: I4ef3494315b996473a0fb14b967ddaf62b5d7aa6
This commit is contained in:
@@ -4366,8 +4366,13 @@ class StorageManagerService extends IStorageManager.Stub
|
||||
packageName = packagesForUid[0];
|
||||
}
|
||||
|
||||
if (mPmInternal.isInstantApp(packageName, UserHandle.getUserId(uid))) {
|
||||
return StorageManager.MOUNT_MODE_EXTERNAL_NONE;
|
||||
final long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
if (mPmInternal.isInstantApp(packageName, UserHandle.getUserId(uid))) {
|
||||
return StorageManager.MOUNT_MODE_EXTERNAL_NONE;
|
||||
}
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
|
||||
if (mStorageManagerInternal.isExternalStorageService(uid)) {
|
||||
|
||||
Reference in New Issue
Block a user