From 9c5a4e770c727f5f9d8918c2c0a4692377293f96 Mon Sep 17 00:00:00 2001 From: Fabian Kozynski Date: Tue, 25 Jan 2022 12:01:26 -0500 Subject: [PATCH] Fix focus after moving After moving, we were setting accessibility action back to NONE, so the focus ended up being cleared from the tile that had just moved. Remove that and instead just make sure that focus is cleared just when we are resetting. Test: manual Fixes: 216037855 Change-Id: I6b7c7c20f52b5cfa40a0b4a671c7f150816a5e66 --- .../src/com/android/systemui/qs/customize/TileAdapter.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java index d3bad167b660d..90cf92a6543dc 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java +++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java @@ -181,6 +181,7 @@ public class TileAdapter extends RecyclerView.Adapter implements TileSta } private void clearAccessibilityState() { + mNeedsFocus = false; if (mAccessibilityAction == ACTION_ADD) { // Remove blank tile from last spot mTiles.remove(--mEditIndex); @@ -415,9 +416,6 @@ public class TileAdapter extends RecyclerView.Adapter implements TileSta int oldLeft, int oldTop, int oldRight, int oldBottom) { holder.mTileView.removeOnLayoutChangeListener(this); holder.mTileView.requestAccessibilityFocus(); - if (mAccessibilityAction == ACTION_NONE) { - holder.mTileView.clearAccessibilityFocus(); - } } }); mNeedsFocus = false;