From d9c75dba75ad4742dbaadc34db99d2b76cebca91 Mon Sep 17 00:00:00 2001 From: John Spurlock Date: Tue, 28 Apr 2015 11:19:13 -0400 Subject: 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 --- packages/SystemUI/res/layout/qs_detail.xml | 4 +- packages/SystemUI/res/layout/segmented_button.xml | 8 +- packages/SystemUI/res/layout/volume_dialog.xml | 21 +-- packages/SystemUI/res/layout/volume_dialog_row.xml | 11 +- .../SystemUI/res/layout/volume_text_footer.xml | 54 ------ packages/SystemUI/res/layout/volume_zen_footer.xml | 99 ++++------- packages/SystemUI/res/layout/zen_mode_panel.xml | 81 ++------- packages/SystemUI/res/values/colors.xml | 4 +- packages/SystemUI/res/values/config.xml | 4 + packages/SystemUI/res/values/dimens.xml | 9 + packages/SystemUI/res/values/strings.xml | 63 ++++--- packages/SystemUI/res/values/styles.xml | 29 +++- packages/SystemUI/res/values/volume.xml | 87 ---------- .../SystemUI/src/com/android/systemui/Prefs.java | 4 + .../src/com/android/systemui/qs/tiles/DndTile.java | 30 +++- .../statusbar/phone/PhoneStatusBarPolicy.java | 6 +- .../statusbar/policy/ZenModeController.java | 2 + .../statusbar/policy/ZenModeControllerImpl.java | 6 + .../android/systemui/volume/SegmentedButtons.java | 4 + .../src/com/android/systemui/volume/Util.java | 9 +- .../com/android/systemui/volume/VolumeDialog.java | 162 +++--------------- .../systemui/volume/VolumeDialogComponent.java | 8 +- .../systemui/volume/VolumeDialogController.java | 36 ++-- .../com/android/systemui/volume/VolumePrefs.java | 4 - .../src/com/android/systemui/volume/VolumeUI.java | 2 +- .../src/com/android/systemui/volume/ZenFooter.java | 168 ++----------------- .../com/android/systemui/volume/ZenModePanel.java | 181 +++++++-------------- 27 files changed, 311 insertions(+), 785 deletions(-) delete mode 100644 packages/SystemUI/res/layout/volume_text_footer.xml delete mode 100644 packages/SystemUI/res/values/volume.xml (limited to 'packages/SystemUI') diff --git a/packages/SystemUI/res/layout/qs_detail.xml b/packages/SystemUI/res/layout/qs_detail.xml index 2eb99ba..ddff0f0 100644 --- a/packages/SystemUI/res/layout/qs_detail.xml +++ b/packages/SystemUI/res/layout/qs_detail.xml @@ -18,7 +18,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/qs_detail_background" - android:paddingBottom="16dp" + android:paddingBottom="8dp" android:orientation="vertical"> + android:textAppearance="@style/TextAppearance.QS.SegmentedButton" + android:minHeight="64dp" /> diff --git a/packages/SystemUI/res/layout/volume_dialog.xml b/packages/SystemUI/res/layout/volume_dialog.xml index c86e9dc..0ed1e2a 100644 --- a/packages/SystemUI/res/layout/volume_dialog.xml +++ b/packages/SystemUI/res/layout/volume_dialog.xml @@ -21,40 +21,31 @@ android:layout_marginBottom="4dp" android:layout_marginLeft="@dimen/notification_side_padding" android:layout_marginRight="@dimen/notification_side_padding" - android:layout_marginTop="4dp" android:background="@drawable/volume_dialog_background" android:translationZ="4dp" > + android:src="@drawable/ic_volume_collapse_animation" + tools:ignore="RtlHardcoded" /> + android:paddingBottom="8dp" + android:paddingTop="8dp" > - - - - - - + \ No newline at end of file diff --git a/packages/SystemUI/res/layout/volume_dialog_row.xml b/packages/SystemUI/res/layout/volume_dialog_row.xml index b51aa96..53ae61b 100644 --- a/packages/SystemUI/res/layout/volume_dialog_row.xml +++ b/packages/SystemUI/res/layout/volume_dialog_row.xml @@ -16,16 +16,15 @@ + android:clipChildren="false" + android:paddingEnd="8dp" + android:paddingStart="8dp" > diff --git a/packages/SystemUI/res/layout/volume_text_footer.xml b/packages/SystemUI/res/layout/volume_text_footer.xml deleted file mode 100644 index 7436488..0000000 --- a/packages/SystemUI/res/layout/volume_text_footer.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - -