mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Cancelling quickscrub state incease we missed quickscrub end event
> This can happen when the remote transition is cancelled while animating down during quickscrub, cause WindowTransformSwipeHandler to get invalidated and miss onQuickscrubEnd Bug: 80140388 Change-Id: I0221e301d4d633bab0defaa6af76e0054776a95a
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -700,6 +700,7 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> {
|
||||
|
||||
mRecentsView.setRunningTaskHidden(false);
|
||||
mRecentsView.setRunningTaskIconScaledDown(false /* isScaledDown */, false /* animate */);
|
||||
mQuickScrubController.cancelActiveQuickscrub();
|
||||
}
|
||||
|
||||
private void notifyTransitionCancelled() {
|
||||
|
||||
Reference in New Issue
Block a user