OSDN Git Service

Volume Panel: Fix Bluetooth music stream icon when muted
authorSebastian Haderecker <sebastian.haderecker@gmail.com>
Thu, 15 Jun 2017 20:44:50 +0000 (22:44 +0200)
committerMichael Bestas <mkbestas@lineageos.org>
Mon, 26 Jun 2017 18:35:44 +0000 (18:35 +0000)
This fixes the Bluetooth music stream icon not updating
when the volume is decreased to zero with hardware volume buttons.

Change-Id: I280cba64f94bbe2b3566b213f6182b5f654169cf

packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java

index 4d57b45..3178346 100644 (file)
@@ -794,7 +794,8 @@ public class VolumeDialog implements TunerService.Tunable {
                 isRingVibrate ? R.drawable.ic_volume_ringer_vibrate
                         : isRingSilent || zenMuted ? row.cachedIconRes
                         : ss.routedToBluetooth ?
-                        (ss.muted ? R.drawable.ic_volume_media_bt_mute
+                        ((mAutomute && ss.level == 0) || ss.muted ?
+                                  R.drawable.ic_volume_media_bt_mute
                                 : R.drawable.ic_volume_media_bt)
                         : mAutomute && ss.level == 0 ? row.iconMuteRes
                         : (ss.muted ? row.iconMuteRes : row.iconRes);