summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/qs
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2015-04-28 11:19:13 -0400
committerJohn Spurlock <jspurlock@google.com>2015-04-29 09:58:38 -0400
commitd9c75dba75ad4742dbaadc34db99d2b76cebca91 (patch)
treeaf6a1b4b78602174ec8442b5d019abe1f18f0903 /packages/SystemUI/src/com/android/systemui/qs
parentfa1c1f97df601df50b3998f7ae98a2d3bfb03466 (diff)
downloadframeworks_base-d9c75dba75ad4742dbaadc34db99d2b76cebca91.zip
frameworks_base-d9c75dba75ad4742dbaadc34db99d2b76cebca91.tar.gz
frameworks_base-d9c75dba75ad4742dbaadc34db99d2b76cebca91.tar.bz2
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
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/qs')
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java30
1 files changed, 27 insertions, 3 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 6ce63d6..5145bc7 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
@@ -37,7 +37,11 @@ import com.android.systemui.volume.ZenModePanel;
/** Quick settings tile: Do not disturb **/
public class DndTile extends QSTile<QSTile.BooleanState> {
- private static final Intent ZEN_SETTINGS = new Intent(Settings.ACTION_ZEN_MODE_SETTINGS);
+ private static final Intent ZEN_SETTINGS =
+ new Intent(Settings.ACTION_ZEN_MODE_SETTINGS);
+
+ private static final Intent ZEN_PRIORITY_SETTINGS =
+ new Intent(Settings.ACTION_ZEN_MODE_PRIORITY_SETTINGS);
private static final String ACTION_SET_VISIBLE = "com.android.systemui.dndtile.SET_VISIBLE";
private static final String EXTRA_VISIBLE = "visible";
@@ -87,7 +91,9 @@ public class DndTile extends QSTile<QSTile.BooleanState> {
if (mState.value) {
mController.setZen(Global.ZEN_MODE_OFF, null, TAG);
} else {
- mController.setZen(Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS, null, TAG);
+ int zen = Prefs.getInt(mContext, Prefs.Key.DND_FAVORITE_ZEN, Global.ZEN_MODE_ALARMS);
+ mController.setZen(zen, null, TAG);
+ refreshState(zen); // this one's optimistic
showDetail(true);
}
}
@@ -209,8 +215,8 @@ public class DndTile extends QSTile<QSTile.BooleanState> {
R.layout.zen_mode_panel, parent, false);
if (convertView == null) {
zmp.init(mController);
- zmp.setEmbedded(true);
zmp.addOnAttachStateChangeListener(this);
+ zmp.setCallback(mZenModePanelCallback);
}
return zmp;
}
@@ -225,4 +231,22 @@ public class DndTile extends QSTile<QSTile.BooleanState> {
mShowingDetail = false;
}
}
+
+ private final ZenModePanel.Callback mZenModePanelCallback = new ZenModePanel.Callback() {
+ @Override
+ public void onPrioritySettings() {
+ mHost.startSettingsActivity(ZEN_PRIORITY_SETTINGS);
+ }
+
+ @Override
+ public void onInteraction() {
+ // noop
+ }
+
+ @Override
+ public void onExpanded(boolean expanded) {
+ // noop
+ }
+ };
+
}