Volume: Simple dialog footer, DND in quick settings.
- Show DND tile by default, this is now the only
place to manage DND modes / end conditions.
- Remove super footer from volume dialog, replace with
a simplified version that displays the current mode
and allows ending DND.
- Remove obsolete text-only footer from codebase.
- Migrate remaining volume items into main resource files.
- Rename "No interruptions" to "Total silence".
- Add new user information banner for "Total silence"
- Crude media filtering for Total Silence.
(deeper muting changes will be done as a followup)
- Disable volume dialog sliders completely if muted due
to zen.
- Cleanup ZenModePanel: assume embedded mode, remove
expandable subhead
- Remember "favorite" DND mode inside the DND config panel.
- AudioService: consult ringer-mode-delegate before voluming
down into silent.
- Add new hour options to time-based exit conditions.
- Volume dialog visual updates to move closer to final visuals.
- Unify ringer=silent with DND.
Bug: 19260237
Change-Id: I05d7e001eca3b5125418ec3bc4087d0cb8866717
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 fb42ba1d..0e8e844 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
@@ -224,14 +224,14 @@
} else if (mZen == Global.ZEN_MODE_NO_INTERRUPTIONS) {
zenVisible = true;
zenIconId = R.drawable.stat_sys_zen_none;
- zenDescription = mContext.getString(R.string.zen_no_interruptions);
+ zenDescription = mContext.getString(R.string.interruption_level_none);
} else if (mZen == Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS) {
zenVisible = true;
zenIconId = R.drawable.stat_sys_zen_important;
- zenDescription = mContext.getString(R.string.zen_important_interruptions);
+ zenDescription = mContext.getString(R.string.interruption_level_priority);
}
- if (DndTile.isVisible(mContext)
+ if (DndTile.isVisible(mContext) && !DndTile.isCombinedIcon(mContext)
&& audioManager.getRingerModeInternal() == AudioManager.RINGER_MODE_SILENT) {
volumeVisible = true;
volumeIconId = R.drawable.stat_sys_ringer_silent;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeController.java
index 67cc788..9d84a85 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeController.java
@@ -35,6 +35,7 @@
boolean isZenAvailable();
ComponentName getEffectsSuppressor();
boolean isCountdownConditionSupported();
+ int getCurrentUser();
public static class Callback {
public void onZenChanged(int zen) {}
@@ -45,4 +46,5 @@
public void onManualRuleChanged(ZenRule rule) {}
public void onConfigChanged(ZenModeConfig config) {}
}
+
}
\ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java
index 830a197..5b80ac2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java
@@ -16,6 +16,7 @@
package com.android.systemui.statusbar.policy;
+import android.app.ActivityManager;
import android.app.AlarmManager;
import android.app.NotificationManager;
import android.content.BroadcastReceiver;
@@ -159,6 +160,11 @@
.isSystemConditionProviderEnabled(ZenModeConfig.COUNTDOWN_PATH);
}
+ @Override
+ public int getCurrentUser() {
+ return ActivityManager.getCurrentUser();
+ }
+
private void fireNextAlarmChanged() {
for (Callback cb : mCallbacks) {
cb.onNextAlarmChanged();