Loading services/core/java/com/android/server/wm/WindowState.java +1 −2 Original line number Diff line number Diff line Loading @@ -5703,8 +5703,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP // window becomes visible while the sync group is still active. return true; } if (mSyncState == SYNC_STATE_WAITING_FOR_DRAW && mWinAnimator.mDrawState == HAS_DRAWN && !mRedrawForSyncReported && !mWmService.mResizingWindows.contains(this)) { if (mSyncState == SYNC_STATE_WAITING_FOR_DRAW && mLastConfigReportedToClient && isDrawn()) { // Complete the sync state immediately for a drawn window that doesn't need to redraw. onSyncFinishedDrawing(); } Loading services/tests/wmtests/src/com/android/server/wm/SyncEngineTests.java +1 −4 Original line number Diff line number Diff line Loading @@ -40,9 +40,7 @@ import static org.mockito.ArgumentMatchers.notNull; import static org.mockito.Mockito.spy; import android.platform.test.annotations.Presubmit; import android.util.MergedConfiguration; import android.view.SurfaceControl; import android.window.ClientWindowFrames; import androidx.test.filters.SmallTest; Loading Loading @@ -333,8 +331,7 @@ public class SyncEngineTests extends WindowTestsBase { w.reparent(botChildWC, POSITION_TOP); parentWC.prepareSync(); // Assume the window has drawn with the latest configuration. w.fillClientWindowFramesAndConfiguration(new ClientWindowFrames(), new MergedConfiguration(), true /* useLatestConfig */, true /* relayoutVisible */); makeLastConfigReportedToClient(w, true /* visible */); assertTrue(w.onSyncFinishedDrawing()); assertEquals(SYNC_STATE_READY, w.mSyncState); w.reparent(topChildWC, POSITION_TOP); Loading services/tests/wmtests/src/com/android/server/wm/WallpaperControllerTests.java +1 −4 Original line number Diff line number Diff line Loading @@ -52,7 +52,6 @@ import android.graphics.Rect; import android.os.IBinder; import android.os.RemoteException; import android.platform.test.annotations.Presubmit; import android.util.MergedConfiguration; import android.view.DisplayCutout; import android.view.DisplayInfo; import android.view.DisplayShape; Loading @@ -63,7 +62,6 @@ import android.view.RoundedCorners; import android.view.Surface; import android.view.SurfaceControl; import android.view.WindowManager; import android.window.ClientWindowFrames; import androidx.test.filters.SmallTest; Loading Loading @@ -380,8 +378,7 @@ public class WallpaperControllerTests extends WindowTestsBase { wallpaperWindow.mLayoutSeq = mDisplayContent.mLayoutSeq; // Assume the token was invisible and the latest config was reported. wallpaperToken.commitVisibility(false); wallpaperWindow.fillClientWindowFramesAndConfiguration(new ClientWindowFrames(), new MergedConfiguration(), true /* useLatestConfig */, false /* relayoutVisible */); makeLastConfigReportedToClient(wallpaperWindow, false /* visible */); assertTrue(wallpaperWindow.isLastConfigReportedToClient()); final Rect bounds = wallpaperToken.getBounds(); Loading services/tests/wmtests/src/com/android/server/wm/WindowOrganizerTests.java +1 −0 Original line number Diff line number Diff line Loading @@ -1247,6 +1247,7 @@ public class WindowOrganizerTests extends WindowTestsBase { // A drawn window can complete the sync state automatically. w1.mWinAnimator.mDrawState = WindowStateAnimator.HAS_DRAWN; makeLastConfigReportedToClient(w1, true /* visible */); mWm.mSyncEngine.onSurfacePlacement(); verify(mockCallback).onTransactionReady(anyInt(), any()); assertFalse(w1.useBLASTSync()); Loading services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java +7 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ import android.os.RemoteException; import android.os.UserHandle; import android.provider.Settings; import android.service.voice.IVoiceInteractionSession; import android.util.MergedConfiguration; import android.util.SparseArray; import android.view.Display; import android.view.DisplayInfo; Loading @@ -102,6 +103,7 @@ import android.view.WindowInsets; import android.view.WindowManager; import android.view.WindowManager.DisplayImePolicy; import android.view.inputmethod.ImeTracker; import android.window.ClientWindowFrames; import android.window.ITransitionPlayer; import android.window.ScreenCapture; import android.window.StartingWindowInfo; Loading Loading @@ -624,6 +626,11 @@ class WindowTestsBase extends SystemServiceTestsBase { } } static void makeLastConfigReportedToClient(WindowState w, boolean visible) { w.fillClientWindowFramesAndConfiguration(new ClientWindowFrames(), new MergedConfiguration(), true /* useLatestConfig */, visible); } /** * Gets the order of the given {@link Task} as its z-order in the hierarchy below this TDA. * The Task can be a direct child of a child TaskDisplayArea. {@code -1} if not found. Loading Loading
services/core/java/com/android/server/wm/WindowState.java +1 −2 Original line number Diff line number Diff line Loading @@ -5703,8 +5703,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP // window becomes visible while the sync group is still active. return true; } if (mSyncState == SYNC_STATE_WAITING_FOR_DRAW && mWinAnimator.mDrawState == HAS_DRAWN && !mRedrawForSyncReported && !mWmService.mResizingWindows.contains(this)) { if (mSyncState == SYNC_STATE_WAITING_FOR_DRAW && mLastConfigReportedToClient && isDrawn()) { // Complete the sync state immediately for a drawn window that doesn't need to redraw. onSyncFinishedDrawing(); } Loading
services/tests/wmtests/src/com/android/server/wm/SyncEngineTests.java +1 −4 Original line number Diff line number Diff line Loading @@ -40,9 +40,7 @@ import static org.mockito.ArgumentMatchers.notNull; import static org.mockito.Mockito.spy; import android.platform.test.annotations.Presubmit; import android.util.MergedConfiguration; import android.view.SurfaceControl; import android.window.ClientWindowFrames; import androidx.test.filters.SmallTest; Loading Loading @@ -333,8 +331,7 @@ public class SyncEngineTests extends WindowTestsBase { w.reparent(botChildWC, POSITION_TOP); parentWC.prepareSync(); // Assume the window has drawn with the latest configuration. w.fillClientWindowFramesAndConfiguration(new ClientWindowFrames(), new MergedConfiguration(), true /* useLatestConfig */, true /* relayoutVisible */); makeLastConfigReportedToClient(w, true /* visible */); assertTrue(w.onSyncFinishedDrawing()); assertEquals(SYNC_STATE_READY, w.mSyncState); w.reparent(topChildWC, POSITION_TOP); Loading
services/tests/wmtests/src/com/android/server/wm/WallpaperControllerTests.java +1 −4 Original line number Diff line number Diff line Loading @@ -52,7 +52,6 @@ import android.graphics.Rect; import android.os.IBinder; import android.os.RemoteException; import android.platform.test.annotations.Presubmit; import android.util.MergedConfiguration; import android.view.DisplayCutout; import android.view.DisplayInfo; import android.view.DisplayShape; Loading @@ -63,7 +62,6 @@ import android.view.RoundedCorners; import android.view.Surface; import android.view.SurfaceControl; import android.view.WindowManager; import android.window.ClientWindowFrames; import androidx.test.filters.SmallTest; Loading Loading @@ -380,8 +378,7 @@ public class WallpaperControllerTests extends WindowTestsBase { wallpaperWindow.mLayoutSeq = mDisplayContent.mLayoutSeq; // Assume the token was invisible and the latest config was reported. wallpaperToken.commitVisibility(false); wallpaperWindow.fillClientWindowFramesAndConfiguration(new ClientWindowFrames(), new MergedConfiguration(), true /* useLatestConfig */, false /* relayoutVisible */); makeLastConfigReportedToClient(wallpaperWindow, false /* visible */); assertTrue(wallpaperWindow.isLastConfigReportedToClient()); final Rect bounds = wallpaperToken.getBounds(); Loading
services/tests/wmtests/src/com/android/server/wm/WindowOrganizerTests.java +1 −0 Original line number Diff line number Diff line Loading @@ -1247,6 +1247,7 @@ public class WindowOrganizerTests extends WindowTestsBase { // A drawn window can complete the sync state automatically. w1.mWinAnimator.mDrawState = WindowStateAnimator.HAS_DRAWN; makeLastConfigReportedToClient(w1, true /* visible */); mWm.mSyncEngine.onSurfacePlacement(); verify(mockCallback).onTransactionReady(anyInt(), any()); assertFalse(w1.useBLASTSync()); Loading
services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java +7 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ import android.os.RemoteException; import android.os.UserHandle; import android.provider.Settings; import android.service.voice.IVoiceInteractionSession; import android.util.MergedConfiguration; import android.util.SparseArray; import android.view.Display; import android.view.DisplayInfo; Loading @@ -102,6 +103,7 @@ import android.view.WindowInsets; import android.view.WindowManager; import android.view.WindowManager.DisplayImePolicy; import android.view.inputmethod.ImeTracker; import android.window.ClientWindowFrames; import android.window.ITransitionPlayer; import android.window.ScreenCapture; import android.window.StartingWindowInfo; Loading Loading @@ -624,6 +626,11 @@ class WindowTestsBase extends SystemServiceTestsBase { } } static void makeLastConfigReportedToClient(WindowState w, boolean visible) { w.fillClientWindowFramesAndConfiguration(new ClientWindowFrames(), new MergedConfiguration(), true /* useLatestConfig */, visible); } /** * Gets the order of the given {@link Task} as its z-order in the hierarchy below this TDA. * The Task can be a direct child of a child TaskDisplayArea. {@code -1} if not found. Loading