Loading services/java/com/android/server/MountService.java +15 −11 Original line number Diff line number Diff line Loading @@ -854,12 +854,14 @@ class MountService extends IMountService.Stub } if (code == VoldResponseCode.VolumeDiskInserted) { if(!isUsbMassStorageConnected()) new Thread("MountService#VolumeDiskInserted") { @Override public void run() { try { int rc; if ((rc = doMountVolume(path)) != StorageResultCode.OperationSucceeded) { if ((rc = doMountVolume(path)) != StorageResultCode.OperationSucceeded) { Slog.w(TAG, String.format("Insertion mount failed (%d)", rc)); } } catch (Exception ex) { Loading Loading @@ -940,6 +942,8 @@ class MountService extends IMountService.Stub updatePublicVolumeState(volume, Environment.MEDIA_UNMOUNTED); action = Intent.ACTION_MEDIA_UNMOUNTED; } if(isUsbMassStorageConnected() && volume.allowMassStorage()) doShareUnshareVolume(path, "ums", true); } else if (newState == VolumeState.Pending) { } else if (newState == VolumeState.Checking) { if (DEBUG_EVENTS) Slog.i(TAG, "updating volume state checking"); Loading Loading
services/java/com/android/server/MountService.java +15 −11 Original line number Diff line number Diff line Loading @@ -854,12 +854,14 @@ class MountService extends IMountService.Stub } if (code == VoldResponseCode.VolumeDiskInserted) { if(!isUsbMassStorageConnected()) new Thread("MountService#VolumeDiskInserted") { @Override public void run() { try { int rc; if ((rc = doMountVolume(path)) != StorageResultCode.OperationSucceeded) { if ((rc = doMountVolume(path)) != StorageResultCode.OperationSucceeded) { Slog.w(TAG, String.format("Insertion mount failed (%d)", rc)); } } catch (Exception ex) { Loading Loading @@ -940,6 +942,8 @@ class MountService extends IMountService.Stub updatePublicVolumeState(volume, Environment.MEDIA_UNMOUNTED); action = Intent.ACTION_MEDIA_UNMOUNTED; } if(isUsbMassStorageConnected() && volume.allowMassStorage()) doShareUnshareVolume(path, "ums", true); } else if (newState == VolumeState.Pending) { } else if (newState == VolumeState.Checking) { if (DEBUG_EVENTS) Slog.i(TAG, "updating volume state checking"); Loading