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

Commit dcae29fe authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

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

parents 61b756aa 112d53bc
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);
    }