summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'packages/SystemUI/src/com')
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/Events.java1
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/ZenFooter.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java14
5 files changed, 24 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
index 182a2dd..ff6a45a 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
@@ -112,6 +112,12 @@ public class DndTile extends QSTile<QSTile.BooleanState> {
state.contentDescription = mContext.getString(
R.string.accessibility_quick_settings_dnd_none_on);
break;
+ case Global.ZEN_MODE_ALARMS:
+ state.icon = ResourceIcon.get(R.drawable.ic_qs_dnd_on);
+ state.label = mContext.getString(R.string.quick_settings_dnd_alarms_label);
+ state.contentDescription = mContext.getString(
+ R.string.accessibility_quick_settings_dnd_alarms_on);
+ break;
default:
state.icon = ResourceIcon.get(R.drawable.ic_qs_dnd_off);
state.label = mContext.getString(R.string.quick_settings_dnd_label);
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 1938c6d..ac93ced 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
@@ -218,7 +218,7 @@ public class PhoneStatusBarPolicy {
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 &&
+ } else if (mZen != Global.ZEN_MODE_NO_INTERRUPTIONS && mZen != Global.ZEN_MODE_ALARMS &&
audioManager.getRingerModeInternal() == AudioManager.RINGER_MODE_VIBRATE) {
volumeVisible = true;
volumeIconId = R.drawable.stat_sys_ringer_vibrate;
diff --git a/packages/SystemUI/src/com/android/systemui/volume/Events.java b/packages/SystemUI/src/com/android/systemui/volume/Events.java
index b20e39c..12dca94 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/Events.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/Events.java
@@ -177,6 +177,7 @@ public class Events {
switch (zenMode) {
case Global.ZEN_MODE_OFF: return "off";
case Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS: return "important_interruptions";
+ case Global.ZEN_MODE_ALARMS: return "alarms";
case Global.ZEN_MODE_NO_INTERRUPTIONS: return "no_interruptions";
default: return "unknown";
}
diff --git a/packages/SystemUI/src/com/android/systemui/volume/ZenFooter.java b/packages/SystemUI/src/com/android/systemui/volume/ZenFooter.java
index ba5b8d1..f99eb6d 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/ZenFooter.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/ZenFooter.java
@@ -139,13 +139,17 @@ public class ZenFooter extends LinearLayout {
}
public boolean isZen() {
- return isZenPriority() || isZenNone();
+ return isZenPriority() || isZenAlarms() || isZenNone();
}
private boolean isZenPriority() {
return mZen == Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS;
}
+ private boolean isZenAlarms() {
+ return mZen == Global.ZEN_MODE_ALARMS;
+ }
+
private boolean isZenNone() {
return mZen == Global.ZEN_MODE_NO_INTERRUPTIONS;
}
@@ -188,6 +192,7 @@ public class ZenFooter extends LinearLayout {
mSwitchBarIcon.setAlpha(isZen ? 1 : mSecondaryAlpha);
final String line1 =
isZenPriority() ? mContext.getString(R.string.interruption_level_priority)
+ : isZenAlarms() ? mContext.getString(R.string.interruption_level_alarms)
: isZenNone() ? mContext.getString(R.string.interruption_level_none)
: null;
Util.setText(mSummaryLine1, line1);
diff --git a/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java b/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java
index a7f6175..cb6c29f 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java
@@ -155,7 +155,7 @@ public class ZenModePanel extends LinearLayout {
} else {
mZenButtonsContainer.setBackgroundResource(R.drawable.qs_background_secondary);
}
- mZenButtons.getChildAt(2).setVisibility(mEmbedded ? GONE : VISIBLE);
+ mZenButtons.getChildAt(3).setVisibility(mEmbedded ? GONE : VISIBLE);
mZenEmbeddedDivider.setVisibility(mEmbedded ? VISIBLE : GONE);
setExpanded(mEmbedded);
updateWidgets();
@@ -166,8 +166,11 @@ public class ZenModePanel extends LinearLayout {
super.onFinishInflate();
mZenButtons = (SegmentedButtons) findViewById(R.id.zen_buttons);
- mZenButtons.addButton(R.string.interruption_level_none, Global.ZEN_MODE_NO_INTERRUPTIONS);
- mZenButtons.addButton(R.string.interruption_level_priority,
+ mZenButtons.addButton(R.string.interruption_level_none_twoline,
+ Global.ZEN_MODE_NO_INTERRUPTIONS);
+ mZenButtons.addButton(R.string.interruption_level_alarms_twoline,
+ Global.ZEN_MODE_ALARMS);
+ mZenButtons.addButton(R.string.interruption_level_priority_twoline,
Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS);
mZenButtons.addButton(R.string.interruption_level_all, Global.ZEN_MODE_OFF);
mZenButtons.setCallback(mZenButtonsCallback);
@@ -718,7 +721,10 @@ public class ZenModePanel extends LinearLayout {
case Global.ZEN_MODE_NO_INTERRUPTIONS:
modeText = mContext.getString(R.string.zen_no_interruptions);
break;
- default:
+ case Global.ZEN_MODE_ALARMS:
+ modeText = mContext.getString(R.string.zen_alarms);
+ break;
+ default:
return;
}
announceForAccessibility(mContext.getString(R.string.zen_mode_and_condition, modeText,