Volume policy updates.
- Make volume policy settable by the volume UI instead
of hardcoded in AudioService.
- Add status bar icon for silent mode.
- Limit unmute-on-volume-adjust behavior to tvs.
- Ensure all changes to device volume are sent through
setIndex so no change events are missed.
Bug: 19260237
Change-Id: Iea070a7a6f90ff620e39629f2da3f33f87223d72
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
index 5da8457..2236aae 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
@@ -213,7 +213,12 @@
zenDescription = mContext.getString(R.string.zen_important_interruptions);
}
- if (mZen != Global.ZEN_MODE_NO_INTERRUPTIONS &&
+ if (DndTile.isVisible(mContext)
+ && audioManager.getRingerModeInternal() == AudioManager.RINGER_MODE_SILENT) {
+ volumeVisible = true;
+ volumeIconId = R.drawable.stat_sys_ringer_silent;
+ volumeDescription = mContext.getString(R.string.accessibility_ringer_silent);
+ } else if (mZen != Global.ZEN_MODE_NO_INTERRUPTIONS &&
audioManager.getRingerModeInternal() == AudioManager.RINGER_MODE_VIBRATE) {
volumeVisible = true;
volumeIconId = R.drawable.stat_sys_ringer_vibrate;