From 0db341117e06d3eece128c872645a0ffdffcda0e Mon Sep 17 00:00:00 2001 From: Mark Hong Date: Fri, 10 Jan 2020 10:20:45 -0800 Subject: [PATCH] Apply proper displayCutout rotation in density 480 dpi and 270 degrees rotation. In case device has 480 dpi and rotating the degrees then shortSizeDp value is less than 480 because of diaplay cutout. So ScreenLayoutSize will not be properly set and there is difference in between expectedScreenLayout and actualScreenLayout. In order to fix this issue, displayCutout should also be rotated while in calculating reduceConfigLayout. Bug: b/147473991 Test: run cts-on-gsi -m CtsDpiTestCases -t android.dpi.cts.ConfigurationScreenLayyoutTest#testScreenLayout Change-Id: Ie3d615e494cb3fd21f4388e969e5e637860b86ac Signed-off-by: Mark Hong --- .../com/android/server/wm/DisplayContent.java | 45 ++++++++++--------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index 36fdb2d1a1802..56d72b92074cf 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -375,7 +375,7 @@ class DisplayContent extends WindowContainer