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

Commit 8b6d5b6b authored by Svetoslav's avatar Svetoslav Committed by Android (Google) Code Review
Browse files

Merge "Clear binder id when determining external storage state" into mnc-dev

parents 66cc6bb6 38c3dbb2
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -2602,8 +2602,15 @@ class MountService extends IMountService.Stub
        boolean foundPrimary = false;

        final int userId = UserHandle.getUserId(uid);
        final boolean reportUnmounted = !mMountServiceInternal.hasExternalStorage(
        final boolean reportUnmounted;

        final long identity = Binder.clearCallingIdentity();
        try {
            reportUnmounted = !mMountServiceInternal.hasExternalStorage(
                    uid, packageName);
        } finally {
            Binder.restoreCallingIdentity(identity);
        }

        synchronized (mLock) {
            for (int i = 0; i < mVolumes.size(); i++) {