fix a11y issue where scroll next can still be triggered on final page in
RecentsView

Bug: 151450844
Test: manual verification with following steps
1. launch a few apps
2. swipe up from bottom to bring up RecentsView
3. enable talkback
4. perform a scroll next a11y gesture (without lifting finger, swipe
right then left)
5. verify nothing happens (as opposed to pushing the page back a little)

Change-Id: I6dea2559592bdaa7227a2e12ce0565d6d7b7f4a1
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
index 873c672..2066d52 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
@@ -2111,6 +2111,12 @@
         return mClearAllButton;
     }
 
+    @Override
+    protected boolean onOverscroll(int amount) {
+        // overscroll should only be accepted on -1 direction (for clear all button)
+        if ((amount > 0 && !mIsRtl) || (amount < 0 && mIsRtl)) return false;
+        return super.onOverscroll(amount);
+    }
 
     /**
      * @return How many pixels the running task is offset on the currently laid out dominant axis.