From fedfb4635c7d00e0d2eab99fa4812f717fcc6927 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 Merged-In: Ie3d615e494cb3fd21f4388e969e5e637860b86ac 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 54ab906e99247..ba4e11a3d8c57 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -343,7 +343,7 @@ class DisplayContent extends WindowContainer