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

Commit 9d5ee199 authored by Tracy Zhou's avatar Tracy Zhou
Browse files

Finish recents animation upon home rotation

Fixes: 184054813
Test: manual
Change-Id: Iba819ad1d7ea72aedd15b98d9a9a48c384d5fe1e
parent e1ce26e7
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2340,6 +2340,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();