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

Commit 44e80e5b authored by Phil Weaver's avatar Phil Weaver Committed by android-build-merger
Browse files

Merge \\"Stop magnifying surface insets.\\" into nyc-dev am: 4663b4e8

am: e25752e2

Change-Id: I20c1106951d77045ea7d4a97694d96ba537b6e73
parents f3583b4e e25752e2
Loading
Loading
Loading
Loading
+4 −15
Original line number Diff line number Diff line
@@ -824,22 +824,11 @@ class WindowStateAnimator {
            mTmpSize.bottom = mTmpSize.top + 1;
        }

        final int displayId = w.getDisplayId();
        float scale = 1.0f;
        // Magnification is supported only for the default display.
        if (mService.mAccessibilityController != null && displayId == DEFAULT_DISPLAY) {
            final MagnificationSpec spec =
                    mService.mAccessibilityController.getMagnificationSpecForWindowLocked(w);
            if (spec != null && !spec.isNop()) {
                scale = spec.scale;
            }
        }

        // Adjust for surface insets.
        mTmpSize.left -= scale * attrs.surfaceInsets.left;
        mTmpSize.top -= scale * attrs.surfaceInsets.top;
        mTmpSize.right += scale * attrs.surfaceInsets.right;
        mTmpSize.bottom += scale * attrs.surfaceInsets.bottom;
        mTmpSize.left -= attrs.surfaceInsets.left;
        mTmpSize.top -= attrs.surfaceInsets.top;
        mTmpSize.right += attrs.surfaceInsets.right;
        mTmpSize.bottom += attrs.surfaceInsets.bottom;
    }

    boolean hasSurface() {