From 61fbb72c8f2cbd9fa0611ae54749666debc99923 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(-) mode change 100644 => 100755 services/core/java/com/android/server/wm/DisplayContent.java diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java old mode 100644 new mode 100755 index b837d9ec874b6..771fb12cc0fbc --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -338,7 +338,7 @@ class DisplayContent extends WindowContainer