From 24be9ab639465226127c1af2eb701c17dbfe2aab Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Mon, 30 Apr 2018 17:54:53 -0700 Subject: [PATCH] WindowManager: Reapply magnification spec when adding windows. Previously the magnification spec was effectively reapplied on each frame when preparing surfaces. Following the migration to the hierarchy it was thought this wasn't needed since parent hierarchy layers would be magnified and Surfaces would receive them as they came and went. It didn't end up quite so hunky-dory. While the app layer is magnified in whole, the non app layer relies on magnification of individual windows to avoid magnifying the navigation bar. Simply put this means we need to reapply magnification when adding windows in addition to when the magnification spec changes. Bug: 74221620 Test: Manual Change-Id: Ifd17ecc837a9aa611ddc29e87aa95d2854b2af8e --- .../java/com/android/server/wm/DisplayContent.java | 14 ++++++++++++++ .../java/com/android/server/wm/WindowState.java | 2 ++ 2 files changed, 16 insertions(+) diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index 38fb30e855e35..9621eddc348a8 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -393,6 +393,8 @@ class DisplayContent extends WindowContainer mUpdateWindowsForAnimator = w -> { WindowStateAnimator winAnimator = w.mWinAnimator; final AppWindowToken atoken = w.mAppToken; @@ -3837,10 +3839,22 @@ class DisplayContent extends WindowContainer implements WindowManagerP void onParentSet() { super.onParentSet(); setDrawnStateEvaluated(false /*evaluated*/); + + getDisplayContent().reapplyMagnificationSpec(); } @Override