Permalink
Browse files

Merge "Fixing a bug that when an app is dismissed or loaded that chan…

…ges the current active audio stream, if the volume overlay is visible during the swap, if you adjust the volume (with hard keys) after the steam has changed while the panel is still visible, the wrong panel (view) is still visible on-top of the one that is being adjusted." into ics
  • Loading branch information...
2 parents 30456e9 + 792bdc5 commit ddedb890fdc9c84bf8831c14f7333792684e95b0 @cyanogen cyanogen committed with Gerrit Code Review Mar 31, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 core/java/android/view/VolumePanel.java
View
5 core/java/android/view/VolumePanel.java
@@ -400,7 +400,10 @@ protected void onVolumeChanged(int streamType, int flags) {
if (LOGD) Log.d(TAG, "onVolumeChanged(streamType: " + streamType + ", flags: " + flags + ")");
if ((flags & AudioManager.FLAG_SHOW_UI) != 0) {
- if (mActiveStreamType == -1) {
+ // If the activePanel is none - or - the one we are updating is not the current active panel
+ // then it is likely that the audio stream being updated has been swapped by an app
+ // we need to reorder the sliders to bring the new active one to the front
+ if (mActiveStreamType == -1 || streamType != mActiveStreamType) {
reorderSliders(streamType);
}
onShowVolumeChanged(streamType, flags);

0 comments on commit ddedb89

Please sign in to comment.