Merge "Prevent two overlapping long press actions." into ub-launcher3-rvc-dev am: 2a14c83515

Change-Id: Ic94efa35896914bb9f546458ae276d7214df1f24
This commit is contained in:
TreeHugger Robot 2020-04-16 22:38:56 +00:00 committed by Automerger Merge Worker
commit a96a0c0978
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);