From f503c8f377b2f9c541fa32eaffacd454eaf0a379 Mon Sep 17 00:00:00 2001 From: Christian Beck Date: Mon, 20 May 2013 08:42:45 +0200 Subject: [PATCH] Add missing ACTION_MEDIA_UNMOUNTED intent When an SD card is removed without the user unmounting, the intent ACTION_MEDIA_BAD_REMOVAL is fired but is missing the preceeding ACTION_MEDIA_UNMOUNTED which is needed to keep UI consistency. Now when bad media removal is detected an ACTION_MEDIA_UNMOUNTED intent is sent before the ACTION_MEDIA_BAD_REMOVAL. Change-Id: I133300f42bafab141351e796d7cfc13c15d133e0 --- services/java/com/android/server/MountService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java index ce83a45786694..c54000bcd7386 100644 --- a/services/java/com/android/server/MountService.java +++ b/services/java/com/android/server/MountService.java @@ -832,7 +832,7 @@ class MountService extends IMountService.Stub if (DEBUG_EVENTS) Slog.i(TAG, "Sending unmounted event first"); /* Send the media unmounted event first */ updatePublicVolumeState(volume, Environment.MEDIA_UNMOUNTED); - action = Intent.ACTION_MEDIA_UNMOUNTED; + sendStorageIntent(Intent.ACTION_MEDIA_UNMOUNTED, volume, UserHandle.ALL); if (DEBUG_EVENTS) Slog.i(TAG, "Sending media bad removal"); updatePublicVolumeState(volume, Environment.MEDIA_BAD_REMOVAL);