diff options
| author | 2022-11-11 05:36:38 +0000 | |
|---|---|---|
| committer | 2022-11-11 05:36:38 +0000 | |
| commit | 2d8d2456c17f4aa73b6cb6a21d9fe7913e65042a (patch) | |
| tree | 8a5458bba62fc510e642647e182632fbccd5912d | |
| parent | 98801e7c4a0b5407ffce8aba1abdbda1aa42489c (diff) | |
| parent | d76c6279e184a6b8d3db256ff35f00c7ffffac23 (diff) | |
Merge "Don't send mSizeCompatScale to client if it is from SizeCompatBounds" into tm-qpr-dev am: d76c6279e1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20419089
Change-Id: If243c31b640a63b8fa92f1f17115994adc9eb5c7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | services/core/java/com/android/server/wm/WindowManagerService.java | 2 | ||||
| -rw-r--r-- | services/core/java/com/android/server/wm/WindowState.java | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index 9c9d751244e6..9db5170897a8 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -1883,7 +1883,7 @@ public class WindowManagerService extends IWindowManager.Stub // Make this invalid which indicates a null attached frame. outAttachedFrame.set(0, 0, -1, -1); } - outSizeCompatScale[0] = win.getSizeCompatScale(); + outSizeCompatScale[0] = win.getSizeCompatScaleForClient(); } Binder.restoreCallingIdentity(origId); diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index a42cec9c06fb..53989699068d 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -1265,8 +1265,10 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP mGlobalScale = mInvGlobalScale = mSizeCompatScale = 1f; } - float getSizeCompatScale() { - return mSizeCompatScale; + float getSizeCompatScaleForClient() { + // If the size compat scale is because of the size compat bounds, we only scale down its + // coordinates at the server side without letting the client know. + return mToken.hasSizeCompatBounds() ? 1f : mSizeCompatScale; } /** @@ -3863,7 +3865,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP outFrames.attachedFrame.scale(mInvGlobalScale); } } - outFrames.sizeCompatScale = mSizeCompatScale; + + outFrames.sizeCompatScale = getSizeCompatScaleForClient(); // Note: in the cases where the window is tied to an activity, we should not send a // configuration update when the window has requested to be hidden. Doing so can lead to |