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

Commit 107e2d41 authored by John Spurlock's avatar John Spurlock Committed by Android (Google) Code Review
Browse files

Merge "Allow wallpaper to extend into the entire screen." into klp-dev

parents fb3d7811 ef4adae5
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -3156,14 +3156,14 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                            + mOverscanScreenWidth;
                    pf.bottom = df.bottom = of.bottom = cf.bottom = mOverscanScreenTop
                            + mOverscanScreenHeight;
                } else if (attrs.type == WindowManager.LayoutParams.TYPE_WALLPAPER) {
                    // The wallpaper mostly goes into the overscan region.
                    pf.left = df.left = of.left = cf.left = mRestrictedOverscanScreenLeft;
                    pf.top = df.top = of.top = cf.top = mRestrictedOverscanScreenTop;
                } else if (attrs.type == TYPE_WALLPAPER) {
                    // The wallpaper also has Real Ultimate Power.
                    pf.left = df.left = of.left = cf.left = mUnrestrictedScreenLeft;
                    pf.top = df.top = of.top = cf.top = mUnrestrictedScreenTop;
                    pf.right = df.right = of.right = cf.right
                            = mRestrictedOverscanScreenLeft + mRestrictedOverscanScreenWidth;
                            = mUnrestrictedScreenLeft + mUnrestrictedScreenWidth;
                    pf.bottom = df.bottom = of.bottom = cf.bottom
                            = mRestrictedOverscanScreenTop + mRestrictedOverscanScreenHeight;
                            = mUnrestrictedScreenTop + mUnrestrictedScreenHeight;
                } else if ((attrs.flags & FLAG_LAYOUT_IN_OVERSCAN) != 0
                        && attrs.type >= WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW
                        && attrs.type <= WindowManager.LayoutParams.LAST_SUB_WINDOW) {
+7 −7
Original line number Diff line number Diff line
@@ -1580,8 +1580,8 @@ public class WindowManagerService extends IWindowManager.Stub

        // TODO(multidisplay): Wallpapers on main screen only.
        final DisplayInfo displayInfo = getDefaultDisplayContentLocked().getDisplayInfo();
        final int dw = displayInfo.appWidth;
        final int dh = displayInfo.appHeight;
        final int dw = displayInfo.logicalWidth;
        final int dh = displayInfo.logicalHeight;

        // First find top-most window that has asked to be on top of the
        // wallpaper; all wallpapers go behind it.
@@ -1995,8 +1995,8 @@ public class WindowManagerService extends IWindowManager.Stub
    void updateWallpaperOffsetLocked(WindowState changingTarget, boolean sync) {
        final DisplayContent displayContent = changingTarget.mDisplayContent;
        final DisplayInfo displayInfo = displayContent.getDisplayInfo();
        final int dw = displayInfo.appWidth;
        final int dh = displayInfo.appHeight;
        final int dw = displayInfo.logicalWidth;
        final int dh = displayInfo.logicalHeight;

        WindowState target = mWallpaperTarget;
        if (target != null) {
@@ -2055,8 +2055,8 @@ public class WindowManagerService extends IWindowManager.Stub
        final boolean visible = isWallpaperVisible(mWallpaperTarget);
        final DisplayContent displayContent = mWallpaperTarget.mDisplayContent;
        final DisplayInfo displayInfo = displayContent.getDisplayInfo();
        final int dw = displayInfo.appWidth;
        final int dh = displayInfo.appHeight;
        final int dw = displayInfo.logicalWidth;
        final int dh = displayInfo.logicalHeight;

        int curTokenIndex = mWallpaperTokens.size();
        while (curTokenIndex > 0) {
@@ -2982,7 +2982,7 @@ public class WindowManagerService extends IWindowManager.Stub
            if (toBeDisplayed && win.mIsWallpaper) {
                DisplayInfo displayInfo = getDefaultDisplayInfoLocked();
                updateWallpaperOffsetLocked(win,
                        displayInfo.appWidth, displayInfo.appHeight, false);
                        displayInfo.logicalWidth, displayInfo.logicalHeight, false);
            }
            if (win.mAppToken != null) {
                win.mAppToken.updateReportedVisibilityLocked();
+2 −2
Original line number Diff line number Diff line
@@ -592,8 +592,8 @@ final class WindowState implements WindowManagerPolicy.WindowState {

        if (mIsWallpaper && (fw != mFrame.width() || fh != mFrame.height())) {
            final DisplayInfo displayInfo = mDisplayContent.getDisplayInfo();
            mService.updateWallpaperOffsetLocked(this, displayInfo.appWidth, displayInfo.appHeight,
                    false);
            mService.updateWallpaperOffsetLocked(this,
                    displayInfo.logicalWidth, displayInfo.logicalHeight, false);
        }

        if (DEBUG_LAYOUT || WindowManagerService.localLOGV) Slog.v(TAG,