From c865ae4320a0ba417ed446988f34ec723911273a Mon Sep 17 00:00:00 2001 From: Riddle Hsu Date: Wed, 12 Aug 2020 23:13:23 +0800 Subject: Fix inconsistent info in display frames DisplayRotation#mRotation may be set to target rotation earlier than update display info (especially wait for remote rotation). So it is more stable to keep the basic information of display frames are set from the same source. Otherwise DisplayPolicy#getRotatedWindowBounds may misjudge that the window bounds need to rotate. Bug: 163795211 Test: atest DisplayContentTests ScreenDecorWindowTests Change-Id: Iccac43c313161502c1ce41899d39ab774a23adbc --- services/core/java/com/android/server/wm/DisplayContent.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index affbafa095cc..49b4af019709 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -4009,9 +4009,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp mDisplayFrames.onDisplayInfoUpdated(mDisplayInfo, calculateDisplayCutoutForRotation(mDisplayInfo.rotation)); - // TODO: Not sure if we really need to set the rotation here since we are updating from - // the display info above... - mDisplayFrames.mRotation = getRotation(); mDisplayPolicy.beginLayoutLw(mDisplayFrames, getConfiguration().uiMode); int seq = mLayoutSeq + 1; -- cgit v1.2.3-59-g8ed1b