From 5358644b40d8956f475d6bc26d54885406ee03e6 Mon Sep 17 00:00:00 2001 From: Michal Brzezinski Date: Mon, 17 Apr 2023 10:50:51 +0100 Subject: [PATCH] Removing "focusable" from tile_page in QS Having focusable set to true was sometimes causing bug in a11y that after toggling dark theme tile, all tiles were read. This happens consistently in some rare device states (not sure what's triggering that state) but never happens otherwise. Bug occurs when tile_page sometimes receives a11y event TYPE_VIEW_FOCUSED and reads all of its content - that is child tiles. I don't see any reason why tile_page is focusable as it's not available when going throgh shade with Talkback. Test: manual on device in that "rare" state: turn on Talkback -> open shade and toggle "Dark theme" tile a few times -> see all tiles are not read after toggling Fixes: 278181244 Change-Id: I080b3729ba977df89a105a95656d260a662eb7f0 --- packages/SystemUI/res/layout/qs_paged_page.xml | 1 + packages/SystemUI/src/com/android/systemui/qs/TileLayout.java | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/res/layout/qs_paged_page.xml b/packages/SystemUI/res/layout/qs_paged_page.xml index c366ceb4c1909..822b496c3aa2a 100644 --- a/packages/SystemUI/res/layout/qs_paged_page.xml +++ b/packages/SystemUI/res/layout/qs_paged_page.xml @@ -21,5 +21,6 @@ android:layout_height="match_parent" android:paddingStart="@dimen/qs_tiles_page_horizontal_margin" android:paddingEnd="@dimen/qs_tiles_page_horizontal_margin" + android:focusable="false" android:clipChildren="false" android:clipToPadding="false" /> diff --git a/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java b/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java index 7ee4047566339..269a158c6b87c 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java +++ b/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java @@ -55,7 +55,6 @@ public class TileLayout extends ViewGroup implements QSTileLayout { public TileLayout(Context context, @Nullable AttributeSet attrs) { super(context, attrs); - setFocusableInTouchMode(true); mLessRows = ((Settings.System.getInt(context.getContentResolver(), "qs_less_rows", 0) != 0) || useQsMediaPlayer(context)); updateResources();