summaryrefslogtreecommitdiffstats
path: root/quickstep
diff options
context:
space:
mode:
authorvadimt <vadimt@google.com>2019-05-23 11:30:09 -0700
committervadimt <vadimt@google.com>2019-05-23 12:36:32 -0700
commit0c1ed7cb4cf6f5e46211731bb243bdb308c1eaac (patch)
treec3a19d8e2b54f4a30414c3e84b5719fe4d65ab34 /quickstep
parent9fb137bb7312b22dc58fca5af81ade54d01b3eac (diff)
downloadandroid_packages_apps_Trebuchet-0c1ed7cb4cf6f5e46211731bb243bdb308c1eaac.tar.gz
android_packages_apps_Trebuchet-0c1ed7cb4cf6f5e46211731bb243bdb308c1eaac.tar.bz2
android_packages_apps_Trebuchet-0c1ed7cb4cf6f5e46211731bb243bdb308c1eaac.zip
Quick patch for PredictionUiStateManager.applyState interrupting allapps
Constructor of PredictionUiStateManager posts an action in 5 sec, which may interfere with the process of opening all apps. Waiting until the posted action happens. Hopefully this will fix massive flakes. Bug: 131854153 Change-Id: I6544eae1a3b063c03e78185826c05a76add1f71b
Diffstat (limited to 'quickstep')
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionUiStateManager.java3
-rw-r--r--quickstep/tests/src/com/android/quickstep/AppPredictionsUITests.java3
2 files changed, 6 insertions, 0 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionUiStateManager.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionUiStateManager.java
index 6dad9afe5..28ecce07e 100644
--- a/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionUiStateManager.java
+++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionUiStateManager.java
@@ -197,7 +197,10 @@ public class PredictionUiStateManager implements OnGlobalLayoutListener, ItemInf
}
}
+ public boolean mDebugHadStateUpdate;
+
private void updatePredictionStateAfterCallback() {
+ mDebugHadStateUpdate = true;
boolean validResults = false;
for (List l : mPredictionServicePredictions) {
validResults |= l != null && !l.isEmpty();
diff --git a/quickstep/tests/src/com/android/quickstep/AppPredictionsUITests.java b/quickstep/tests/src/com/android/quickstep/AppPredictionsUITests.java
index 5e20e5643..c6f7544fe 100644
--- a/quickstep/tests/src/com/android/quickstep/AppPredictionsUITests.java
+++ b/quickstep/tests/src/com/android/quickstep/AppPredictionsUITests.java
@@ -70,6 +70,9 @@ public class AppPredictionsUITests extends AbstractQuickStepTest {
AppLaunchTracker.INSTANCE.initializeForTesting(new AppLaunchTracker());
PredictionUiStateManager.INSTANCE.initializeForTesting(null);
+ waitForLauncherCondition("Prediction never had state update",
+ launcher -> PredictionUiStateManager.INSTANCE.get(
+ mTargetContext).mDebugHadStateUpdate);
mCallback = PredictionUiStateManager.INSTANCE.get(mTargetContext).appPredictorCallback(
Client.HOME);