From a11b4affcad3d255aa723a89b768ea222506f2e8 Mon Sep 17 00:00:00 2001 From: John Spurlock Date: Sun, 1 Jun 2014 11:52:23 -0400 Subject: VolumeZen: Prevent raising ringer volume in silent mode. Instead of breaking out of silent mode when raising the volume using the keys, prevent the change and display a visual hint up in the user interface. Bug:15330217 Change-Id: I74aae44319aadcd6db9841c7799967607f5a1617 --- packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'packages') diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java b/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java index 84cc1cd..898b46e 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java @@ -898,6 +898,11 @@ public class VolumePanel extends Handler { mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_VIBRATE) { sendMessageDelayed(obtainMessage(MSG_VIBRATE), VIBRATE_DELAY); } + + // Pulse the slider icon if an adjustment was suppressed due to silent mode. + if (sc != null && (flags & AudioManager.FLAG_SHOW_SILENT_HINT) != 0) { + pulseIcon(sc.icon); + } } private boolean isShowing() { -- cgit v1.1