MountService: Force unmount when enabling ums

Signed-off-by: San Mehat <san@google.com>
This commit is contained in:
San Mehat
2010-02-22 11:39:16 -08:00
parent 9a56aaf12b
commit 3d4881067a

View File

@@ -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));