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

Commit 5ffe2647 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 am: 56e1791c

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



Change-Id: Ic9e58fd9eeea0e5eaba66a89ece0c7dfda5de441
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 05ca5c14 56e1791c
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);
    }