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

Commit ef7b4d5d authored by Tracy Zhou's avatar Tracy Zhou
Browse files

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

This reverts commit 0f8787db.

Reason for revert: Revert and fix the broken tapl test

Fixes: 184054813
Change-Id: Ib647e11bfa0a2dc79a5a815be56452bb07e04ddf
parent b745a2a9
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -2486,6 +2486,15 @@ 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();
@@ -3438,7 +3447,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
     * capturing the snapshot at the same time.
     */
    public void switchToScreenshot(Runnable onFinishRunnable) {
        switchToScreenshot(mRunningTaskId == -1 ? null
        switchToScreenshot(mRecentsAnimationController == null || mRunningTaskId == -1 ? null
                : mRecentsAnimationController.screenshotTask(mRunningTaskId), onFinishRunnable);
    }