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

Commit 06df8fe4 authored by Tracy Zhou's avatar Tracy Zhou
Browse files

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

This reverts commit ef7b4d5d.

Reason for revert: Possibly broke a test
Bug: 187112839

Change-Id: I16ac2a155af9a0ae2ea60f55c52e0b3bf4307089
parent ef7b4d5d
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -2486,15 +2486,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();
@@ -3447,7 +3438,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);
    }