Loading services/core/java/com/android/server/wm/WindowState.java +6 −0 Original line number Diff line number Diff line Loading @@ -5271,6 +5271,12 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP if (mSurfaceControl == null) { return; } if (mWmService.mWindowPlacerLocked.isLayoutDeferred() || isGoneForLayout()) { // Since this relies on mWindowFrames, changes made while layout is deferred are // likely to be invalid. Similarly, if it's goneForLayout, mWindowFrames may not be // up-to-date and thus can't be relied on. return; } transformFrameToSurfacePosition(mWindowFrames.mFrame.left, mWindowFrames.mFrame.top, mSurfacePosition); Loading services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java +2 −0 Original line number Diff line number Diff line Loading @@ -648,6 +648,8 @@ public class WindowStateTests extends WindowTestsBase { win1.mSurfaceControl = mock(SurfaceControl.class); win1.mAttrs.surfaceInsets.set(1, 2, 3, 4); win1.getFrame().offsetTo(WINDOW_OFFSET, 0); // Simulate layout win1.mRelayoutCalled = true; win1.updateSurfacePosition(t); win1.getTransformationMatrix(values, matrix); Loading Loading
services/core/java/com/android/server/wm/WindowState.java +6 −0 Original line number Diff line number Diff line Loading @@ -5271,6 +5271,12 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP if (mSurfaceControl == null) { return; } if (mWmService.mWindowPlacerLocked.isLayoutDeferred() || isGoneForLayout()) { // Since this relies on mWindowFrames, changes made while layout is deferred are // likely to be invalid. Similarly, if it's goneForLayout, mWindowFrames may not be // up-to-date and thus can't be relied on. return; } transformFrameToSurfacePosition(mWindowFrames.mFrame.left, mWindowFrames.mFrame.top, mSurfacePosition); Loading
services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java +2 −0 Original line number Diff line number Diff line Loading @@ -648,6 +648,8 @@ public class WindowStateTests extends WindowTestsBase { win1.mSurfaceControl = mock(SurfaceControl.class); win1.mAttrs.surfaceInsets.set(1, 2, 3, 4); win1.getFrame().offsetTo(WINDOW_OFFSET, 0); // Simulate layout win1.mRelayoutCalled = true; win1.updateSurfacePosition(t); win1.getTransformationMatrix(values, matrix); Loading