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

Commit 51a6bee6 authored by Adam Powell's avatar Adam Powell
Browse files

Fix bugs when transitioning out of touch mode

Change-Id: I56cbac17fba500871af839a87d746ea8e1fd5d0f
parent 4aa44192
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;
    }