Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 271dc919 authored by Sunny Goyal's avatar Sunny Goyal Committed by Android (Google) Code Review
Browse files

Merge "Cancelling quickscrub state incease we missed quickscrub end event"...

Merge "Cancelling quickscrub state incease we missed quickscrub end event" into ub-launcher3-edmonton
parents de184a24 0fb1e4b5
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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();
    }
}
+11 −0
Original line number Diff line number Diff line
@@ -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.
     */
+1 −0
Original line number Diff line number Diff line
@@ -700,6 +700,7 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> {

        mRecentsView.setRunningTaskHidden(false);
        mRecentsView.setRunningTaskIconScaledDown(false /* isScaledDown */, false /* animate */);
        mQuickScrubController.cancelActiveQuickscrub();
    }

    private void notifyTransitionCancelled() {