Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c01c22c authored by Martijn Coenen's avatar Martijn Coenen
Browse files

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
parent 12876ad8
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -4366,9 +4366,14 @@ class StorageManagerService extends IStorageManager.Stub
                packageName = packagesForUid[0];
            }

            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)) {
                // Determine if caller requires pass_through mount; note that we do this for