diff options
| author | 2022-11-11 06:08:52 +0000 | |
|---|---|---|
| committer | 2022-11-11 06:08:52 +0000 | |
| commit | ab970cfaeb19e28c9d168dfc1e9c009b69b11d77 (patch) | |
| tree | a54f5ddec3102317fcdb9fc0666f59fca080aed9 | |
| parent | 7710eba48a25e92330379d18633d2cf01fe2c96a (diff) | |
| parent | 2d8d2456c17f4aa73b6cb6a21d9fe7913e65042a (diff) | |
Merge "Don't send mSizeCompatScale to client if it is from SizeCompatBounds" into tm-qpr-dev am: d76c6279e1 am: 2d8d2456c1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20419089
Change-Id: Ia02150ebf576aaa1f7da990f7f2ec339c7d204bf
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 99a0e9032add..c56a22ef2bbe 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -1842,7 +1842,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 f06a8c9ffe82..17e64995fe8c 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -1267,8 +1267,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; } /** @@ -3865,7 +3867,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 |