From d7f8f942e56ce96042879c582db1541283c78a3d Mon Sep 17 00:00:00 2001 From: Andrii Kulian Date: Mon, 13 Feb 2017 15:17:00 -0800 Subject: [PATCH] Update display contents when metrics change When display was resized its windows weren't updated because of two problems: old LogicaDisplay#mOverrideDisplayInfo was preventing WM from detecting the change and base display metrics were never updated by resize. Bug: 35258051 Test: android.server.cts.ActivityManagerDisplayTests Test: #testDisplayResize Change-Id: I30155e4d83e61ffe969c81dfcf932f3f3882cc59 --- .../com/android/server/display/LogicalDisplay.java | 1 + .../java/com/android/server/wm/DisplayContent.java | 34 +++++++++++++++++++--- .../android/server/wm/WindowManagerService.java | 7 ++--- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/services/core/java/com/android/server/display/LogicalDisplay.java b/services/core/java/com/android/server/display/LogicalDisplay.java index a947b4106794..5f348bfdfdb7 100644 --- a/services/core/java/com/android/server/display/LogicalDisplay.java +++ b/services/core/java/com/android/server/display/LogicalDisplay.java @@ -261,6 +261,7 @@ final class LogicalDisplay { mPrimaryDisplayDeviceInfo = deviceInfo; mInfo = null; + mOverrideDisplayInfo = null; } } diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index c45136ca2472..18bd9b0a00fb 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -919,6 +919,10 @@ class DisplayContent extends WindowContainer= 0; --i) { mTaskStackContainers.get(i).updateDisplayInfo(null); } @@ -934,10 +938,8 @@ class DisplayContent extends WindowContainer