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
commit 2a14c83515
1 changed files with 4 additions and 1 deletions

View File

@ -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);