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

Commit 04b60950 authored by Andrei Stingaceanu's avatar Andrei Stingaceanu Committed by Android (Google) Code Review
Browse files

Merge "TextView longpress 2 haptic feedback fix" into oc-mr1-dev

parents 1b0ca089 4303f225
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -10875,6 +10875,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
    @Override
    public boolean performLongClick() {
        boolean handled = false;
        boolean performedHapticFeedback = false;

        if (mEditor != null) {
            mEditor.mIsBeingLongClicked = true;
@@ -10882,6 +10883,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener

        if (super.performLongClick()) {
            handled = true;
            performedHapticFeedback = true;
        }

        if (mEditor != null) {
@@ -10890,7 +10892,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
        }

        if (handled) {
            if (!performedHapticFeedback) {
              performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
            }
            if (mEditor != null) mEditor.mDiscardNextActionUp = true;
        } else {
            MetricsLogger.action(