From f88d8082a86bee00c604cbbcfb5261f5573936fe Mon Sep 17 00:00:00 2001 From: John Spurlock Date: Wed, 25 Mar 2015 18:09:51 -0400 Subject: Introduce new volume dialog. - New VolumeDialog (presentation) + VolumeDialogController (state) to implement a volume dialog that keeps track of multiple audio streams, including all remote streams. - The dialog starts out with a single stream, with more detail available behind an expand chevron. - Existing zen options reorganized under a master switch bar named "Block interruptions", with "None" renamed to "No interruptions" and "Priority" renamed to "Priority only". - Combined "Block interruptions" icon replaces the now-obsolete star/no-smoking icons in the status bar. - New icons for all sliders. - All sliders present a continuous facade, mapped to discrete integer units under the hood. - All interesting volume events and state changes piped through one central helper for future routing. - VolumePanel is obsolete, still accessible via a sysprop if needed. Complete removal / garbage collection deferred until all needed functionality is ported over. Bug: 19260237 Change-Id: I6689de3e4d14ae666d3e8da302cc9da2d4d77b9b --- .../ic_volume_collapse_chevron_02_animation.xml | 25 +++++ .../ic_volume_collapse_rectangle_1_animation.xml | 26 +++++ .../ic_volume_collapse_rectangle_2_animation.xml | 26 +++++ .../anim/ic_volume_expand_chevron_01_animation.xml | 25 +++++ .../ic_volume_expand_rectangle_3_animation.xml | 26 +++++ .../ic_volume_expand_rectangle_4_animation.xml | 26 +++++ .../SystemUI/res/drawable/btn_borderless_rect.xml | 10 +- packages/SystemUI/res/drawable/ic_dnd.xml | 26 +++++ packages/SystemUI/res/drawable/ic_qs_minus.xml | 33 ++++--- packages/SystemUI/res/drawable/ic_qs_plus.xml | 33 ++++--- packages/SystemUI/res/drawable/ic_volume_alarm.xml | 26 +++++ .../SystemUI/res/drawable/ic_volume_alarm_mute.xml | 26 +++++ packages/SystemUI/res/drawable/ic_volume_bt.xml | 26 +++++ .../SystemUI/res/drawable/ic_volume_bt_mute.xml | 26 +++++ .../SystemUI/res/drawable/ic_volume_bt_sco.xml | 26 +++++ .../SystemUI/res/drawable/ic_volume_collapse.xml | 62 ++++++++++++ .../res/drawable/ic_volume_collapse_animation.xml | 29 ++++++ .../SystemUI/res/drawable/ic_volume_expand.xml | 62 ++++++++++++ .../res/drawable/ic_volume_expand_animation.xml | 29 ++++++ packages/SystemUI/res/drawable/ic_volume_media.xml | 26 +++++ .../SystemUI/res/drawable/ic_volume_media_mute.xml | 29 ++++++ .../SystemUI/res/drawable/ic_volume_remote.xml | 26 +++++ .../res/drawable/ic_volume_remote_mute.xml | 38 ++++++++ .../SystemUI/res/drawable/ic_volume_ringer.xml | 26 +++++ .../res/drawable/ic_volume_ringer_mute.xml | 26 +++++ .../res/drawable/ic_volume_ringer_vibrate.xml | 26 +++++ .../SystemUI/res/drawable/ic_volume_settings.xml | 26 +++++ .../SystemUI/res/drawable/ic_volume_system.xml | 32 ++++++ .../res/drawable/ic_volume_system_mute.xml | 35 +++++++ packages/SystemUI/res/drawable/ic_volume_voice.xml | 26 +++++ .../res/drawable/volume_dialog_background.xml | 22 +++++ ...ic_volume_collapse_animation_interpolator_0.xml | 17 ++++ .../ic_volume_expand_animation_interpolator_0.xml | 17 ++++ packages/SystemUI/res/layout/segmented_button.xml | 8 +- packages/SystemUI/res/layout/volume_dialog.xml | 50 ++++++++-- packages/SystemUI/res/layout/volume_dialog_row.xml | 64 ++++++++++++ .../SystemUI/res/layout/volume_panel_dialog.xml | 27 ++++++ .../SystemUI/res/layout/volume_text_footer.xml | 54 +++++++++++ packages/SystemUI/res/layout/volume_zen_footer.xml | 108 +++++++++++++++++++++ packages/SystemUI/res/layout/zen_mode_panel.xml | 4 +- packages/SystemUI/res/values/strings.xml | 7 +- packages/SystemUI/res/values/volume.xml | 87 +++++++++++++++++ 42 files changed, 1296 insertions(+), 53 deletions(-) create mode 100644 packages/SystemUI/res/anim/ic_volume_collapse_chevron_02_animation.xml create mode 100644 packages/SystemUI/res/anim/ic_volume_collapse_rectangle_1_animation.xml create mode 100644 packages/SystemUI/res/anim/ic_volume_collapse_rectangle_2_animation.xml create mode 100644 packages/SystemUI/res/anim/ic_volume_expand_chevron_01_animation.xml create mode 100644 packages/SystemUI/res/anim/ic_volume_expand_rectangle_3_animation.xml create mode 100644 packages/SystemUI/res/anim/ic_volume_expand_rectangle_4_animation.xml create mode 100644 packages/SystemUI/res/drawable/ic_dnd.xml create mode 100644 packages/SystemUI/res/drawable/ic_volume_alarm.xml create mode 100644 packages/SystemUI/res/drawable/ic_volume_alarm_mute.xml create mode 100644 packages/SystemUI/res/drawable/ic_volume_bt.xml create mode 100644 packages/SystemUI/res/drawable/ic_volume_bt_mute.xml create mode 100644 packages/SystemUI/res/drawable/ic_volume_bt_sco.xml create mode 100644 packages/SystemUI/res/drawable/ic_volume_collapse.xml create mode 100644 packages/SystemUI/res/drawable/ic_volume_collapse_animation.xml create mode 100644 packages/SystemUI/res/drawable/ic_volume_expand.xml create mode 100644 packages/SystemUI/res/drawable/ic_volume_expand_animation.xml create mode 100644 packages/SystemUI/res/drawable/ic_volume_media.xml create mode 100644 packages/SystemUI/res/drawable/ic_volume_media_mute.xml create mode 100644 packages/SystemUI/res/drawable/ic_volume_remote.xml create mode 100644 packages/SystemUI/res/drawable/ic_volume_remote_mute.xml create mode 100644 packages/SystemUI/res/drawable/ic_volume_ringer.xml create mode 100644 packages/SystemUI/res/drawable/ic_volume_ringer_mute.xml create mode 100644 packages/SystemUI/res/drawable/ic_volume_ringer_vibrate.xml create mode 100644 packages/SystemUI/res/drawable/ic_volume_settings.xml create mode 100644 packages/SystemUI/res/drawable/ic_volume_system.xml create mode 100644 packages/SystemUI/res/drawable/ic_volume_system_mute.xml create mode 100644 packages/SystemUI/res/drawable/ic_volume_voice.xml create mode 100644 packages/SystemUI/res/drawable/volume_dialog_background.xml create mode 100644 packages/SystemUI/res/interpolator/ic_volume_collapse_animation_interpolator_0.xml create mode 100644 packages/SystemUI/res/interpolator/ic_volume_expand_animation_interpolator_0.xml create mode 100644 packages/SystemUI/res/layout/volume_dialog_row.xml create mode 100644 packages/SystemUI/res/layout/volume_panel_dialog.xml create mode 100644 packages/SystemUI/res/layout/volume_text_footer.xml create mode 100644 packages/SystemUI/res/layout/volume_zen_footer.xml create mode 100644 packages/SystemUI/res/values/volume.xml (limited to 'packages/SystemUI/res') diff --git a/packages/SystemUI/res/anim/ic_volume_collapse_chevron_02_animation.xml b/packages/SystemUI/res/anim/ic_volume_collapse_chevron_02_animation.xml new file mode 100644 index 0000000..443f2a6 --- /dev/null +++ b/packages/SystemUI/res/anim/ic_volume_collapse_chevron_02_animation.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/anim/ic_volume_collapse_rectangle_1_animation.xml b/packages/SystemUI/res/anim/ic_volume_collapse_rectangle_1_animation.xml new file mode 100644 index 0000000..d82f670 --- /dev/null +++ b/packages/SystemUI/res/anim/ic_volume_collapse_rectangle_1_animation.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/anim/ic_volume_collapse_rectangle_2_animation.xml b/packages/SystemUI/res/anim/ic_volume_collapse_rectangle_2_animation.xml new file mode 100644 index 0000000..0bc66bd --- /dev/null +++ b/packages/SystemUI/res/anim/ic_volume_collapse_rectangle_2_animation.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/anim/ic_volume_expand_chevron_01_animation.xml b/packages/SystemUI/res/anim/ic_volume_expand_chevron_01_animation.xml new file mode 100644 index 0000000..e43e645 --- /dev/null +++ b/packages/SystemUI/res/anim/ic_volume_expand_chevron_01_animation.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/anim/ic_volume_expand_rectangle_3_animation.xml b/packages/SystemUI/res/anim/ic_volume_expand_rectangle_3_animation.xml new file mode 100644 index 0000000..9b575d8 --- /dev/null +++ b/packages/SystemUI/res/anim/ic_volume_expand_rectangle_3_animation.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/anim/ic_volume_expand_rectangle_4_animation.xml b/packages/SystemUI/res/anim/ic_volume_expand_rectangle_4_animation.xml new file mode 100644 index 0000000..6ae0fef --- /dev/null +++ b/packages/SystemUI/res/anim/ic_volume_expand_rectangle_4_animation.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/btn_borderless_rect.xml b/packages/SystemUI/res/drawable/btn_borderless_rect.xml index d640141..c0a89f9 100644 --- a/packages/SystemUI/res/drawable/btn_borderless_rect.xml +++ b/packages/SystemUI/res/drawable/btn_borderless_rect.xml @@ -1,5 +1,5 @@ - - - + android:color="?android:attr/colorControlHighlight" > + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_dnd.xml b/packages/SystemUI/res/drawable/ic_dnd.xml new file mode 100644 index 0000000..17ecf21 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_dnd.xml @@ -0,0 +1,26 @@ + + + + + + diff --git a/packages/SystemUI/res/drawable/ic_qs_minus.xml b/packages/SystemUI/res/drawable/ic_qs_minus.xml index 4722c9e..6a3410a 100644 --- a/packages/SystemUI/res/drawable/ic_qs_minus.xml +++ b/packages/SystemUI/res/drawable/ic_qs_minus.xml @@ -1,25 +1,26 @@ + android:height="24.0dp" + android:viewportHeight="48.0" + android:viewportWidth="48.0" + android:width="24.0dp" > - + android:pathData="M38.0,26.0L10.0,26.0l0.0,-4.0l28.0,0.0l0.0,4.0z" /> + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_qs_plus.xml b/packages/SystemUI/res/drawable/ic_qs_plus.xml index 17d74cf..393f51c 100644 --- a/packages/SystemUI/res/drawable/ic_qs_plus.xml +++ b/packages/SystemUI/res/drawable/ic_qs_plus.xml @@ -1,25 +1,26 @@ + android:height="24.0dp" + android:viewportHeight="48.0" + android:viewportWidth="48.0" + android:width="24.0dp" > - + android:pathData="M38.0,26.0L26.0,26.0l0.0,12.0l-4.0,0.0L22.0,26.0L10.0,26.0l0.0,-4.0l12.0,0.0L22.0,10.0l4.0,0.0l0.0,12.0l12.0,0.0l0.0,4.0z" /> + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_volume_alarm.xml b/packages/SystemUI/res/drawable/ic_volume_alarm.xml new file mode 100644 index 0000000..a8ca0d6 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_volume_alarm.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_volume_alarm_mute.xml b/packages/SystemUI/res/drawable/ic_volume_alarm_mute.xml new file mode 100644 index 0000000..8e2f083 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_volume_alarm_mute.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_volume_bt.xml b/packages/SystemUI/res/drawable/ic_volume_bt.xml new file mode 100644 index 0000000..bce407a --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_volume_bt.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_volume_bt_mute.xml b/packages/SystemUI/res/drawable/ic_volume_bt_mute.xml new file mode 100644 index 0000000..98a8137 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_volume_bt_mute.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_volume_bt_sco.xml b/packages/SystemUI/res/drawable/ic_volume_bt_sco.xml new file mode 100644 index 0000000..71df4d3 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_volume_bt_sco.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_volume_collapse.xml b/packages/SystemUI/res/drawable/ic_volume_collapse.xml new file mode 100644 index 0000000..dc6d301 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_volume_collapse.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_volume_collapse_animation.xml b/packages/SystemUI/res/drawable/ic_volume_collapse_animation.xml new file mode 100644 index 0000000..5c482bc --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_volume_collapse_animation.xml @@ -0,0 +1,29 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_volume_expand.xml b/packages/SystemUI/res/drawable/ic_volume_expand.xml new file mode 100644 index 0000000..a60623f --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_volume_expand.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_volume_expand_animation.xml b/packages/SystemUI/res/drawable/ic_volume_expand_animation.xml new file mode 100644 index 0000000..ae2d7e4 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_volume_expand_animation.xml @@ -0,0 +1,29 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_volume_media.xml b/packages/SystemUI/res/drawable/ic_volume_media.xml new file mode 100644 index 0000000..97089f1 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_volume_media.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_volume_media_mute.xml b/packages/SystemUI/res/drawable/ic_volume_media_mute.xml new file mode 100644 index 0000000..beb806c --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_volume_media_mute.xml @@ -0,0 +1,29 @@ + + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_volume_remote.xml b/packages/SystemUI/res/drawable/ic_volume_remote.xml new file mode 100644 index 0000000..b363178 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_volume_remote.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_volume_remote_mute.xml b/packages/SystemUI/res/drawable/ic_volume_remote_mute.xml new file mode 100644 index 0000000..5f39ad7 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_volume_remote_mute.xml @@ -0,0 +1,38 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_volume_ringer.xml b/packages/SystemUI/res/drawable/ic_volume_ringer.xml new file mode 100644 index 0000000..c566d5a --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_volume_ringer.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_volume_ringer_mute.xml b/packages/SystemUI/res/drawable/ic_volume_ringer_mute.xml new file mode 100644 index 0000000..0c20361 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_volume_ringer_mute.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_volume_ringer_vibrate.xml b/packages/SystemUI/res/drawable/ic_volume_ringer_vibrate.xml new file mode 100644 index 0000000..38b3234 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_volume_ringer_vibrate.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_volume_settings.xml b/packages/SystemUI/res/drawable/ic_volume_settings.xml new file mode 100644 index 0000000..9f79b5a --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_volume_settings.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_volume_system.xml b/packages/SystemUI/res/drawable/ic_volume_system.xml new file mode 100644 index 0000000..ccd8e18 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_volume_system.xml @@ -0,0 +1,32 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_volume_system_mute.xml b/packages/SystemUI/res/drawable/ic_volume_system_mute.xml new file mode 100644 index 0000000..dfcb655 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_volume_system_mute.xml @@ -0,0 +1,35 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_volume_voice.xml b/packages/SystemUI/res/drawable/ic_volume_voice.xml new file mode 100644 index 0000000..133253e --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_volume_voice.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/volume_dialog_background.xml b/packages/SystemUI/res/drawable/volume_dialog_background.xml new file mode 100644 index 0000000..f09c01b --- /dev/null +++ b/packages/SystemUI/res/drawable/volume_dialog_background.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/interpolator/ic_volume_collapse_animation_interpolator_0.xml b/packages/SystemUI/res/interpolator/ic_volume_collapse_animation_interpolator_0.xml new file mode 100644 index 0000000..c3930e4 --- /dev/null +++ b/packages/SystemUI/res/interpolator/ic_volume_collapse_animation_interpolator_0.xml @@ -0,0 +1,17 @@ + + diff --git a/packages/SystemUI/res/interpolator/ic_volume_expand_animation_interpolator_0.xml b/packages/SystemUI/res/interpolator/ic_volume_expand_animation_interpolator_0.xml new file mode 100644 index 0000000..c3930e4 --- /dev/null +++ b/packages/SystemUI/res/interpolator/ic_volume_expand_animation_interpolator_0.xml @@ -0,0 +1,17 @@ + + diff --git a/packages/SystemUI/res/layout/segmented_button.xml b/packages/SystemUI/res/layout/segmented_button.xml index e92f310..2f84bab 100644 --- a/packages/SystemUI/res/layout/segmented_button.xml +++ b/packages/SystemUI/res/layout/segmented_button.xml @@ -19,10 +19,8 @@ android:layout_height="wrap_content" android:layout_marginStart="@dimen/segmented_button_spacing" android:layout_weight="1" - android:gravity="center_horizontal|top" + android:gravity="center" android:textColor="@color/segmented_button_text_selector" android:background="@drawable/btn_borderless_rect" - android:textAppearance="@style/TextAppearance.QS.SegmentedButton" - android:minHeight="64dp" - android:paddingTop="11dp" - android:drawablePadding="6dp" /> + android:textAppearance="@style/TextAppearance.Volume.ZenSwitchSummary" + android:minHeight="48dp" /> diff --git a/packages/SystemUI/res/layout/volume_dialog.xml b/packages/SystemUI/res/layout/volume_dialog.xml index 3765fe8..7586227 100644 --- a/packages/SystemUI/res/layout/volume_dialog.xml +++ b/packages/SystemUI/res/layout/volume_dialog.xml @@ -1,6 +1,5 @@ - - + android:layout_marginTop="4dp" + android:background="@drawable/volume_dialog_background" + android:translationZ="4dp" > - + - \ No newline at end of file + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..af27cc4 --- /dev/null +++ b/packages/SystemUI/res/layout/volume_dialog_row.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/layout/volume_panel_dialog.xml b/packages/SystemUI/res/layout/volume_panel_dialog.xml new file mode 100644 index 0000000..700102f --- /dev/null +++ b/packages/SystemUI/res/layout/volume_panel_dialog.xml @@ -0,0 +1,27 @@ + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/layout/volume_text_footer.xml b/packages/SystemUI/res/layout/volume_text_footer.xml new file mode 100644 index 0000000..7436488 --- /dev/null +++ b/packages/SystemUI/res/layout/volume_text_footer.xml @@ -0,0 +1,54 @@ + + + + + +