Implement new volume UI design.
- Add segmented zen-mode picker to the rocker UI.
- Add a new "no interruptions" value to the zen setting.
- Implement expandable condition subpanel on the rocker UI.
- Remove the old circle&slash icons.
- Suppress alarm sounds if in "no interruptions" mode.
- Add warning re: alarms to the condition UI.
- Allow rocker UI to display over the keyguard.
- Remove Notifications QS tile.
- Realign volume rocker to the top of the screen.
- Add support for new "days" sleepMode.
- New icon policy rules for "volume" slot.
- New important icon (star).
Associated Settings change:
I6ed56791784968adfbd684f490dbbebed285a2dd
Bug:15831713
Change-Id: I35afe38646f04d2ba0dbac11c2c6356120a33694
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 b6f5ae0..186b618 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
@@ -24,6 +24,7 @@
import android.content.IntentFilter;
import android.media.AudioManager;
import android.os.Handler;
+import android.provider.Settings.Global;
import android.util.Log;
import com.android.internal.telephony.IccCardConstants;
@@ -64,7 +65,7 @@
private boolean mVolumeVisible;
// zen mode
- private boolean mZen;
+ private int mZen;
// bluetooth device status
private boolean mBluetoothEnabled = false;
@@ -155,7 +156,7 @@
updateVolume();
}
- public void setZenMode(boolean zen) {
+ public void setZenMode(int zen) {
mZen = zen;
updateVolume();
}
@@ -202,21 +203,21 @@
private final void updateVolume() {
AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
final int ringerMode = audioManager.getRingerMode();
- final boolean visible = ringerMode == AudioManager.RINGER_MODE_SILENT ||
- ringerMode == AudioManager.RINGER_MODE_VIBRATE ||
- mZen;
-
- final int iconId;
+ int iconId = 0;
String contentDescription = null;
- if (mZen) {
- iconId = R.drawable.stat_sys_ringer_zen;
- contentDescription = mContext.getString(R.string.zen_mode_title);
+ boolean visible = false;
+ if (ringerMode == AudioManager.RINGER_MODE_SILENT) {
+ visible = true;
+ iconId = R.drawable.stat_sys_ringer_silent;
+ contentDescription = mContext.getString(R.string.accessibility_ringer_silent);
+ } else if (mZen == Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS) {
+ visible = true;
+ iconId = R.drawable.stat_sys_zen_important;
+ contentDescription = mContext.getString(R.string.zen_important_interruptions);
} else if (ringerMode == AudioManager.RINGER_MODE_VIBRATE) {
+ visible = true;
iconId = R.drawable.stat_sys_ringer_vibrate;
contentDescription = mContext.getString(R.string.accessibility_ringer_vibrate);
- } else {
- iconId = R.drawable.stat_sys_ringer_silent;
- contentDescription = mContext.getString(R.string.accessibility_ringer_silent);
}
if (visible) {