commit | 1e6bf12fdb2cefcbe173d74a3db54aa06421bc5b | [log] [tgz] |
---|---|---|
author | Pat Manning <patmanning@google.com> | Wed Mar 13 11:59:19 2024 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Mar 14 23:58:12 2024 +0000 |
tree | 0a50e438dd71329b156e4e3b4ff49f2d9acf4bf1 | |
parent | 2e64c71a2d56efb5b04ffe74c95479c1b7970fd8 [diff] |
Set next page immediately on subsequent arrow/tab presses when navigating overivew. This allows the user to scroll as quickly as they want. Fix: 328749622 Test: manual Flag: NONE (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a9a11b47c3bff4d3ec4a4f300e12895d3235fe95) Merged-In: I493841f11407e6fb9f15fd90b5a5e55fa4ed3ad3 Change-Id: I493841f11407e6fb9f15fd90b5a5e55fa4ed3ad3
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index c333545..1b2be4a 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -4136,10 +4136,10 @@ private boolean snapToPageRelative(int delta, boolean cycle, @TaskGridNavHelper.TASK_NAV_DIRECTION int direction) { - // Ignore grid page snap events while scroll animations are running, otherwise the next - // page gets set before the animation finishes and can cause jumps. + // Set next page if scroll animation is still running, otherwise cannot snap to the + // next page on successive key presses. Setting the current page aborts the scroll. if (!mScroller.isFinished()) { - return true; + setCurrentPage(getNextPage()); } int pageCount = getPageCount(); if (pageCount == 0) {