diff options
author | Mike Lockwood <lockwood@android.com> | 2010-03-03 06:16:52 -0500 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2010-03-03 06:16:52 -0500 |
commit | bf2dd44a6f86d13efd55d1e690822fba11187bf8 (patch) | |
tree | 0a115cfda2765dbc558318b692fd1874305cd6ac /services | |
parent | c018f3cfdd8a8277dbb3b61d4761974862876ab9 (diff) | |
download | frameworks_base-bf2dd44a6f86d13efd55d1e690822fba11187bf8.zip frameworks_base-bf2dd44a6f86d13efd55d1e690822fba11187bf8.tar.gz frameworks_base-bf2dd44a6f86d13efd55d1e690822fba11187bf8.tar.bz2 |
MountService: Send ACTION_MEDIA_UNSHARED Intent a volume is no longer shared via UMS.
Change-Id: I21c887ae76eccabcc5d8449aa0a38e98758e8958
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/MountService.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java index 41f3850..3849023 100644 --- a/services/java/com/android/server/MountService.java +++ b/services/java/com/android/server/MountService.java @@ -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 |