From bdae57c1579dfd6496c06bdaaab329d3cf4e0c46 Mon Sep 17 00:00:00 2001 From: Schneider Victor-tulias Date: Tue, 10 Oct 2023 11:16:54 -0400 Subject: [PATCH] Fix janky Alt+Tab through overview animation Flag: not needed Fixes: 282172884 Test: used alt+tab in overview; also launched overview through keyboard quick switch view Change-Id: I3d1e54cda317ee8f8d2b2d698480cd3ca01dfc85 --- .../src/com/android/quickstep/views/RecentsView.java | 7 +++++++ src/com/android/launcher3/PagedView.java | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 825c0ae3f0..5180ce893e 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -5975,6 +5975,13 @@ public abstract class RecentsView remoteTargetHandle.getTaskViewSimulator().setScroll(getScrollOffset())); diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java index 5ce88a3e85..f355ae7128 100644 --- a/src/com/android/launcher3/PagedView.java +++ b/src/com/android/launcher3/PagedView.java @@ -1573,7 +1573,9 @@ public abstract class PagedView extends ViewGrou @Override public void requestChildFocus(View child, View focused) { super.requestChildFocus(child, focused); - + if (!shouldHandleRequestChildFocus()) { + return; + } // In case the device is controlled by a controller, mCurrentPage isn't updated properly // which results in incorrect navigation int nextPage = getNextPage(); @@ -1587,6 +1589,10 @@ public abstract class PagedView extends ViewGrou } } + protected boolean shouldHandleRequestChildFocus() { + return true; + } + public int getDestinationPage() { return getDestinationPage(mOrientationHandler.getPrimaryScroll(this)); }