From f8fafa2847e20986d9f96baab3be4a0005845994 Mon Sep 17 00:00:00 2001 From: Matthew Ng Date: Wed, 13 Jun 2018 16:36:29 -0700 Subject: [PATCH] Immediate 2nd quickscrub should not cancel if same state Trigging quickscrub immediately after a previous quickscrub would cause the controller to cancel even if the state change was from overview to overview, then controller will not do auto-advancing because it thinks quickscrub has been cancelled. If the state changes but both are overview then do not cancel and quickscrub can do auto-advancing. Change-Id: I309937572ad23eea14662501f41c13cd79dd10ab Fixes: 110006796 Test: quickscrub, then let go and soon after quickscrub again --- src/com/android/launcher3/LauncherStateManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/LauncherStateManager.java b/src/com/android/launcher3/LauncherStateManager.java index 8b415d68cb..3c7c1aa079 100644 --- a/src/com/android/launcher3/LauncherStateManager.java +++ b/src/com/android/launcher3/LauncherStateManager.java @@ -382,7 +382,9 @@ public class LauncherStateManager { } private void onStateTransitionStart(LauncherState state) { - mState.onStateDisabled(mLauncher); + if (mState != state) { + mState.onStateDisabled(mLauncher); + } mState = state; mState.onStateEnabled(mLauncher); mLauncher.getAppWidgetHost().setResumed(state == LauncherState.NORMAL);