summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorvadimt <vadimt@google.com>2019-05-09 14:12:18 -0700
committervadimt <vadimt@google.com>2019-05-09 15:48:32 -0700
commit24d31d4b6e21155a2ca2608f7acf803e6e14c5a1 (patch)
treeaeed30477cdc8d891c79f394a8e53e66f16fddf1 /src
parent75d2bcbe41bb3a671bfba2cacb72455247053f17 (diff)
downloadandroid_packages_apps_Trebuchet-24d31d4b6e21155a2ca2608f7acf803e6e14c5a1.tar.gz
android_packages_apps_Trebuchet-24d31d4b6e21155a2ca2608f7acf803e6e14c5a1.tar.bz2
android_packages_apps_Trebuchet-24d31d4b6e21155a2ca2608f7acf803e6e14c5a1.zip
Disabling updating All Apps during a long-press recognition
This is supposed to eliminate test flakes in the lab. When an app gets updated while all apps is opened, all-apps will be re-laid-out. If the layout happens while we are recognizing a long-press on an app icon in all Apps, the long-press won't be recognized. In the lab, this happened so frequently that it caused considerable flakiness. Even after we started running tests in airplane mode, this still keeps happening. The bug refers an example with airplane mode on. The fix will be also mildly beneficial for users. Bug: 132177321 Change-Id: Ie7c7473fe94b8af83f04cd719286bae69e2d9de0
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/allapps/AllAppsContainerView.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java
index e2a5160af..41252aab5 100644
--- a/src/com/android/launcher3/allapps/AllAppsContainerView.java
+++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java
@@ -604,4 +604,18 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
return super.performAccessibilityAction(action, arguments);
}
+
+ @Override
+ public boolean dispatchTouchEvent(MotionEvent ev) {
+ switch (ev.getActionMasked()) {
+ case MotionEvent.ACTION_DOWN:
+ mAllAppsStore.setDeferUpdates(true);
+ break;
+ case MotionEvent.ACTION_UP:
+ case MotionEvent.ACTION_CANCEL:
+ mAllAppsStore.setDeferUpdates(false);
+ break;
+ }
+ return super.dispatchTouchEvent(ev);
+ }
}