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

Commit bde63923 authored by Alex Chau's avatar Alex Chau
Browse files

Close floating views before fake rotation

- We do the same in Launcher for real rotation

Fix: 348113790
Test: manual
Flag: EXEMPT bugfix
Change-Id: Ibd5f42db439cd94a389f7aaf6fe2db317c11cd67
parent c9ec536f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import static com.android.app.animation.Interpolators.FINAL_FRAME;
import static com.android.app.animation.Interpolators.LINEAR;
import static com.android.app.animation.Interpolators.OVERSHOOT_0_75;
import static com.android.app.animation.Interpolators.clampToProgress;
import static com.android.launcher3.AbstractFloatingView.TYPE_REBIND_SAFE;
import static com.android.launcher3.AbstractFloatingView.TYPE_TASK_MENU;
import static com.android.launcher3.AbstractFloatingView.getTopOpenViewWithType;
import static com.android.launcher3.BaseActivity.STATE_HANDLER_INVISIBILITY_FLAGS;
@@ -131,6 +132,7 @@ import androidx.annotation.UiThread;
import androidx.core.graphics.ColorUtils;

import com.android.internal.jank.Cuj;
import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.BaseActivity.MultiWindowModeChangedListener;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Flags;
@@ -2689,6 +2691,7 @@ public abstract class RecentsView<CONTAINER_TYPE extends Context & RecentsViewCo
    }

    private void animateRotation(int newRotation) {
        AbstractFloatingView.closeAllOpenViewsExcept(mContainer, false, TYPE_REBIND_SAFE);
        AnimatorSet pa = setRecentsChangedOrientation(true);
        pa.addListener(AnimatorListeners.forSuccessCallback(() -> {
            setLayoutRotation(newRotation, mOrientationState.getDisplayRotation());