From a4b32b963beaa48d50a3aafdf038cfd1dc160765 Mon Sep 17 00:00:00 2001 From: Phil Weaver Date: Thu, 2 Jun 2016 13:55:39 -0700 Subject: [PATCH] Stop magnifying surface insets. Apparently magnification never should have touched the insets, but the effects were small so we got away with it before. Now messing with them disrupts the size of pop-up windows when magnification is enabled. Bug: 29048161 Change-Id: I4ab84f4f14cb92ca29b9085aaba7b854580f2c48 --- .../server/wm/WindowStateAnimator.java | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java index 37d6faf5a8464..e8c1530d731f5 100644 --- a/services/core/java/com/android/server/wm/WindowStateAnimator.java +++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java @@ -816,22 +816,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() {