Fix DEFER_UPDATES_NEXT_DRAW flag is not unset when binging happens twice
Bug: 138646754
Change-Id: I76eccdb812013299e18f197ba17ff858a01a6338
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 03fdc97..5b38261 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1896,6 +1896,10 @@
if (mPendingExecutor != null) {
mPendingExecutor.markCompleted();
mPendingExecutor = null;
+
+ // We might have set this flag previously and forgot to clear it.
+ mAppsView.getAppsStore()
+ .disableDeferUpdatesSilently(AllAppsStore.DEFER_UPDATES_NEXT_DRAW);
}
}
@@ -2249,9 +2253,7 @@
@Override
public void executeOnNextDraw(ViewOnDrawExecutor executor) {
- if (mPendingExecutor != null) {
- mPendingExecutor.markCompleted();
- }
+ clearPendingBinds();
mPendingExecutor = executor;
if (!isInState(ALL_APPS)) {
mAppsView.getAppsStore().enableDeferUpdates(AllAppsStore.DEFER_UPDATES_NEXT_DRAW);