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

Commit 3d488106 authored by San Mehat's avatar San Mehat
Browse files

MountService: Force unmount when enabling ums



Signed-off-by: default avatarSan Mehat <san@google.com>
parent 9a56aaf1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -202,7 +202,7 @@ class MountService extends IMountService.Stub
        String vs = getVolumeState(path);
        if (enable && vs.equals(Environment.MEDIA_MOUNTED)) {
            mUmsEnabling = enable; // Override for isUsbMassStorageEnabled()
            int rc = doUnmountVolume(path, false);
            int rc = doUnmountVolume(path, true);
            mUmsEnabling = false; // Clear override
            if (rc != StorageResultCode.OperationSucceeded) {
                Log.e(TAG, String.format("Failed to unmount before enabling UMS (%d)", rc));