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
This commit is contained in:
Matthew Ng 2018-06-13 16:36:29 -07:00
parent 4f8e417bca
commit f8fafa2847
1 changed files with 3 additions and 1 deletions

View File

@ -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);