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/DemoStatusIcons.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DemoStatusIcons.java
index 0a3fdef..a11e610 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DemoStatusIcons.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DemoStatusIcons.java
@@ -60,7 +60,7 @@
} else if (mDemoMode && command.equals(COMMAND_STATUS)) {
String volume = args.getString("volume");
if (volume != null) {
- int iconId = volume.equals("zen") ? R.drawable.stat_sys_ringer_zen
+ int iconId = volume.equals("important") ? R.drawable.stat_sys_zen_important
: volume.equals("silent") ? R.drawable.stat_sys_ringer_silent
: volume.equals("vibrate") ? R.drawable.stat_sys_ringer_vibrate
: 0;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index f697098..a6b2110 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -738,6 +738,14 @@
return mStatusBarView;
}
+ @Override
+ protected void setZenMode(int mode) {
+ super.setZenMode(mode);
+ if (mIconPolicy != null) {
+ mIconPolicy.setZenMode(mode);
+ }
+ }
+
private void startKeyguard() {
KeyguardViewMediator keyguardViewMediator = getComponent(KeyguardViewMediator.class);
mStatusBarKeyguardViewManager = keyguardViewMediator.registerStatusBar(this,
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) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
index 04b1443..5fbade1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
@@ -21,19 +21,16 @@
import android.os.HandlerThread;
import android.os.Looper;
-import com.android.systemui.R;
import com.android.systemui.qs.QSTile;
import com.android.systemui.qs.tiles.AirplaneModeTile;
import com.android.systemui.qs.tiles.BluetoothTile;
-import com.android.systemui.qs.tiles.BugreportTile;
import com.android.systemui.qs.tiles.CastTile;
import com.android.systemui.qs.tiles.CellularTile;
import com.android.systemui.qs.tiles.ColorInversionTile;
import com.android.systemui.qs.tiles.FlashlightTile;
-import com.android.systemui.qs.tiles.LocationTile;
-import com.android.systemui.qs.tiles.NotificationsTile;
-import com.android.systemui.qs.tiles.RotationLockTile;
import com.android.systemui.qs.tiles.HotspotTile;
+import com.android.systemui.qs.tiles.LocationTile;
+import com.android.systemui.qs.tiles.RotationLockTile;
import com.android.systemui.qs.tiles.WifiTile;
import com.android.systemui.settings.CurrentUserTracker;
import com.android.systemui.statusbar.policy.BluetoothController;
@@ -93,7 +90,6 @@
mTiles.add(new ColorInversionTile(this));
mTiles.add(new CellularTile(this));
mTiles.add(new AirplaneModeTile(this));
- mTiles.add(new NotificationsTile(this));
mTiles.add(new RotationLockTile(this));
mTiles.add(new LocationTile(this));
mTiles.add(new CastTile(this));