Merge "Prevent two overlapping long press actions." into ub-launcher3-rvc-dev

This commit is contained in:
TreeHugger Robot
2020-04-16 22:25:34 +00:00
committed by Android (Google) Code Review
@@ -113,7 +113,10 @@ public class CheckLongPressHelper {
}
private void triggerLongPress() {
if ((mView.getParent() != null) && mView.hasWindowFocus() && !mHasPerformedLongPress) {
if ((mView.getParent() != null)
&& mView.hasWindowFocus()
&& (!mView.isPressed() || mListener == null)
&& !mHasPerformedLongPress) {
boolean handled;
if (mListener != null) {
handled = mListener.onLongClick(mView);