Merge "Clear calling identity when determining instant app status."

This commit is contained in:
Martijn Coenen
2021-09-28 07:06:27 +00:00
committed by Android (Google) Code Review

View File

@@ -4369,8 +4369,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)) {