From a01f243c2a16a3187ab923c381df9433fb61f1e5 Mon Sep 17 00:00:00 2001 From: Priyank Singh Date: Fri, 17 May 2019 16:33:57 -0700 Subject: [PATCH] Fling should only be allowed when touched the view from bottom of the list Bug:133168136 Test: Manual Change-Id: I5ccb58b1c8f9b04bb9bead25b12373ce33b6ffdc (cherry picked from commit 61bf685b7a1fa41944cd92e68a4b03af79ad86a8) --- .../com/android/systemui/statusbar/car/CarStatusBar.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java b/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java index 9b6ab06c47083..a07b92a54a115 100644 --- a/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java +++ b/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java @@ -1095,9 +1095,6 @@ public class CarStatusBar extends StatusBar implements @Override public boolean onScroll(MotionEvent event1, MotionEvent event2, float distanceX, float distanceY) { - if (!mNotificationListAtBottomAtTimeOfTouch && !mNotificationListAtBottom) { - return false; - } // should not clip while scroll to the bottom of the list. if (!mNotificationListAtBottomAtTimeOfTouch) { return false; @@ -1134,7 +1131,8 @@ public class CarStatusBar extends StatusBar implements @Override public boolean onFling(MotionEvent event1, MotionEvent event2, float velocityX, float velocityY) { - if (!mNotificationListAtBottomAtTimeOfTouch && !mNotificationListAtBottom) { + // should not fling if the touch does not start when view is at the bottom of the list. + if (!mNotificationListAtBottomAtTimeOfTouch) { return false; } if (Math.abs(event1.getX() - event2.getX()) > SWIPE_MAX_OFF_PATH