From c1be417be642a07ed5c65af39092df53abca065c Mon Sep 17 00:00:00 2001 From: Eghosa Ewansiha-Vlachavas Date: Fri, 12 May 2023 10:01:24 +0000 Subject: [PATCH] Update reachability UI styles to be decendants of Theme.AppCompat Letterbox reachability uses AppCompatTextView's which requires its themes to be descendants of Theme.AppCompat or Theme.AppCompat itself and produces a warning if else. To prevent this warning from being triggered, set the reachability UI styles to be children of Theme.AppCompat. Also update the reachability UI layout to declare styles using 'android:theme' instead of 'style' so ThemeUtils theme check can locate them. Remove 'android:visibility="invisible" from style and apply to components individually and remove 'android:contentDescription' as it is not needed. Fix: 281804869 Test: atest WMShellUnitTests:ReachabilityEduLayoutTest atest WMShellUnitTests:LetterboxEduWindowManagerTest atest WMShellUnitTests:ReachabilityEduWindowManagerTest Change-Id: I3b62f1c5ccaa748326030b8c2812fb5fe7e5dfe5 --- .../res/layout/reachability_ui_layout.xml | 19 ++++++++++--------- .../Shell/res/values-night/styles.xml | 4 +--- .../WindowManager/Shell/res/values/styles.xml | 4 +--- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/libs/WindowManager/Shell/res/layout/reachability_ui_layout.xml b/libs/WindowManager/Shell/res/layout/reachability_ui_layout.xml index 49491a7b572c3..69b339ad77fba 100644 --- a/libs/WindowManager/Shell/res/layout/reachability_ui_layout.xml +++ b/libs/WindowManager/Shell/res/layout/reachability_ui_layout.xml @@ -20,47 +20,48 @@ android:focusable="false" android:focusableInTouchMode="false" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:theme="@style/ReachabilityEduHandLayout"> + android:layout_height="wrap_content" + android:visibility="invisible"/> + android:layout_height="wrap_content" + android:visibility="invisible"/> + android:layout_height="wrap_content" + android:visibility="invisible"/> + android:layout_height="wrap_content" + android:visibility="invisible"/> diff --git a/libs/WindowManager/Shell/res/values-night/styles.xml b/libs/WindowManager/Shell/res/values-night/styles.xml index 758c99db7bb47..4871f7ada6272 100644 --- a/libs/WindowManager/Shell/res/values-night/styles.xml +++ b/libs/WindowManager/Shell/res/values-night/styles.xml @@ -17,12 +17,10 @@ - -