diff options
author | John Spurlock <jspurlock@google.com> | 2015-02-26 20:54:12 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-02-26 20:54:14 +0000 |
commit | af5d44e441e8fe77d896a834a4d3d219c06df63c (patch) | |
tree | 8ad9070d04419b6a4caceb594d38609223b2a29b /packages/SystemUI/src/com/android/systemui/volume | |
parent | 5bc5d7c45f4a0f6e556200051b96b7870553b06f (diff) | |
parent | c72d4cbc818bb5e755e1fd86c9c6c30c4e2375dd (diff) | |
download | frameworks_base-af5d44e441e8fe77d896a834a4d3d219c06df63c.zip frameworks_base-af5d44e441e8fe77d896a834a4d3d219c06df63c.tar.gz frameworks_base-af5d44e441e8fe77d896a834a4d3d219c06df63c.tar.bz2 |
Merge "VolumePrototypes: Better handle removals/upgrades."
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/volume')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java index 97ebbf1..f7f3bd8 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java @@ -112,12 +112,12 @@ public class VolumeUI extends SystemUI { private void setVolumeController(boolean register) { if (register) { - if (LOGD) Log.d(TAG, "Registering volume controller"); + if (LOGD) Log.d(TAG, "Registering default volume controller"); mAudioManager.setVolumeController(mVolumeController); mMediaSessionManager.setRemoteVolumeController(mRemoteVolumeController); DndTile.setVisible(mContext, false); } else { - if (LOGD) Log.d(TAG, "Unregistering volume controller"); + if (LOGD) Log.d(TAG, "Unregistering default volume controller"); mAudioManager.setVolumeController(null); mMediaSessionManager.setRemoteVolumeController(null); } @@ -260,11 +260,16 @@ public class VolumeUI extends SystemUI { if (LOGD) Log.d(TAG, "onNoService"); setVolumeController(true); mRestorationNotification.hide(); + if (!mVolumeControllerService.isPackageAvailable()) { + mVolumeControllerService.setComponent(null); + } } @Override public long onServiceStartAttempt() { if (LOGD) Log.d(TAG, "onServiceStartAttempt"); + // poke the setting to update the uid + mVolumeControllerService.setComponent(mVolumeControllerService.getComponent()); setVolumeController(false); mVolumeController.dismissNow(); mRestorationNotification.show(); |