Loading core/java/android/content/Intent.java +9 −1 Original line number Diff line number Diff line Loading @@ -1632,11 +1632,19 @@ public class Intent implements Parcelable, Cloneable { /** * Broadcast Action: External media is unmounted because it is being shared via USB mass storage. * The path to the mount point for the removed media is contained in the Intent.mData field. * The path to the mount point for the shared media is contained in the Intent.mData field. */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_MEDIA_SHARED = "android.intent.action.MEDIA_SHARED"; /** * Broadcast Action: External media is no longer being shared via USB mass storage. * The path to the mount point for the previously shared media is contained in the Intent.mData field. * * @hide */ public static final String ACTION_MEDIA_UNSHARED = "android.intent.action.MEDIA_UNSHARED"; /** * Broadcast Action: External media was removed from SD card slot, but mount point was not unmounted. * The path to the mount point for the removed media is contained in the Intent.mData field. Loading services/java/com/android/server/MountService.java +5 −0 Original line number Diff line number Diff line Loading @@ -523,6 +523,11 @@ class MountService extends IMountService.Stub Intent in = null; if (oldState == VolumeState.Shared && newState != oldState) { mContext.sendBroadcast(new Intent(Intent.ACTION_MEDIA_UNSHARED, Uri.parse("file://" + path))); } if (newState == VolumeState.Init) { } else if (newState == VolumeState.NoMedia) { // NoMedia is handled via Disk Remove events Loading Loading
core/java/android/content/Intent.java +9 −1 Original line number Diff line number Diff line Loading @@ -1632,11 +1632,19 @@ public class Intent implements Parcelable, Cloneable { /** * Broadcast Action: External media is unmounted because it is being shared via USB mass storage. * The path to the mount point for the removed media is contained in the Intent.mData field. * The path to the mount point for the shared media is contained in the Intent.mData field. */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_MEDIA_SHARED = "android.intent.action.MEDIA_SHARED"; /** * Broadcast Action: External media is no longer being shared via USB mass storage. * The path to the mount point for the previously shared media is contained in the Intent.mData field. * * @hide */ public static final String ACTION_MEDIA_UNSHARED = "android.intent.action.MEDIA_UNSHARED"; /** * Broadcast Action: External media was removed from SD card slot, but mount point was not unmounted. * The path to the mount point for the removed media is contained in the Intent.mData field. Loading
services/java/com/android/server/MountService.java +5 −0 Original line number Diff line number Diff line Loading @@ -523,6 +523,11 @@ class MountService extends IMountService.Stub Intent in = null; if (oldState == VolumeState.Shared && newState != oldState) { mContext.sendBroadcast(new Intent(Intent.ACTION_MEDIA_UNSHARED, Uri.parse("file://" + path))); } if (newState == VolumeState.Init) { } else if (newState == VolumeState.NoMedia) { // NoMedia is handled via Disk Remove events Loading