From 23552deaa4971fd92943b415f09cd4c7d3a6faee Mon Sep 17 00:00:00 2001 From: Caitlin Shkuratov Date: Wed, 14 Dec 2022 15:37:31 +0000 Subject: [PATCH] [Media] Update constraints to fix scrubbing. The old constraint strategy broke when our CosntraintLayout library was upgraded, so this updates it to not use double references. Videos are attached in the bug. Fixes: 262241809 Test: Scrub on a media notif -> verify the UI still works Test: verify media session actions layout in expanded and collapsed mode Test: verify old media generic actions layout in expanded mode (collapsed mode has existing bug: b/262562516 Test: verified in RTL Change-Id: Id60983659228384c654951c10c6e9e16eeb844df --- .../SystemUI/res/xml/media_session_expanded.xml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/packages/SystemUI/res/xml/media_session_expanded.xml b/packages/SystemUI/res/xml/media_session_expanded.xml index 64c2ef1fc9156..7de0a5e0e8c4a 100644 --- a/packages/SystemUI/res/xml/media_session_expanded.xml +++ b/packages/SystemUI/res/xml/media_session_expanded.xml @@ -88,20 +88,18 @@ The chain is set to "spread" so that the progress bar can be weighted to fill any empty space. --> @@ -109,7 +107,7 @@ android:id="@+id/media_progress_bar" android:layout_width="0dp" android:layout_height="48dp" - app:layout_constraintLeft_toRightOf="@id/actionPrev" + app:layout_constraintLeft_toRightOf="@id/media_scrubbing_elapsed_time" app:layout_constraintRight_toLeftOf="@id/actionNext" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintHorizontal_weight="1" /> @@ -118,7 +116,6 @@ android:id="@+id/actionNext" android:layout_width="48dp" android:layout_height="48dp" - app:layout_constraintLeft_toRightOf="@id/media_progress_bar" app:layout_constraintRight_toLeftOf="@id/media_scrubbing_total_time" app:layout_constraintBottom_toBottomOf="parent" /> @@ -126,7 +123,6 @@ android:id="@+id/media_scrubbing_total_time" android:layout_width="48dp" android:layout_height="48dp" - app:layout_constraintLeft_toRightOf="@id/actionNext" app:layout_constraintRight_toLeftOf="@id/action0" app:layout_constraintBottom_toBottomOf="parent" /> @@ -134,7 +130,6 @@ android:id="@+id/action0" android:layout_width="48dp" android:layout_height="48dp" - app:layout_constraintLeft_toRightOf="@id/media_scrubbing_total_time" app:layout_constraintRight_toLeftOf="@id/action1" app:layout_constraintBottom_toBottomOf="parent" /> @@ -142,7 +137,6 @@ android:id="@+id/action1" android:layout_width="48dp" android:layout_height="48dp" - app:layout_constraintLeft_toRightOf="@id/action0" app:layout_constraintRight_toLeftOf="@id/action2" app:layout_constraintBottom_toBottomOf="parent" /> @@ -150,7 +144,6 @@ android:id="@+id/action2" android:layout_width="48dp" android:layout_height="48dp" - app:layout_constraintLeft_toRightOf="@id/action1" app:layout_constraintRight_toLeftOf="@id/action3" app:layout_constraintBottom_toBottomOf="parent" /> @@ -158,7 +151,6 @@ android:id="@+id/action3" android:layout_width="48dp" android:layout_height="48dp" - app:layout_constraintLeft_toRightOf="@id/action2" app:layout_constraintRight_toLeftOf="@id/action4" app:layout_constraintBottom_toBottomOf="parent" /> @@ -166,7 +158,6 @@ android:id="@+id/action4" android:layout_width="48dp" android:layout_height="48dp" - app:layout_constraintLeft_toRightOf="@id/action3" app:layout_constraintRight_toRightOf="parent" app:layout_constraintBottom_toBottomOf="parent" />