Some test fixes where default user is assumed to be user 0
CheckLongPressHelper: Cancelling view longpress which inturn also cancels self
This ensures that long press is properly cancelled if the default timeout for system longpress is same as ours
Bug: 379777736
Bug: 379807782
Bug: 379805363
Bug: 379805788
Bug: 379777734
Bug: 379774350
Flag: EXEMPT bugfix
Test: Presubmit
Change-Id: Ic4d9d6c4f79325a5d7ab98eafa1c86db4c2e67a5
diff --git a/src/com/android/launcher3/CheckLongPressHelper.java b/src/com/android/launcher3/CheckLongPressHelper.java
index 3e4e96b..e9cd16c 100644
--- a/src/com/android/launcher3/CheckLongPressHelper.java
+++ b/src/com/android/launcher3/CheckLongPressHelper.java
@@ -151,6 +151,8 @@
handled = mView.performLongClick();
}
if (handled) {
+ // Cancel any default long-press action on the view
+ mView.cancelLongPress();
mView.setPressed(false);
mHasPerformedLongPress = true;
}