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

Commit 1969cd15 authored by Tracy Zhou's avatar Tracy Zhou Committed by Android (Google) Code Review
Browse files

Merge "Finish recents animation upon home rotation" into sc-dev

parents 1d11a22e 9d5ee199
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();