[automerger] Cancelling quickscrub state incease we missed quickscrub end event am: 0fb1e4b5a7

Change-Id: I0ba02df3d089cd26356aab32bd1f7a7249d1702f
This commit is contained in:
Android Build Merger (Role) 2018-05-25 18:39:46 +00:00
commit 1b905daf5c
3 changed files with 18 additions and 0 deletions

View File

@ -76,4 +76,10 @@ public class FastOverviewState extends OverviewState {
return Math.min(Math.min(dp.availableHeightPx / usedHeight,
dp.availableWidthPx / usedWidth), MAX_PREVIEW_SCALE_UP);
}
@Override
public void onStateDisabled(Launcher launcher) {
super.onStateDisabled(launcher);
launcher.<RecentsView>getOverviewPanel().getQuickScrubController().cancelActiveQuickscrub();
}
}

View File

@ -132,6 +132,17 @@ public class QuickScrubController implements OnAlarmListener {
}
}
public void cancelActiveQuickscrub() {
if (!mInQuickScrub) {
return;
}
Log.d(TAG, "Quickscrub was active, cancelling");
mInQuickScrub = false;
mActivityControlHelper = null;
mOnFinishedTransitionToQuickScrubRunnable = null;
mRecentsView.setNextPageSwitchRunnable(null);
}
/**
* Initializes the UI for quick scrub, returns true if success.
*/

View File

@ -700,6 +700,7 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> {
mRecentsView.setRunningTaskHidden(false);
mRecentsView.setRunningTaskIconScaledDown(false /* isScaledDown */, false /* animate */);
mQuickScrubController.cancelActiveQuickscrub();
}
private void notifyTransitionCancelled() {