Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a01f243c authored by Priyank Singh's avatar Priyank Singh
Browse files

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)
parent 738c9823
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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