Merge "TextView longpress 2 haptic feedback fix" into oc-mr1-dev
am: 04b6095082
Change-Id: I1467a1af9a9bc0c23435b1e3b34a4ac257b9244c
This commit is contained in:
@@ -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) {
|
||||
performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
|
||||
if (!performedHapticFeedback) {
|
||||
performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
|
||||
}
|
||||
if (mEditor != null) mEditor.mDiscardNextActionUp = true;
|
||||
} else {
|
||||
MetricsLogger.action(
|
||||
|
||||
Reference in New Issue
Block a user