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

Commit 76b0a6b2 authored by Winson Chung's avatar Winson Chung Committed by Automerger Merge Worker
Browse files

Merge "Remove usage of raw event coordinates for touch slop calculation" into...

Merge "Remove usage of raw event coordinates for touch slop calculation" into tm-dev am: 3777edc2 am: f501bd56 am: 704a545f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18322260



Change-Id: I031c8319db5d035a7decf1b8342a0136a68d4b92
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents f32f8b0d 704a545f
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -273,9 +273,8 @@ public class KeyButtonView extends ImageView implements ButtonInterface {
                mLongClicked = false;
                setPressed(true);

                // Use raw X and Y to detect gestures in case a parent changes the x and y values
                mTouchDownX = (int) ev.getRawX();
                mTouchDownY = (int) ev.getRawY();
                mTouchDownX = (int) ev.getX();
                mTouchDownY = (int) ev.getY();
                if (mCode != KEYCODE_UNKNOWN) {
                    sendEvent(KeyEvent.ACTION_DOWN, 0, mDownTime);
                } else {
@@ -289,8 +288,8 @@ public class KeyButtonView extends ImageView implements ButtonInterface {
                postDelayed(mCheckLongPress, ViewConfiguration.getLongPressTimeout());
                break;
            case MotionEvent.ACTION_MOVE:
                x = (int)ev.getRawX();
                y = (int)ev.getRawY();
                x = (int) ev.getX();
                y = (int) ev.getY();

                float slop = QuickStepContract.getQuickStepTouchSlopPx(getContext());
                if (Math.abs(x - mTouchDownX) > slop || Math.abs(y - mTouchDownY) > slop) {