Loading services/core/java/com/android/server/AnimationThread.java +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ public final class AnimationThread extends ServiceThread { sInstance = new AnimationThread(); sInstance.start(); sInstance.getLooper().setTraceTag(Trace.TRACE_TAG_WINDOW_MANAGER); sHandler = new Handler(sInstance.getLooper()); sHandler = makeSharedHandler(sInstance.getLooper()); } } Loading services/core/java/com/android/server/wm/SurfaceAnimationThread.java +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ public final class SurfaceAnimationThread extends ServiceThread { sInstance = new SurfaceAnimationThread(); sInstance.start(); sInstance.getLooper().setTraceTag(Trace.TRACE_TAG_WINDOW_MANAGER); sHandler = new Handler(sInstance.getLooper()); sHandler = makeSharedHandler(sInstance.getLooper()); } } Loading services/tests/wmtests/src/com/android/server/wm/SystemServiceTestsBase.java +0 −4 Original line number Diff line number Diff line Loading @@ -47,10 +47,6 @@ class SystemServiceTestsBase { mLockRule.waitForLocked(mSystemServicesTestRule::waitUntilWindowAnimatorIdle); } void cleanupWindowManagerHandlers() { mLockRule.waitForLocked(mSystemServicesTestRule::cleanupWindowManagerHandlers); } boolean waitHandlerIdle(Handler handler) { return waitHandlerIdle(handler, 0 /* timeout */); } Loading services/tests/wmtests/src/com/android/server/wm/SystemServicesTestRule.java +0 −14 Original line number Diff line number Diff line Loading @@ -370,8 +370,6 @@ public class SystemServicesTestRule implements TestRule { // This makes sure the posted messages without delay are processed, e.g. // DisplayPolicy#release, WindowManagerService#setAnimationScale. waitUntilWindowManagerHandlersIdle(); // Clear all posted messages with delay, so they don't be executed at unexpected times. cleanupWindowManagerHandlers(); // Needs to explicitly dispose current static threads because there could be messages // scheduled at a later time, and all mocks are invalid when it's executed. DisplayThread.dispose(); Loading Loading @@ -460,18 +458,6 @@ public class SystemServicesTestRule implements TestRule { return proc; } void cleanupWindowManagerHandlers() { final WindowManagerService wm = getWindowManagerService(); if (wm == null) { return; } wm.mH.removeCallbacksAndMessages(null); wm.mAnimationHandler.removeCallbacksAndMessages(null); // This is a different handler object than the wm.mAnimationHandler above. AnimationThread.getHandler().removeCallbacksAndMessages(null); SurfaceAnimationThread.getHandler().removeCallbacksAndMessages(null); } void waitUntilWindowManagerHandlersIdle() { final WindowManagerService wm = getWindowManagerService(); if (wm == null) { Loading Loading
services/core/java/com/android/server/AnimationThread.java +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ public final class AnimationThread extends ServiceThread { sInstance = new AnimationThread(); sInstance.start(); sInstance.getLooper().setTraceTag(Trace.TRACE_TAG_WINDOW_MANAGER); sHandler = new Handler(sInstance.getLooper()); sHandler = makeSharedHandler(sInstance.getLooper()); } } Loading
services/core/java/com/android/server/wm/SurfaceAnimationThread.java +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ public final class SurfaceAnimationThread extends ServiceThread { sInstance = new SurfaceAnimationThread(); sInstance.start(); sInstance.getLooper().setTraceTag(Trace.TRACE_TAG_WINDOW_MANAGER); sHandler = new Handler(sInstance.getLooper()); sHandler = makeSharedHandler(sInstance.getLooper()); } } Loading
services/tests/wmtests/src/com/android/server/wm/SystemServiceTestsBase.java +0 −4 Original line number Diff line number Diff line Loading @@ -47,10 +47,6 @@ class SystemServiceTestsBase { mLockRule.waitForLocked(mSystemServicesTestRule::waitUntilWindowAnimatorIdle); } void cleanupWindowManagerHandlers() { mLockRule.waitForLocked(mSystemServicesTestRule::cleanupWindowManagerHandlers); } boolean waitHandlerIdle(Handler handler) { return waitHandlerIdle(handler, 0 /* timeout */); } Loading
services/tests/wmtests/src/com/android/server/wm/SystemServicesTestRule.java +0 −14 Original line number Diff line number Diff line Loading @@ -370,8 +370,6 @@ public class SystemServicesTestRule implements TestRule { // This makes sure the posted messages without delay are processed, e.g. // DisplayPolicy#release, WindowManagerService#setAnimationScale. waitUntilWindowManagerHandlersIdle(); // Clear all posted messages with delay, so they don't be executed at unexpected times. cleanupWindowManagerHandlers(); // Needs to explicitly dispose current static threads because there could be messages // scheduled at a later time, and all mocks are invalid when it's executed. DisplayThread.dispose(); Loading Loading @@ -460,18 +458,6 @@ public class SystemServicesTestRule implements TestRule { return proc; } void cleanupWindowManagerHandlers() { final WindowManagerService wm = getWindowManagerService(); if (wm == null) { return; } wm.mH.removeCallbacksAndMessages(null); wm.mAnimationHandler.removeCallbacksAndMessages(null); // This is a different handler object than the wm.mAnimationHandler above. AnimationThread.getHandler().removeCallbacksAndMessages(null); SurfaceAnimationThread.getHandler().removeCallbacksAndMessages(null); } void waitUntilWindowManagerHandlersIdle() { final WindowManagerService wm = getWindowManagerService(); if (wm == null) { Loading