Loading services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceRule.java +10 −10 Original line number Diff line number Diff line Loading @@ -173,22 +173,22 @@ public class WindowManagerServiceRule implements TestRule { }; } public WindowManagerService getWindowManagerService() { WindowManagerService getWindowManagerService() { return mService; } public TestWindowManagerPolicy getWindowManagerPolicy() { return mPolicy; } public void waitUntilWindowManagerHandlersIdle() { void waitUntilWindowManagerHandlersIdle() { final WindowManagerService wm = getWindowManagerService(); if (wm != null) { if (wm == null) { return; } wm.mH.removeCallbacksAndMessages(null); wm.mAnimationHandler.removeCallbacksAndMessages(null); SurfaceAnimationThread.getHandler().removeCallbacksAndMessages(null); wm.mH.runWithScissors(() -> { }, 0); wm.mAnimationHandler.runWithScissors(() -> { }, 0); SurfaceAnimationThread.getHandler().runWithScissors(() -> { }, 0); } } private void destroyAllSurfaceTransactions() { for (final WeakReference<Transaction> reference : mSurfaceTransactions) { Loading Loading
services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceRule.java +10 −10 Original line number Diff line number Diff line Loading @@ -173,22 +173,22 @@ public class WindowManagerServiceRule implements TestRule { }; } public WindowManagerService getWindowManagerService() { WindowManagerService getWindowManagerService() { return mService; } public TestWindowManagerPolicy getWindowManagerPolicy() { return mPolicy; } public void waitUntilWindowManagerHandlersIdle() { void waitUntilWindowManagerHandlersIdle() { final WindowManagerService wm = getWindowManagerService(); if (wm != null) { if (wm == null) { return; } wm.mH.removeCallbacksAndMessages(null); wm.mAnimationHandler.removeCallbacksAndMessages(null); SurfaceAnimationThread.getHandler().removeCallbacksAndMessages(null); wm.mH.runWithScissors(() -> { }, 0); wm.mAnimationHandler.runWithScissors(() -> { }, 0); SurfaceAnimationThread.getHandler().runWithScissors(() -> { }, 0); } } private void destroyAllSurfaceTransactions() { for (final WeakReference<Transaction> reference : mSurfaceTransactions) { Loading