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

Commit 56e1791c authored by Riddle Hsu's avatar Riddle Hsu Committed by Automerger Merge Worker
Browse files

Merge "Allow fixed rotation for transient launch with visible wallpaper" into...

Merge "Allow fixed rotation for transient launch with visible wallpaper" into udc-dev am: dcae29fe

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22708281



Change-Id: I1caadaff85da2588f985d21104708c7d68da76a1
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 5a8c4c53 dcae29fe
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1858,7 +1858,8 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
            return false;
        }
        if (mLastWallpaperVisible && r.windowsCanBeWallpaperTarget()
                && mFixedRotationTransitionListener.mAnimatingRecents == null) {
                && mFixedRotationTransitionListener.mAnimatingRecents == null
                && !mTransitionController.isTransientLaunch(r)) {
            // Use normal rotation animation for orientation change of visible wallpaper if recents
            // animation is not running (it may be swiping to home).
            return false;
+6 −16
Original line number Diff line number Diff line
@@ -129,26 +129,10 @@ class WallpaperWindowToken extends WindowToken {
    }

    void updateWallpaperWindows(boolean visible) {
        boolean changed = false;
        if (mVisibleRequested != visible) {
            ProtoLog.d(WM_DEBUG_WALLPAPER, "Wallpaper token %s visible=%b",
                    token, visible);
            setVisibility(visible);
            changed = true;
        }
        if (mTransitionController.isShellTransitionsEnabled()) {
            // Apply legacy fixed rotation to wallpaper if it is becoming visible
            if (!mTransitionController.useShellTransitionsRotation() && changed && visible) {
                final WindowState wallpaperTarget =
                        mDisplayContent.mWallpaperController.getWallpaperTarget();
                if (wallpaperTarget != null && wallpaperTarget.mToken.hasFixedRotationTransform()) {
                    linkFixedRotationTransform(wallpaperTarget.mToken);
                }
            }
            // If wallpaper is in transition, setVisible() will be called from commitVisibility()
            // when finishing transition. Otherwise commitVisibility() is already called from above
            // setVisibility().
            return;
        }

        final WindowState wallpaperTarget =
@@ -172,6 +156,12 @@ class WallpaperWindowToken extends WindowToken {
                linkFixedRotationTransform(wallpaperTarget.mToken);
            }
        }
        if (mTransitionController.isShellTransitionsEnabled()) {
            // If wallpaper is in transition, setVisible() will be called from commitVisibility()
            // when finishing transition. Otherwise commitVisibility() is already called from above
            // setVisibility().
            return;
        }

        setVisible(visible);
    }