Apply WindowTestRunner to more WM tests

- Remove the manual locking inside test methods.
- Replace test thread with display thread for
  ActivityTaskManagerService, so it is closer to real case.
- Use null thread for ActivityManagerService so the modules
  outside WM won't be created, including:
    ActivityManagerConstants, ActiveServices, OomAdjuster,
    IntentFirewall, PendingIntentController

Bug: 140284973
Test: atest WmTests
Change-Id: I34dfd716fc1e16d034405a59d2a0f9beef0ffe36
diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskStackContainersTests.java b/services/tests/wmtests/src/com/android/server/wm/TaskStackContainersTests.java
index 74ccccc..5a0f7ed 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TaskStackContainersTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TaskStackContainersTests.java
@@ -32,15 +32,17 @@
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 
 /**
  * Tests for the {@link DisplayContent.TaskStackContainers} container in {@link DisplayContent}.
  *
  * Build/Install/Run:
- *  atest FrameworksServicesTests:TaskStackContainersTests
+ *  atest WmTests:TaskStackContainersTests
  */
 @SmallTest
 @Presubmit
+@RunWith(WindowTestRunner.class)
 public class TaskStackContainersTests extends WindowTestsBase {
 
     private TaskStack mPinnedStack;