summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2014-11-08 12:40:19 -0500
committerJohn Spurlock <jspurlock@google.com>2014-11-10 08:32:23 -0500
commitbb4a702e6fe44cb026097db13492f8345b38ee97 (patch)
treebd39584ed56730b3543a6d5ddd8a036a99d8391d /packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java
parentaed8e76172477c884ec7bef659f050d0817efb7d (diff)
downloadframeworks_base-bb4a702e6fe44cb026097db13492f8345b38ee97.zip
frameworks_base-bb4a702e6fe44cb026097db13492f8345b38ee97.tar.gz
frameworks_base-bb4a702e6fe44cb026097db13492f8345b38ee97.tar.bz2
Volume dialog: Add zen mode icons and notification access.
- Add icon above text to all three zen mode states, update text style. - Remove zentoast. - Update shared borderless rect background, masks now support shapes. - Update size of volume stream icons. - Ensure all volume icons are expressions of white. - Make volume icons testable via new demo mode command. - Add a divider + secondary icon to access the notification slider. - Animate the transition when accessing notification slider. Bug: 18206097 Bug: 16303068 Bug: 18102850 Change-Id: I5eb6f820dc317e89be272cc78f6c80ed969ad5e9
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java')
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java15
1 files changed, 5 insertions, 10 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java b/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java
index 28ecbf9..b325653 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java
@@ -80,7 +80,6 @@ public class ZenModePanel extends LinearLayout {
private final Interpolator mFastOutSlowInInterpolator;
private final int mSubheadWarningColor;
private final int mSubheadColor;
- private final ZenToast mZenToast;
private String mTag = TAG + "/" + Integer.toHexString(System.identityHashCode(this));
@@ -115,7 +114,6 @@ public class ZenModePanel extends LinearLayout {
final Resources res = mContext.getResources();
mSubheadWarningColor = res.getColor(R.color.system_warning_color);
mSubheadColor = res.getColor(R.color.qs_subhead);
- mZenToast = new ZenToast(mContext);
if (DEBUG) Log.d(mTag, "new ZenModePanel");
}
@@ -124,10 +122,12 @@ 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, R.drawable.ic_zen_none,
+ Global.ZEN_MODE_NO_INTERRUPTIONS);
+ mZenButtons.addButton(R.string.interruption_level_priority, R.drawable.ic_zen_important,
Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS);
- mZenButtons.addButton(R.string.interruption_level_all, Global.ZEN_MODE_OFF);
+ mZenButtons.addButton(R.string.interruption_level_all, R.drawable.ic_zen_all,
+ Global.ZEN_MODE_OFF);
mZenButtons.setCallback(mZenButtonsCallback);
mZenSubhead = findViewById(R.id.zen_subhead);
@@ -160,7 +160,6 @@ public class ZenModePanel extends LinearLayout {
protected void onAttachedToWindow() {
super.onAttachedToWindow();
if (DEBUG) Log.d(mTag, "onAttachedToWindow");
- mZenToast.hide();
mAttachedZen = getSelectedZen(-1);
mSessionZen = mAttachedZen;
mSessionExitCondition = copy(mExitCondition);
@@ -193,10 +192,6 @@ public class ZenModePanel extends LinearLayout {
if (selectedZen == Global.ZEN_MODE_NO_INTERRUPTIONS) {
mPrefs.trackNoneSelected();
}
- if (selectedZen == Global.ZEN_MODE_NO_INTERRUPTIONS
- || selectedZen == Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS) {
- mZenToast.show(selectedZen);
- }
}
}