Merge "Prevent two overlapping long press actions." into ub-launcher3-rvc-dev am: 2a14c83515
Change-Id: Ic94efa35896914bb9f546458ae276d7214df1f24
This commit is contained in:
commit
a96a0c0978
|
@ -113,7 +113,10 @@ public class CheckLongPressHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void triggerLongPress() {
|
private void triggerLongPress() {
|
||||||
if ((mView.getParent() != null) && mView.hasWindowFocus() && !mHasPerformedLongPress) {
|
if ((mView.getParent() != null)
|
||||||
|
&& mView.hasWindowFocus()
|
||||||
|
&& (!mView.isPressed() || mListener == null)
|
||||||
|
&& !mHasPerformedLongPress) {
|
||||||
boolean handled;
|
boolean handled;
|
||||||
if (mListener != null) {
|
if (mListener != null) {
|
||||||
handled = mListener.onLongClick(mView);
|
handled = mListener.onLongClick(mView);
|
||||||
|
|
Loading…
Reference in New Issue