Loading services/core/java/com/android/server/wm/DisplayContent.java +1 −1 Original line number Diff line number Diff line Loading @@ -1575,7 +1575,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp } return false; } if (!r.getParent().matchParentBounds()) { if (!r.getDisplayArea().matchParentBounds()) { // Because the fixed rotated configuration applies to activity directly, if its parent // has it own policy for bounds, the activity bounds based on parent is unknown. return false; Loading services/core/java/com/android/server/wm/WindowState.java +7 −11 Original line number Diff line number Diff line Loading @@ -1265,7 +1265,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP mHaveFrame = true; final Task task = getTask(); final boolean isFullscreenAndFillsDisplay = !inMultiWindowMode() && matchesDisplayBounds(); final boolean isFullscreenAndFillsArea = !inMultiWindowMode() && matchesDisplayAreaBounds(); final boolean windowsAreFloating = task != null && task.isFloating(); final DisplayContent dc = getDisplayContent(); final DisplayInfo displayInfo = getDisplayInfo(); Loading @@ -1290,7 +1290,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP : isImeLayeringTarget(); final boolean isImeTarget = imeWin != null && imeWin.isVisibleNow() && isInputMethodAdjustTarget; if (isFullscreenAndFillsDisplay || layoutInParentFrame()) { if (isFullscreenAndFillsArea || layoutInParentFrame()) { // We use the parent frame as the containing frame for fullscreen and child windows windowFrames.mContainingFrame.set(windowFrames.mParentFrame); layoutDisplayFrame = windowFrames.mDisplayFrame; Loading Loading @@ -2272,19 +2272,15 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP && mWindowFrames.mFrame.bottom >= displayInfo.appHeight; } private boolean matchesDisplayBounds() { final Rect displayBounds = mToken.getFixedRotationTransformDisplayBounds(); if (displayBounds != null) { boolean matchesDisplayAreaBounds() { final Rect rotatedDisplayBounds = mToken.getFixedRotationTransformDisplayBounds(); if (rotatedDisplayBounds != null) { // If the rotated display bounds are available, the window bounds are also rotated. return displayBounds.equals(getBounds()); } return getDisplayContent().getBounds().equals(getBounds()); return rotatedDisplayBounds.equals(getBounds()); } boolean matchesDisplayAreaBounds() { final DisplayArea displayArea = getDisplayArea(); if (displayArea == null) { return matchesDisplayBounds(); return getDisplayContent().getBounds().equals(getBounds()); } return displayArea.getBounds().equals(getBounds()); } Loading services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java +2 −0 Original line number Diff line number Diff line Loading @@ -1320,6 +1320,8 @@ public class DisplayContentTests extends WindowTestsBase { app.setRequestedOrientation(newOrientation); assertTrue(app.isFixedRotationTransforming()); assertTrue(mAppWindow.matchesDisplayAreaBounds()); assertFalse(mAppWindow.isLetterboxedAppWindow()); assertTrue(mDisplayContent.getDisplayRotation().shouldRotateSeamlessly( ROTATION_0 /* oldRotation */, ROTATION_90 /* newRotation */, false /* forceUpdate */)); Loading Loading
services/core/java/com/android/server/wm/DisplayContent.java +1 −1 Original line number Diff line number Diff line Loading @@ -1575,7 +1575,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp } return false; } if (!r.getParent().matchParentBounds()) { if (!r.getDisplayArea().matchParentBounds()) { // Because the fixed rotated configuration applies to activity directly, if its parent // has it own policy for bounds, the activity bounds based on parent is unknown. return false; Loading
services/core/java/com/android/server/wm/WindowState.java +7 −11 Original line number Diff line number Diff line Loading @@ -1265,7 +1265,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP mHaveFrame = true; final Task task = getTask(); final boolean isFullscreenAndFillsDisplay = !inMultiWindowMode() && matchesDisplayBounds(); final boolean isFullscreenAndFillsArea = !inMultiWindowMode() && matchesDisplayAreaBounds(); final boolean windowsAreFloating = task != null && task.isFloating(); final DisplayContent dc = getDisplayContent(); final DisplayInfo displayInfo = getDisplayInfo(); Loading @@ -1290,7 +1290,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP : isImeLayeringTarget(); final boolean isImeTarget = imeWin != null && imeWin.isVisibleNow() && isInputMethodAdjustTarget; if (isFullscreenAndFillsDisplay || layoutInParentFrame()) { if (isFullscreenAndFillsArea || layoutInParentFrame()) { // We use the parent frame as the containing frame for fullscreen and child windows windowFrames.mContainingFrame.set(windowFrames.mParentFrame); layoutDisplayFrame = windowFrames.mDisplayFrame; Loading Loading @@ -2272,19 +2272,15 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP && mWindowFrames.mFrame.bottom >= displayInfo.appHeight; } private boolean matchesDisplayBounds() { final Rect displayBounds = mToken.getFixedRotationTransformDisplayBounds(); if (displayBounds != null) { boolean matchesDisplayAreaBounds() { final Rect rotatedDisplayBounds = mToken.getFixedRotationTransformDisplayBounds(); if (rotatedDisplayBounds != null) { // If the rotated display bounds are available, the window bounds are also rotated. return displayBounds.equals(getBounds()); } return getDisplayContent().getBounds().equals(getBounds()); return rotatedDisplayBounds.equals(getBounds()); } boolean matchesDisplayAreaBounds() { final DisplayArea displayArea = getDisplayArea(); if (displayArea == null) { return matchesDisplayBounds(); return getDisplayContent().getBounds().equals(getBounds()); } return displayArea.getBounds().equals(getBounds()); } Loading
services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java +2 −0 Original line number Diff line number Diff line Loading @@ -1320,6 +1320,8 @@ public class DisplayContentTests extends WindowTestsBase { app.setRequestedOrientation(newOrientation); assertTrue(app.isFixedRotationTransforming()); assertTrue(mAppWindow.matchesDisplayAreaBounds()); assertFalse(mAppWindow.isLetterboxedAppWindow()); assertTrue(mDisplayContent.getDisplayRotation().shouldRotateSeamlessly( ROTATION_0 /* oldRotation */, ROTATION_90 /* newRotation */, false /* forceUpdate */)); Loading