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

Commit 3637ad95 authored by Tracy Zhou's avatar Tracy Zhou Committed by Automerger Merge Worker
Browse files

Merge "Revert "Revert "Revert "Finish recents animation upon home rotation""""...

Merge "Revert "Revert "Revert "Finish recents animation upon home rotation"""" into sc-dev am: a570b82a

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14430716

Change-Id: I4a9f4b1e9b6a00822580300f2401b4a52458e9fc
parents 8c555210 a570b82a
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -2481,15 +2481,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
    @Override
    protected void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
        if (LIVE_TILE.get() && mRunningTaskId != -1) {
            switchToScreenshot(
                    () -> finishRecentsAnimation(true, this::onConfigurationChangedInternal));
        } else {
            onConfigurationChangedInternal();
        }
    }

    private void onConfigurationChangedInternal() {
        final int rotation = mActivity.getDisplay().getRotation();
        if (mOrientationState.setRecentsRotation(rotation)) {
            updateOrientationHandler();
@@ -3442,7 +3433,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
     * capturing the snapshot at the same time.
     */
    public void switchToScreenshot(Runnable onFinishRunnable) {
        switchToScreenshot(mRecentsAnimationController == null || mRunningTaskId == -1 ? null
        switchToScreenshot(mRunningTaskId == -1 ? null
                : mRecentsAnimationController.screenshotTask(mRunningTaskId), onFinishRunnable);
    }