Skip to content

Commit fffaf85

Browse files
author
Steven Harper
committed
Volume Overlay Bug When swapping streams
Merged in http://review.cyanogenmod.com/#change,14109 Fixing a bug that when an app is dismissed or loaded that changes the current active audio stream, if the volume overlay is visible during the swap, if you adjust the volume (with hard keys) after the stream has changed while the panel is still visible, the wrong panel (view) is still visible on-top of the one that is being adjusted. A good way to replicate this is to Open the Phone APP Go to the Keypad Screen Adjust the volume (not the icon on the overlay) While the volume is visible Hit the HOME hard key Before the volume dissapears, adjust the volume with hard keys You will hear and feel the volume adjusting, but the overlay will not update. Change-Id: Ied50ed83b153234cff82c282e3fd76ed671b420b
1 parent fd862e9 commit fffaf85

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/java/android/view/VolumePanel.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,10 @@ protected void onVolumeChanged(int streamType, int flags) {
400400
if (LOGD) Log.d(TAG, "onVolumeChanged(streamType: " + streamType + ", flags: " + flags + ")");
401401

402402
if ((flags & AudioManager.FLAG_SHOW_UI) != 0) {
403-
if (mActiveStreamType == -1) {
403+
// If the activePanel is none - or - the one we are updating is not the current active panel
404+
// then it is likely that the audio stream being updated has been swapped by an app
405+
// we need to reorder the sliders to bring the new active one to the front
406+
if (mActiveStreamType == -1 || streamType != mActiveStreamType) {
404407
reorderSliders(streamType);
405408
}
406409
onShowVolumeChanged(streamType, flags);

0 commit comments

Comments
 (0)