Loading core/java/android/os/Environment.java +8 −0 Original line number Diff line number Diff line Loading @@ -679,6 +679,14 @@ public class Environment { */ public static final String MEDIA_UNMOUNTABLE = "unmountable"; /** * Storage state if the media is present and in unmounting state. * * @see #getStorageState(File) * @hide */ public static final String MEDIA_UNMOUNTING = "unmounting"; /** * Returns the current state of the primary "external" storage device. * Loading services/java/com/android/server/MountService.java +1 −0 Original line number Diff line number Diff line Loading @@ -951,6 +951,7 @@ class MountService extends IMountService.Stub action = Intent.ACTION_MEDIA_MOUNTED; } else if (newState == VolumeState.Unmounting) { action = Intent.ACTION_MEDIA_EJECT; updatePublicVolumeState(volume, Environment.MEDIA_UNMOUNTING); } else if (newState == VolumeState.Formatting) { } else if (newState == VolumeState.Shared) { if (DEBUG_EVENTS) Slog.i(TAG, "Updating volume state media mounted"); Loading Loading
core/java/android/os/Environment.java +8 −0 Original line number Diff line number Diff line Loading @@ -679,6 +679,14 @@ public class Environment { */ public static final String MEDIA_UNMOUNTABLE = "unmountable"; /** * Storage state if the media is present and in unmounting state. * * @see #getStorageState(File) * @hide */ public static final String MEDIA_UNMOUNTING = "unmounting"; /** * Returns the current state of the primary "external" storage device. * Loading
services/java/com/android/server/MountService.java +1 −0 Original line number Diff line number Diff line Loading @@ -951,6 +951,7 @@ class MountService extends IMountService.Stub action = Intent.ACTION_MEDIA_MOUNTED; } else if (newState == VolumeState.Unmounting) { action = Intent.ACTION_MEDIA_EJECT; updatePublicVolumeState(volume, Environment.MEDIA_UNMOUNTING); } else if (newState == VolumeState.Formatting) { } else if (newState == VolumeState.Shared) { if (DEBUG_EVENTS) Slog.i(TAG, "Updating volume state media mounted"); Loading