diff options
author | John Spurlock <jspurlock@google.com> | 2015-02-26 14:49:55 -0500 |
---|---|---|
committer | John Spurlock <jspurlock@google.com> | 2015-02-26 15:51:11 -0500 |
commit | c72d4cbc818bb5e755e1fd86c9c6c30c4e2375dd (patch) | |
tree | bcb33dcab34c557c3546d6ced202c0cc3c7c5a25 /packages/SystemUI/src/com/android/systemui/volume | |
parent | cff41ae3635170b93acca5bfd2813b719e060e0f (diff) | |
download | frameworks_base-c72d4cbc818bb5e755e1fd86c9c6c30c4e2375dd.zip frameworks_base-c72d4cbc818bb5e755e1fd86c9c6c30c4e2375dd.tar.gz frameworks_base-c72d4cbc818bb5e755e1fd86c9c6c30c4e2375dd.tar.bz2 |
VolumePrototypes: Better handle removals/upgrades.
- Repoke the setting at startup to ensure we have the latest UID.
- Automatically restore the default volume UI when the current
vcs is uninstalled.
Bug: 19260237
Change-Id: Ie1fe356fea08392278340b54230ab429d14e1583
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 8048a48..b9d295c 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java @@ -111,11 +111,11 @@ 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); } else { - if (LOGD) Log.d(TAG, "Unregistering volume controller"); + if (LOGD) Log.d(TAG, "Unregistering default volume controller"); mAudioManager.setVolumeController(null); mMediaSessionManager.setRemoteVolumeController(null); } @@ -258,11 +258,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(); |