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

Commit 6af8e145 authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Fix bugs when transitioning out of touch mode"

parents b06a68b9 51a6bee6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2241,7 +2241,8 @@ public final class ViewRoot extends Handler implements ViewParent,
     *   leaving touch mode alone is considered the event).
     */
    private boolean checkForLeavingTouchModeAndConsume(KeyEvent event) {
        if (event.getAction() != KeyEvent.ACTION_DOWN) {
        final int action = event.getAction();
        if (action != KeyEvent.ACTION_DOWN && action != KeyEvent.ACTION_MULTIPLE) {
            return false;
        }
        if ((event.getFlags()&KeyEvent.FLAG_KEEP_TOUCH_MODE) != 0) {
+5 −5
Original line number Diff line number Diff line
@@ -1980,6 +1980,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
            if (touchMode == TOUCH_MODE_OVERSCROLL || touchMode == TOUCH_MODE_OVERFLING) {
                if (mFlingRunnable != null) {
                    mFlingRunnable.endFling();
                }

                if (mScrollY != 0) {
                    mScrollY = 0;
@@ -1987,7 +1988,6 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
                }
            }
        }
        }
        mLastTouchMode = isInTouchMode ? TOUCH_MODE_ON : TOUCH_MODE_OFF;
    }