From 0b28a7b48d268054c03ccff04771bb3c2a067191 Mon Sep 17 00:00:00 2001 From: Hawkwood Glazier Date: Thu, 17 Mar 2022 16:36:57 +0000 Subject: [PATCH] Add Play/Pause Icon & Background Animations Fixes: 220876706 Test: Manual using video in chrome Change-Id: I3100ba553554e2c6fdd4c3a8ed6a4d8bebb18d0a --- .../SystemUI/res/drawable/ic_media_pause.xml | 117 ++++++++++++++---- .../res/drawable/ic_media_pause_container.xml | 73 +++++++++++ .../SystemUI/res/drawable/ic_media_play.xml | 117 ++++++++++++++---- .../res/drawable/ic_media_play_container.xml | 68 ++++++++++ .../res/layout/media_session_view.xml | 17 ++- packages/SystemUI/res/values/styles.xml | 5 +- .../systemui/media/MediaControlPanel.java | 89 ++++++++++++- .../com/android/systemui/media/MediaData.kt | 5 +- .../systemui/media/MediaDataManager.kt | 36 +++--- .../systemui/media/MediaControlPanelTest.kt | 101 ++++++++++++--- 10 files changed, 531 insertions(+), 97 deletions(-) create mode 100644 packages/SystemUI/res/drawable/ic_media_pause_container.xml create mode 100644 packages/SystemUI/res/drawable/ic_media_play_container.xml diff --git a/packages/SystemUI/res/drawable/ic_media_pause.xml b/packages/SystemUI/res/drawable/ic_media_pause.xml index 1f4b2cf6455ea..0009b6cf99492 100644 --- a/packages/SystemUI/res/drawable/ic_media_pause.xml +++ b/packages/SystemUI/res/drawable/ic_media_pause.xml @@ -1,26 +1,91 @@ - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_media_pause_container.xml b/packages/SystemUI/res/drawable/ic_media_pause_container.xml new file mode 100644 index 0000000000000..b92e63575b950 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_media_pause_container.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_media_play.xml b/packages/SystemUI/res/drawable/ic_media_play.xml index 0eac1ad12c1d3..eb32470050a5f 100644 --- a/packages/SystemUI/res/drawable/ic_media_play.xml +++ b/packages/SystemUI/res/drawable/ic_media_play.xml @@ -1,26 +1,91 @@ - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_media_play_container.xml b/packages/SystemUI/res/drawable/ic_media_play_container.xml new file mode 100644 index 0000000000000..2fc9fc88a4fde --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_media_play_container.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/layout/media_session_view.xml b/packages/SystemUI/res/layout/media_session_view.xml index 111735623bc2f..e1f3eca3fd63d 100644 --- a/packages/SystemUI/res/layout/media_session_view.xml +++ b/packages/SystemUI/res/layout/media_session_view.xml @@ -145,8 +145,7 @@ android:layout_width="48dp" android:layout_height="48dp" android:layout_marginStart="@dimen/qs_media_padding" - android:layout_marginEnd="@dimen/qs_media_padding" - /> + android:layout_marginEnd="@dimen/qs_media_padding" /> @drawable/qs_media_light_source ?android:attr/textColorPrimary - @anim/media_button_state_list_animator 12dp 12dp 12dp @@ -629,6 +628,10 @@ @color/media_player_solid_button_bg + +