summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/am/TEST_MAPPING22
-rw-r--r--services/core/java/com/android/server/policy/TEST_MAPPING22
-rw-r--r--services/core/java/com/android/server/wm/TEST_MAPPING22
-rw-r--r--services/tests/wmtests/Android.mk5
-rw-r--r--services/tests/wmtests/AndroidManifest.xml22
-rw-r--r--services/tests/wmtests/AndroidTest.xml4
-rw-r--r--services/tests/wmtests/src/com/android/server/am/ActivityLaunchParamsModifierTests.java (renamed from services/tests/servicestests/src/com/android/server/am/ActivityLaunchParamsModifierTests.java)2
-rw-r--r--services/tests/wmtests/src/com/android/server/am/ActivityManagerInternalTest.java (renamed from services/tests/servicestests/src/com/android/server/am/ActivityManagerInternalTest.java)13
-rw-r--r--services/tests/wmtests/src/com/android/server/am/ActivityManagerServiceTest.java (renamed from services/tests/servicestests/src/com/android/server/am/ActivityManagerServiceTest.java)13
-rw-r--r--services/tests/wmtests/src/com/android/server/am/ActivityManagerTest.java (renamed from services/tests/servicestests/src/com/android/server/am/ActivityManagerTest.java)9
-rw-r--r--services/tests/wmtests/src/com/android/server/am/ActivityOptionsTest.java (renamed from services/tests/servicestests/src/com/android/server/am/ActivityOptionsTest.java)5
-rw-r--r--services/tests/wmtests/src/com/android/server/am/ActivityRecordTests.java (renamed from services/tests/servicestests/src/com/android/server/am/ActivityRecordTests.java)2
-rw-r--r--services/tests/wmtests/src/com/android/server/am/ActivityStackSupervisorTests.java (renamed from services/tests/servicestests/src/com/android/server/am/ActivityStackSupervisorTests.java)2
-rw-r--r--services/tests/wmtests/src/com/android/server/am/ActivityStackTests.java (renamed from services/tests/servicestests/src/com/android/server/am/ActivityStackTests.java)2
-rw-r--r--services/tests/wmtests/src/com/android/server/am/ActivityStartControllerTests.java (renamed from services/tests/servicestests/src/com/android/server/am/ActivityStartControllerTests.java)2
-rw-r--r--services/tests/wmtests/src/com/android/server/am/ActivityStartInterceptorTest.java (renamed from services/tests/servicestests/src/com/android/server/am/ActivityStartInterceptorTest.java)2
-rw-r--r--services/tests/wmtests/src/com/android/server/am/ActivityStarterTests.java (renamed from services/tests/servicestests/src/com/android/server/am/ActivityStarterTests.java)2
-rw-r--r--services/tests/wmtests/src/com/android/server/am/ActivityTestsBase.java (renamed from services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java)14
-rw-r--r--services/tests/wmtests/src/com/android/server/am/AppErrorDialogTest.java (renamed from services/tests/servicestests/src/com/android/server/am/AppErrorDialogTest.java)5
-rw-r--r--services/tests/wmtests/src/com/android/server/am/AssistDataRequesterTest.java (renamed from services/tests/servicestests/src/com/android/server/am/AssistDataRequesterTest.java)3
-rw-r--r--services/tests/wmtests/src/com/android/server/am/BroadcastRecordTest.java (renamed from services/tests/servicestests/src/com/android/server/am/BroadcastRecordTest.java)2
-rw-r--r--services/tests/wmtests/src/com/android/server/am/ClientLifecycleManagerTests.java (renamed from services/tests/servicestests/src/com/android/server/am/ClientLifecycleManagerTests.java)22
-rw-r--r--services/tests/wmtests/src/com/android/server/am/CoreSettingsObserverTest.java (renamed from services/tests/servicestests/src/com/android/server/am/CoreSettingsObserverTest.java)13
-rw-r--r--services/tests/wmtests/src/com/android/server/am/DummyAmTests.java46
-rw-r--r--services/tests/wmtests/src/com/android/server/am/GlobalSettingsToPropertiesMapperTest.java (renamed from services/tests/servicestests/src/com/android/server/am/GlobalSettingsToPropertiesMapperTest.java)3
-rw-r--r--services/tests/wmtests/src/com/android/server/am/LaunchParamsControllerTests.java (renamed from services/tests/servicestests/src/com/android/server/am/LaunchParamsControllerTests.java)2
-rw-r--r--services/tests/wmtests/src/com/android/server/am/LockTaskControllerTest.java (renamed from services/tests/servicestests/src/com/android/server/am/LockTaskControllerTest.java)19
-rw-r--r--services/tests/wmtests/src/com/android/server/am/MemoryStatUtilTest.java (renamed from services/tests/servicestests/src/com/android/server/am/MemoryStatUtilTest.java)6
-rw-r--r--services/tests/wmtests/src/com/android/server/am/PendingRemoteAnimationRegistryTest.java (renamed from services/tests/servicestests/src/com/android/server/am/PendingRemoteAnimationRegistryTest.java)5
-rw-r--r--services/tests/wmtests/src/com/android/server/am/PersistentConnectionTest.java (renamed from services/tests/servicestests/src/com/android/server/am/PersistentConnectionTest.java)7
-rw-r--r--services/tests/wmtests/src/com/android/server/am/RecentTasksTest.java (renamed from services/tests/servicestests/src/com/android/server/am/RecentTasksTest.java)11
-rw-r--r--services/tests/wmtests/src/com/android/server/am/RecentsAnimationTest.java (renamed from services/tests/servicestests/src/com/android/server/am/RecentsAnimationTest.java)5
-rw-r--r--services/tests/wmtests/src/com/android/server/am/RunningTasksTest.java (renamed from services/tests/servicestests/src/com/android/server/am/RunningTasksTest.java)6
-rw-r--r--services/tests/wmtests/src/com/android/server/am/SafeActivityOptionsTest.java (renamed from services/tests/servicestests/src/com/android/server/am/SafeActivityOptionsTest.java)6
-rw-r--r--services/tests/wmtests/src/com/android/server/am/TaskLaunchParamsModifierTests.java (renamed from services/tests/servicestests/src/com/android/server/am/TaskLaunchParamsModifierTests.java)3
-rw-r--r--services/tests/wmtests/src/com/android/server/am/TaskPersisterTest.java (renamed from services/tests/servicestests/src/com/android/server/am/TaskPersisterTest.java)12
-rw-r--r--services/tests/wmtests/src/com/android/server/am/TaskRecordTests.java (renamed from services/tests/servicestests/src/com/android/server/am/TaskRecordTests.java)2
-rw-r--r--services/tests/wmtests/src/com/android/server/am/TaskStackChangedListenerTest.java (renamed from services/tests/servicestests/src/com/android/server/am/TaskStackChangedListenerTest.java)6
-rw-r--r--services/tests/wmtests/src/com/android/server/am/UserControllerTest.java (renamed from services/tests/servicestests/src/com/android/server/am/UserControllerTest.java)51
-rw-r--r--services/tests/wmtests/src/com/android/server/policy/FakeWindowState.java (renamed from services/tests/servicestests/src/com/android/server/policy/FakeWindowState.java)4
-rw-r--r--services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerInsetsTest.java (renamed from services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerInsetsTest.java)6
-rw-r--r--services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerLayoutTest.java (renamed from services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerLayoutTest.java)6
-rw-r--r--services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerTest.java (renamed from services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerTest.java)6
-rw-r--r--services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerTestBase.java (renamed from services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerTestBase.java)4
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/AnimatingAppWindowTokenRegistryTest.java (renamed from services/tests/servicestests/src/com/android/server/wm/AnimatingAppWindowTokenRegistryTest.java)2
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/AppTransitionTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/AppTransitionTests.java)3
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/AppWindowContainerControllerTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/AppWindowContainerControllerTests.java)3
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/AppWindowTokenAnimationTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/AppWindowTokenAnimationTests.java)6
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/AppWindowTokenTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/AppWindowTokenTests.java)2
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/BoundsAnimationControllerTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/BoundsAnimationControllerTests.java)3
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/ConfigurationContainerTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/ConfigurationContainerTests.java)3
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/DimmerTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/DimmerTests.java)4
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/DisplayContentTests.java)3
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/DisplaySettingsTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/DisplaySettingsTests.java)6
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/DragDropControllerTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/DragDropControllerTests.java)3
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/DummyWmTests.java46
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/PinnedStackControllerTest.java (renamed from services/tests/servicestests/src/com/android/server/wm/PinnedStackControllerTest.java)6
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/RecentsAnimationControllerTest.java (renamed from services/tests/servicestests/src/com/android/server/wm/RecentsAnimationControllerTest.java)5
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/RemoteAnimationControllerTest.java (renamed from services/tests/servicestests/src/com/android/server/wm/RemoteAnimationControllerTest.java)5
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/RootWindowContainerTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/RootWindowContainerTests.java)2
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/ScreenDecorWindowTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/ScreenDecorWindowTests.java)2
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/StackWindowControllerTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/StackWindowControllerTests.java)2
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/SurfaceAnimationRunnerTest.java (renamed from services/tests/servicestests/src/com/android/server/wm/SurfaceAnimationRunnerTest.java)7
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/SurfaceAnimatorTest.java (renamed from services/tests/servicestests/src/com/android/server/wm/SurfaceAnimatorTest.java)3
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/TaskPositionerTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/TaskPositionerTests.java)3
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/TaskPositioningControllerTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/TaskPositioningControllerTests.java)3
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/TaskSnapshotCacheTest.java (renamed from services/tests/servicestests/src/com/android/server/wm/TaskSnapshotCacheTest.java)3
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/TaskSnapshotControllerTest.java (renamed from services/tests/servicestests/src/com/android/server/wm/TaskSnapshotControllerTest.java)6
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/TaskSnapshotPersisterLoaderTest.java (renamed from services/tests/servicestests/src/com/android/server/wm/TaskSnapshotPersisterLoaderTest.java)3
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/TaskSnapshotPersisterTestBase.java (renamed from services/tests/servicestests/src/com/android/server/wm/TaskSnapshotPersisterTestBase.java)0
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java (renamed from services/tests/servicestests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java)3
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/TaskStackContainersTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/TaskStackContainersTests.java)2
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/TaskStackTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/TaskStackTests.java)2
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/TaskWindowContainerControllerTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/TaskWindowContainerControllerTests.java)2
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/TestIWindow.java (renamed from services/tests/servicestests/src/com/android/server/wm/TestIWindow.java)4
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/TestWindowManagerPolicy.java (renamed from services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java)0
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/UnknownAppVisibilityControllerTest.java (renamed from services/tests/servicestests/src/com/android/server/wm/UnknownAppVisibilityControllerTest.java)3
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/WallpaperControllerTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/WallpaperControllerTests.java)0
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/WindowAnimationSpecTest.java (renamed from services/tests/servicestests/src/com/android/server/wm/WindowAnimationSpecTest.java)3
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/WindowConfigurationTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/WindowConfigurationTests.java)2
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/WindowContainerControllerTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/WindowContainerControllerTests.java)2
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/WindowContainerTests.java)2
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/WindowContainerTraversalTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/WindowContainerTraversalTests.java)3
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/WindowFrameTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java)4
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceRule.java (renamed from services/tests/servicestests/src/com/android/server/wm/WindowManagerServiceRule.java)0
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceRuleTest.java (renamed from services/tests/servicestests/src/com/android/server/wm/WindowManagerServiceRuleTest.java)0
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/WindowStateTests.java)11
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/WindowSurfacePlacerTest.java (renamed from services/tests/servicestests/src/com/android/server/wm/WindowSurfacePlacerTest.java)6
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/WindowTestUtils.java (renamed from services/tests/servicestests/src/com/android/server/wm/WindowTestUtils.java)28
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java (renamed from services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java)0
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/WindowTokenTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/WindowTokenTests.java)2
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/WindowTracingTest.java (renamed from services/tests/servicestests/src/com/android/server/wm/WindowTracingTest.java)3
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/ZOrderingTests.java (renamed from services/tests/servicestests/src/com/android/server/wm/ZOrderingTests.java)2
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/utils/CoordinateTransformsTest.java (renamed from services/tests/servicestests/src/com/android/server/wm/utils/CoordinateTransformsTest.java)18
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/utils/InsetUtilsTest.java (renamed from services/tests/servicestests/src/com/android/server/wm/utils/InsetUtilsTest.java)6
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/utils/RotationCacheTest.java (renamed from services/tests/servicestests/src/com/android/server/wm/utils/RotationCacheTest.java)6
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/utils/WmDisplayCutoutTest.java (renamed from services/tests/servicestests/src/com/android/server/wm/utils/WmDisplayCutoutTest.java)4
97 files changed, 336 insertions, 342 deletions
diff --git a/services/core/java/com/android/server/am/TEST_MAPPING b/services/core/java/com/android/server/am/TEST_MAPPING
index b817669ce70c..3f603cc55f82 100644
--- a/services/core/java/com/android/server/am/TEST_MAPPING
+++ b/services/core/java/com/android/server/am/TEST_MAPPING
@@ -37,20 +37,6 @@
]
},
{
- "name": "FrameworksServicesTests",
- "options": [
- {
- "include-filter": "com.android.server.am."
- },
- {
- "include-annotation": "android.platform.test.annotations.Presubmit"
- },
- {
- "exclude-annotation": "androidx.test.filters.FlakyTest"
- }
- ]
- },
- {
"name": "WmTests",
"options": [
{
@@ -73,14 +59,6 @@
"name": "CtsActivityManagerDeviceSdk25TestCases"
},
{
- "name": "FrameworksServicesTests",
- "options": [
- {
- "include-filter": "com.android.server.am."
- }
- ]
- },
- {
"name": "WmTests",
"options": [
{
diff --git a/services/core/java/com/android/server/policy/TEST_MAPPING b/services/core/java/com/android/server/policy/TEST_MAPPING
index e212b0481ed6..50c81f5222de 100644
--- a/services/core/java/com/android/server/policy/TEST_MAPPING
+++ b/services/core/java/com/android/server/policy/TEST_MAPPING
@@ -1,20 +1,6 @@
{
"presubmit": [
{
- "name": "FrameworksServicesTests",
- "options": [
- {
- "include-filter": "com.android.server.policy."
- },
- {
- "include-annotation": "android.platform.test.annotations.Presubmit"
- },
- {
- "exclude-annotation": "android.support.test.filters.FlakyTest"
- }
- ]
- },
- {
"name": "WmTests",
"options": [
{
@@ -31,14 +17,6 @@
],
"postsubmit": [
{
- "name": "FrameworksServicesTests",
- "options": [
- {
- "include-filter": "com.android.server.policy."
- }
- ]
- },
- {
"name": "WmTests",
"options": [
{
diff --git a/services/core/java/com/android/server/wm/TEST_MAPPING b/services/core/java/com/android/server/wm/TEST_MAPPING
index 0c9a14be964f..30d84fb4923c 100644
--- a/services/core/java/com/android/server/wm/TEST_MAPPING
+++ b/services/core/java/com/android/server/wm/TEST_MAPPING
@@ -12,20 +12,6 @@
]
},
{
- "name": "FrameworksServicesTests",
- "options": [
- {
- "include-filter": "com.android.server.wm."
- },
- {
- "include-annotation": "android.platform.test.annotations.Presubmit"
- },
- {
- "exclude-annotation": "androidx.test.filters.FlakyTest"
- }
- ]
- },
- {
"name": "WmTests",
"options": [
{
@@ -45,14 +31,6 @@
"name": "CtsWindowManagerDeviceTestCases"
},
{
- "name": "FrameworksServicesTests",
- "options": [
- {
- "include-filter": "com.android.server.wm."
- }
- ]
- },
- {
"name": "WmTests",
"options": [
{
diff --git a/services/tests/wmtests/Android.mk b/services/tests/wmtests/Android.mk
index 0f8b18ab92cf..9a6c2252ffdf 100644
--- a/services/tests/wmtests/Android.mk
+++ b/services/tests/wmtests/Android.mk
@@ -14,9 +14,14 @@ LOCAL_SRC_FILES := \
$(call all-java-files-under, ../servicestests/utils)
LOCAL_STATIC_JAVA_LIBRARIES := \
+ frameworks-base-testutils \
+ services.core \
androidx-test \
mockito-target-minus-junit4 \
platform-test-annotations \
+ truth-prebuilt \
+ testables \
+ ub-uiautomator \
LOCAL_JAVA_LIBRARIES := \
android.test.mock \
diff --git a/services/tests/wmtests/AndroidManifest.xml b/services/tests/wmtests/AndroidManifest.xml
index 1fb947309028..a03573da0aca 100644
--- a/services/tests/wmtests/AndroidManifest.xml
+++ b/services/tests/wmtests/AndroidManifest.xml
@@ -22,7 +22,27 @@
android:minSdkVersion="1"
android:targetSdkVersion="28" />
- <application android:testOnly="true" />
+ <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
+ <uses-permission android:name="android.permission.WAKE_LOCK" />
+ <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />
+ <uses-permission android:name="android.permission.MANAGE_ACTIVITY_STACKS" />
+ <uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
+ <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
+ <uses-permission android:name="android.permission.STATUS_BAR_SERVICE" />
+ <uses-permission android:name="android.permission.ACCESS_SURFACE_FLINGER" />
+ <uses-permission android:name="android.permission.READ_FRAME_BUFFER" />
+ <uses-permission android:name="android.permission.GET_TOP_ACTIVITY_INFO" />
+ <uses-permission android:name="android.permission.REORDER_TASKS" />
+ <uses-permission android:name="android.permission.MANAGE_USERS" />
+
+ <application android:testOnly="true">
+ <activity android:name="com.android.server.am.TaskStackChangedListenerTest$ActivityA" />
+ <activity android:name="com.android.server.am.TaskStackChangedListenerTest$ActivityB" />
+ <activity android:name="com.android.server.am.TaskStackChangedListenerTest$ActivityRequestedOrientationChange" />
+ <activity android:name="com.android.server.am.TaskStackChangedListenerTest$ActivityTaskChangeCallbacks" />
+ <activity android:name="com.android.server.am.TaskStackChangedListenerTest$ActivityTaskDescriptionChange" />
+ <activity android:name="com.android.server.wm.ScreenDecorWindowTests$TestActivity" />
+ </application>
<instrumentation
android:name="androidx.test.runner.AndroidJUnitRunner"
diff --git a/services/tests/wmtests/AndroidTest.xml b/services/tests/wmtests/AndroidTest.xml
index 2717ef901216..16e16dc75329 100644
--- a/services/tests/wmtests/AndroidTest.xml
+++ b/services/tests/wmtests/AndroidTest.xml
@@ -24,9 +24,9 @@
</target_preparer>
<option name="test-tag" value="WmTests" />
- <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+ <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
<option name="package" value="com.android.frameworks.wmtests" />
<option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
- <option name="hidden-api-checks" value="false" />
+ <option name="hidden-api-checks" value="false"/>
</test>
</configuration>
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityLaunchParamsModifierTests.java b/services/tests/wmtests/src/com/android/server/am/ActivityLaunchParamsModifierTests.java
index 9de64f2cf211..fb09f0dcdf91 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityLaunchParamsModifierTests.java
+++ b/services/tests/wmtests/src/com/android/server/am/ActivityLaunchParamsModifierTests.java
@@ -44,7 +44,7 @@ import org.junit.runner.RunWith;
* Tests for exercising resizing bounds due to activity options.
*
* Build/Install/Run:
- * atest FrameworksServicesTests:ActivityLaunchParamsModifierTests
+ * atest WmTests:ActivityLaunchParamsModifierTests
*/
@MediumTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityManagerInternalTest.java b/services/tests/wmtests/src/com/android/server/am/ActivityManagerInternalTest.java
index 9a7488e42326..751ac520a7d0 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityManagerInternalTest.java
+++ b/services/tests/wmtests/src/com/android/server/am/ActivityManagerInternalTest.java
@@ -34,17 +34,8 @@ import org.mockito.MockitoAnnotations;
/**
* Test class for {@link ActivityManagerInternal}.
*
- * To run the tests, use
- *
- * runtest -c com.android.server.am.ActivityManagerInternalTest frameworks-services
- *
- * or the following steps:
- *
- * Build: m FrameworksServicesTests
- * Install: adb install -r \
- * ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk
- * Run: adb shell am instrument -e class com.android.server.am.ActivityManagerInternalTest -w \
- * com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner
+ * Build/Install/Run:
+ * atest WmTests:ActivityManagerInternalTest
*/
@RunWith(AndroidJUnit4.class)
public class ActivityManagerInternalTest {
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityManagerServiceTest.java b/services/tests/wmtests/src/com/android/server/am/ActivityManagerServiceTest.java
index 47ce8796e449..5d5f930e3f3b 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityManagerServiceTest.java
+++ b/services/tests/wmtests/src/com/android/server/am/ActivityManagerServiceTest.java
@@ -89,17 +89,8 @@ import java.util.function.Function;
/**
* Test class for {@link ActivityManagerService}.
*
- * To run the tests, use
- *
- * runtest -c com.android.server.am.ActivityManagerServiceTest frameworks-services
- *
- * or the following steps:
- *
- * Build: m FrameworksServicesTests
- * Install: adb install -r \
- * ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk
- * Run: adb shell am instrument -e class com.android.server.am.ActivityManagerServiceTest -w \
- * com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner
+ * Build/Install/Run:
+ * atest WmTests:ActivityManagerServiceTest
*/
@SmallTest
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityManagerTest.java b/services/tests/wmtests/src/com/android/server/am/ActivityManagerTest.java
index ba25b1659bd2..a2f942e7f96e 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityManagerTest.java
+++ b/services/tests/wmtests/src/com/android/server/am/ActivityManagerTest.java
@@ -18,13 +18,18 @@ package com.android.server.am;
import android.app.ActivityManager;
import android.app.IActivityManager;
-import android.os.ServiceManager;
-import android.os.UserHandle;
import android.os.RemoteException;
+import android.os.UserHandle;
import android.test.AndroidTestCase;
import java.util.List;
+/**
+ * Tests for {@link ActivityManager}.
+ *
+ * Build/Install/Run:
+ * atest WmTests:ActivityManagerTest
+ */
public class ActivityManagerTest extends AndroidTestCase {
IActivityManager service;
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityOptionsTest.java b/services/tests/wmtests/src/com/android/server/am/ActivityOptionsTest.java
index d15bff4f6378..45c509aad108 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityOptionsTest.java
+++ b/services/tests/wmtests/src/com/android/server/am/ActivityOptionsTest.java
@@ -34,7 +34,10 @@ import org.junit.Test;
import org.junit.runner.RunWith;
/**
- * atest FrameworksServicesTests:ActivityOptionsTest
+ * Tests for {@link ActivityOptions}.
+ *
+ * Build/Install/Run:
+ * atest WmTests:ActivityOptionsTest
*/
@MediumTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityRecordTests.java b/services/tests/wmtests/src/com/android/server/am/ActivityRecordTests.java
index ffc7fa26d9a1..171203aa63c2 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityRecordTests.java
+++ b/services/tests/wmtests/src/com/android/server/am/ActivityRecordTests.java
@@ -63,7 +63,7 @@ import org.mockito.invocation.InvocationOnMock;
* Tests for the {@link ActivityRecord} class.
*
* Build/Install/Run:
- * atest FrameworksServicesTests:com.android.server.am.ActivityRecordTests
+ * atest WmTests:com.android.server.am.ActivityRecordTests
*/
@MediumTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityStackSupervisorTests.java b/services/tests/wmtests/src/com/android/server/am/ActivityStackSupervisorTests.java
index 0345a81b5bec..2e4924550cce 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityStackSupervisorTests.java
+++ b/services/tests/wmtests/src/com/android/server/am/ActivityStackSupervisorTests.java
@@ -58,7 +58,7 @@ import java.util.ArrayList;
* Tests for the {@link ActivityStackSupervisor} class.
*
* Build/Install/Run:
- * atest FrameworksServicesTests:com.android.server.am.ActivityStackSupervisorTests
+ * atest WmTests:ActivityStackSupervisorTests
*/
@MediumTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityStackTests.java b/services/tests/wmtests/src/com/android/server/am/ActivityStackTests.java
index ab814ee15df0..971ae9966e93 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityStackTests.java
+++ b/services/tests/wmtests/src/com/android/server/am/ActivityStackTests.java
@@ -54,7 +54,7 @@ import org.junit.runner.RunWith;
* Tests for the {@link ActivityStack} class.
*
* Build/Install/Run:
- * atest FrameworksServicesTests:com.android.server.am.ActivityStackTests
+ * atest WmTests:ActivityStackTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityStartControllerTests.java b/services/tests/wmtests/src/com/android/server/am/ActivityStartControllerTests.java
index e1ebbcf8f653..6d110a06aef1 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityStartControllerTests.java
+++ b/services/tests/wmtests/src/com/android/server/am/ActivityStartControllerTests.java
@@ -46,7 +46,7 @@ import java.util.Random;
* Tests for the {@link ActivityStartController} class.
*
* Build/Install/Run:
- * atest FrameworksServicesTests:ActivityStartControllerTests
+ * atest WmTests:ActivityStartControllerTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityStartInterceptorTest.java b/services/tests/wmtests/src/com/android/server/am/ActivityStartInterceptorTest.java
index 86541b95f395..fb28b9b3e29e 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityStartInterceptorTest.java
+++ b/services/tests/wmtests/src/com/android/server/am/ActivityStartInterceptorTest.java
@@ -59,7 +59,7 @@ import org.mockito.MockitoAnnotations;
* Unit tests for {@link ActivityStartInterceptorTest}.
*
* Build/Install/Run:
- * atest FrameworksServicesTests:com.android.server.am.ActivityStartInterceptorTest
+ * atest WmTests:ActivityStartInterceptorTest
*/
@Presubmit
@SmallTest
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityStarterTests.java b/services/tests/wmtests/src/com/android/server/am/ActivityStarterTests.java
index 749403ea4013..2aa6bda6d0b1 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityStarterTests.java
+++ b/services/tests/wmtests/src/com/android/server/am/ActivityStarterTests.java
@@ -84,7 +84,7 @@ import org.junit.runner.RunWith;
* Tests for the {@link ActivityStarter} class.
*
* Build/Install/Run:
- * atest FrameworksServicesTests:ActivityStarterTests
+ * atest WmTests:ActivityStarterTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java b/services/tests/wmtests/src/com/android/server/am/ActivityTestsBase.java
index 0e8200992a14..2902ee2b1639 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
+++ b/services/tests/wmtests/src/com/android/server/am/ActivityTestsBase.java
@@ -39,14 +39,6 @@ import static org.mockito.Mockito.spy;
import android.app.ActivityManagerInternal;
import android.app.ActivityOptions;
-import android.content.pm.PackageManagerInternal;
-import com.android.server.uri.UriGrantsManagerInternal;
-import com.android.server.wm.ActivityTaskManagerInternal;
-import com.android.server.wm.DisplayWindowController;
-
-import org.junit.Rule;
-import org.mockito.invocation.InvocationOnMock;
-
import android.app.IApplicationThread;
import android.content.ComponentName;
import android.content.Context;
@@ -54,6 +46,7 @@ import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.ApplicationInfo;
import android.content.pm.IPackageManager;
+import android.content.pm.PackageManagerInternal;
import android.content.res.Configuration;
import android.graphics.Rect;
import android.hardware.display.DisplayManager;
@@ -70,7 +63,10 @@ import androidx.test.InstrumentationRegistry;
import com.android.internal.app.IVoiceInteractor;
import com.android.server.AttributeCache;
+import com.android.server.uri.UriGrantsManagerInternal;
+import com.android.server.wm.ActivityTaskManagerInternal;
import com.android.server.wm.AppWindowContainerController;
+import com.android.server.wm.DisplayWindowController;
import com.android.server.wm.PinnedStackWindowController;
import com.android.server.wm.RootWindowContainerController;
import com.android.server.wm.StackWindowController;
@@ -80,7 +76,9 @@ import com.android.server.wm.WindowTestUtils;
import org.junit.After;
import org.junit.Before;
+import org.junit.Rule;
import org.mockito.MockitoAnnotations;
+import org.mockito.invocation.InvocationOnMock;
import java.util.List;
diff --git a/services/tests/servicestests/src/com/android/server/am/AppErrorDialogTest.java b/services/tests/wmtests/src/com/android/server/am/AppErrorDialogTest.java
index 87d367fcb2b2..01351bbd3992 100644
--- a/services/tests/servicestests/src/com/android/server/am/AppErrorDialogTest.java
+++ b/services/tests/wmtests/src/com/android/server/am/AppErrorDialogTest.java
@@ -33,7 +33,10 @@ import org.junit.runner.RunWith;
import java.io.File;
/**
- * runtest -c com.android.server.am.AppErrorDialogTest frameworks-services
+ * Tests for {@link AppErrorDialog}.
+ *
+ * Build/Install/Run:
+ * atest WmTests:AppErrorDialogTest
*/
@RunWith(AndroidJUnit4.class)
@SmallTest
diff --git a/services/tests/servicestests/src/com/android/server/am/AssistDataRequesterTest.java b/services/tests/wmtests/src/com/android/server/am/AssistDataRequesterTest.java
index a030210398d6..20ddd8b0c704 100644
--- a/services/tests/servicestests/src/com/android/server/am/AssistDataRequesterTest.java
+++ b/services/tests/wmtests/src/com/android/server/am/AssistDataRequesterTest.java
@@ -64,7 +64,8 @@ import java.util.concurrent.TimeUnit;
* Note: Currently, we only support fetching the screenshot for the current application, so the
* screenshot checks are hardcoded accordingly.
*
- * runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/am/AssistDataRequesterTest.java
+ * Build/Install/Run:
+ * atest WmTests:AssistDataRequesterTest
*/
@MediumTest
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/servicestests/src/com/android/server/am/BroadcastRecordTest.java b/services/tests/wmtests/src/com/android/server/am/BroadcastRecordTest.java
index 62c5734561f9..f8c88b264705 100644
--- a/services/tests/servicestests/src/com/android/server/am/BroadcastRecordTest.java
+++ b/services/tests/wmtests/src/com/android/server/am/BroadcastRecordTest.java
@@ -40,7 +40,7 @@ import java.util.List;
* Test class for {@link BroadcastRecord}.
*
* Build/Install/Run:
- * atest FrameworksServicesTests:com.android.server.am.BroadcastRecordTest
+ * atest WmTests:BroadcastRecordTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/am/ClientLifecycleManagerTests.java b/services/tests/wmtests/src/com/android/server/am/ClientLifecycleManagerTests.java
index b4ad183db386..457c12eebcac 100644
--- a/services/tests/servicestests/src/com/android/server/am/ClientLifecycleManagerTests.java
+++ b/services/tests/wmtests/src/com/android/server/am/ClientLifecycleManagerTests.java
@@ -1,3 +1,19 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
package com.android.server.am;
import static org.mockito.Mockito.mock;
@@ -16,6 +32,12 @@ import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
+/**
+ * Test class for {@link ClientLifecycleManager}.
+ *
+ * Build/Install/Run:
+ * atest WmTests:ClientLifecycleManagerTests
+ */
@RunWith(AndroidJUnit4.class)
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/am/CoreSettingsObserverTest.java b/services/tests/wmtests/src/com/android/server/am/CoreSettingsObserverTest.java
index fe8256eeb977..60389ae7650f 100644
--- a/services/tests/servicestests/src/com/android/server/am/CoreSettingsObserverTest.java
+++ b/services/tests/wmtests/src/com/android/server/am/CoreSettingsObserverTest.java
@@ -48,17 +48,8 @@ import java.io.File;
/**
* Test class for {@link CoreSettingsObserver}.
*
- * To run the tests, use
- *
- * runtest -c com.android.server.am.CoreSettingsObserverTest frameworks-services
- *
- * or the following steps:
- *
- * Build: m FrameworksServicesTests
- * Install: adb install -r \
- * ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk
- * Run: adb shell am instrument -e class com.android.server.am.CoreSettingsObserverTest -w \
- * com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner
+ * Build/Install/Run:
+ * atest WmTests:CoreSettingsObserverTest
*/
@SmallTest
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/wmtests/src/com/android/server/am/DummyAmTests.java b/services/tests/wmtests/src/com/android/server/am/DummyAmTests.java
deleted file mode 100644
index 023e4ab6636f..000000000000
--- a/services/tests/wmtests/src/com/android/server/am/DummyAmTests.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.am;
-
-import android.platform.test.annotations.Presubmit;
-
-import org.junit.Test;
-
-import androidx.test.filters.FlakyTest;
-
-/**
- * Dummy test for com.android.server.am.
- * TODO(b/113800711): Remove this class once the actual tests are moved from servicestests.
- */
-public class DummyAmTests {
-
- @Presubmit
- @Test
- public void preSubmitTest() {}
-
- @FlakyTest
- @Presubmit
- @Test
- public void flakyPreSubmitTest() {}
-
- @Test
- public void postSubmitTest() {}
-
- @FlakyTest
- @Test
- public void flakyPostSubmitTest() {}
-}
diff --git a/services/tests/servicestests/src/com/android/server/am/GlobalSettingsToPropertiesMapperTest.java b/services/tests/wmtests/src/com/android/server/am/GlobalSettingsToPropertiesMapperTest.java
index 765aaad45efb..0395db9a2092 100644
--- a/services/tests/servicestests/src/com/android/server/am/GlobalSettingsToPropertiesMapperTest.java
+++ b/services/tests/wmtests/src/com/android/server/am/GlobalSettingsToPropertiesMapperTest.java
@@ -37,6 +37,9 @@ import java.util.Map;
/**
* Tests for {@link GlobalSettingsToPropertiesMapper}
+ *
+ * Build/Install/Run:
+ * atest WmTests:GlobalSettingsToPropertiesMapperTest
*/
@RunWith(AndroidJUnit4.class)
@SmallTest
diff --git a/services/tests/servicestests/src/com/android/server/am/LaunchParamsControllerTests.java b/services/tests/wmtests/src/com/android/server/am/LaunchParamsControllerTests.java
index d4bab2ef2a43..73b819e968fa 100644
--- a/services/tests/servicestests/src/com/android/server/am/LaunchParamsControllerTests.java
+++ b/services/tests/wmtests/src/com/android/server/am/LaunchParamsControllerTests.java
@@ -52,7 +52,7 @@ import org.junit.runner.RunWith;
* Tests for exercising {@link LaunchParamsController}.
*
* Build/Install/Run:
- * atest FrameworksServicesTests:LaunchParamsControllerTests
+ * atest WmTests:LaunchParamsControllerTests
*/
@MediumTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/am/LockTaskControllerTest.java b/services/tests/wmtests/src/com/android/server/am/LockTaskControllerTest.java
index 863a0d8d34a4..1ce5c422f8ef 100644
--- a/services/tests/servicestests/src/com/android/server/am/LockTaskControllerTest.java
+++ b/services/tests/wmtests/src/com/android/server/am/LockTaskControllerTest.java
@@ -35,9 +35,20 @@ import static android.telecom.TelecomManager.EMERGENCY_DIALER_COMPONENT;
import static com.android.server.am.LockTaskController.STATUS_BAR_MASK_LOCKED;
import static com.android.server.am.LockTaskController.STATUS_BAR_MASK_PINNED;
-import static org.junit.Assert.*;
-import static org.mockito.ArgumentMatchers.*;
-import static org.mockito.Mockito.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
import android.app.StatusBarManager;
import android.app.admin.DevicePolicyManager;
@@ -77,7 +88,7 @@ import org.mockito.verification.VerificationMode;
* Unit tests for {@link LockTaskController}.
*
* Build/Install/Run:
- * bit FrameworksServicesTests:com.android.server.am.LockTaskControllerTest
+ * atest WmTests:LockTaskControllerTest
*/
@Presubmit
@SmallTest
diff --git a/services/tests/servicestests/src/com/android/server/am/MemoryStatUtilTest.java b/services/tests/wmtests/src/com/android/server/am/MemoryStatUtilTest.java
index 06c74371eb51..912b02370f60 100644
--- a/services/tests/servicestests/src/com/android/server/am/MemoryStatUtilTest.java
+++ b/services/tests/wmtests/src/com/android/server/am/MemoryStatUtilTest.java
@@ -29,6 +29,12 @@ import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
+/**
+ * Tests for {@link MemoryStatUtil}.
+ *
+ * Build/Install/Run:
+ * atest WmTests:MemoryStatUtilTest
+ */
@RunWith(AndroidJUnit4.class)
@SmallTest
public class MemoryStatUtilTest {
diff --git a/services/tests/servicestests/src/com/android/server/am/PendingRemoteAnimationRegistryTest.java b/services/tests/wmtests/src/com/android/server/am/PendingRemoteAnimationRegistryTest.java
index 1c4e0f64759b..e69d2071c9e6 100644
--- a/services/tests/servicestests/src/com/android/server/am/PendingRemoteAnimationRegistryTest.java
+++ b/services/tests/wmtests/src/com/android/server/am/PendingRemoteAnimationRegistryTest.java
@@ -38,7 +38,10 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
/**
- * atest PendingRemoteAnimationRegistryTest
+ * Tests for {@link PendingRemoteAnimationRegistry}.
+ *
+ * Build/Install/Run:
+ * atest WmTests:PendingRemoteAnimationRegistryTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/am/PersistentConnectionTest.java b/services/tests/wmtests/src/com/android/server/am/PersistentConnectionTest.java
index 54f93a88a387..5c42081d4655 100644
--- a/services/tests/servicestests/src/com/android/server/am/PersistentConnectionTest.java
+++ b/services/tests/wmtests/src/com/android/server/am/PersistentConnectionTest.java
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package com.android.server.am;
import static org.mockito.ArgumentMatchers.any;
@@ -41,6 +42,12 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
+/**
+ * Tests for {@link PersistentConnection}.
+ *
+ * Build/Install/Run:
+ * atest WmTests:PersistentConnectionTest
+ */
@SmallTest
public class PersistentConnectionTest extends AndroidTestCase {
private static class MyConnection extends PersistentConnection<IDeviceAdminService> {
diff --git a/services/tests/servicestests/src/com/android/server/am/RecentTasksTest.java b/services/tests/wmtests/src/com/android/server/am/RecentTasksTest.java
index 70cfad1d0f2f..93685d8a83f3 100644
--- a/services/tests/servicestests/src/com/android/server/am/RecentTasksTest.java
+++ b/services/tests/wmtests/src/com/android/server/am/RecentTasksTest.java
@@ -17,7 +17,6 @@
package com.android.server.am;
import static android.app.ActivityTaskManager.SPLIT_SCREEN_CREATE_MODE_TOP_OR_LEFT;
-import static android.app.WindowConfiguration.ACTIVITY_TYPE_ASSISTANT;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
@@ -38,6 +37,8 @@ import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.spy;
+import static java.lang.Integer.MAX_VALUE;
+
import android.app.ActivityManager.RecentTaskInfo;
import android.app.ActivityManager.RunningTaskInfo;
import android.app.ActivityTaskManager;
@@ -55,7 +56,6 @@ import android.os.RemoteException;
import android.os.SystemClock;
import android.platform.test.annotations.Presubmit;
import android.util.MutableLong;
-import android.util.SparseArray;
import android.util.SparseBooleanArray;
import androidx.test.InstrumentationRegistry;
@@ -68,8 +68,6 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-import static java.lang.Integer.MAX_VALUE;
-
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
@@ -79,7 +77,10 @@ import java.util.Random;
import java.util.Set;
/**
- * atest FrameworksServicesTests:RecentTasksTest
+ * Tests for {@link RecentTasks}.
+ *
+ * Build/Install/Run:
+ * atest WmTests:RecentTasksTest
*/
@MediumTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/am/RecentsAnimationTest.java b/services/tests/wmtests/src/com/android/server/am/RecentsAnimationTest.java
index f15b5f7f04b0..4958782aa063 100644
--- a/services/tests/servicestests/src/com/android/server/am/RecentsAnimationTest.java
+++ b/services/tests/wmtests/src/com/android/server/am/RecentsAnimationTest.java
@@ -45,7 +45,10 @@ import org.junit.Test;
import org.junit.runner.RunWith;
/**
- * atest FrameworksServicesTests:RecentsAnimationTest
+ * Tests for {@link RecentsAnimation}.
+ *
+ * Build/Install/Run:
+ * atest WmTests:RecentsAnimationTest
*/
@MediumTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/am/RunningTasksTest.java b/services/tests/wmtests/src/com/android/server/am/RunningTasksTest.java
index aa3046fb694c..ddb3e64741de 100644
--- a/services/tests/servicestests/src/com/android/server/am/RunningTasksTest.java
+++ b/services/tests/wmtests/src/com/android/server/am/RunningTasksTest.java
@@ -30,7 +30,6 @@ import android.app.ActivityManager.RunningTaskInfo;
import android.content.ComponentName;
import android.content.Context;
import android.platform.test.annotations.Presubmit;
-import android.util.SparseArray;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.MediumTest;
@@ -43,7 +42,10 @@ import org.junit.runner.RunWith;
import java.util.ArrayList;
/**
- * atest FrameworksServicesTests:RunningTasksTest
+ * Tests for {@link RunningTasks}.
+ *
+ * Build/Install/Run:
+ * atest WmTests:RunningTasksTest
*/
@MediumTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/am/SafeActivityOptionsTest.java b/services/tests/wmtests/src/com/android/server/am/SafeActivityOptionsTest.java
index 8e4e7e6b63c3..99f53453c064 100644
--- a/services/tests/servicestests/src/com/android/server/am/SafeActivityOptionsTest.java
+++ b/services/tests/wmtests/src/com/android/server/am/SafeActivityOptionsTest.java
@@ -28,6 +28,12 @@ import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
+/**
+ * Tests for {@link SafeActivityOptions}.
+ *
+ * Build/Install/Run:
+ * atest WmTests:SafeActivityOptionsTest
+ */
@MediumTest
@Presubmit
@FlakyTest
diff --git a/services/tests/servicestests/src/com/android/server/am/TaskLaunchParamsModifierTests.java b/services/tests/wmtests/src/com/android/server/am/TaskLaunchParamsModifierTests.java
index f5b8f78cfd53..5050744eb19b 100644
--- a/services/tests/servicestests/src/com/android/server/am/TaskLaunchParamsModifierTests.java
+++ b/services/tests/wmtests/src/com/android/server/am/TaskLaunchParamsModifierTests.java
@@ -22,7 +22,6 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
import static com.android.server.am.LaunchParamsController.LaunchParamsModifier.RESULT_CONTINUE;
import static org.junit.Assert.assertEquals;
-import static org.mockito.Mockito.when;
import android.content.pm.ActivityInfo.WindowLayout;
import android.graphics.Rect;
@@ -40,7 +39,7 @@ import org.junit.runner.RunWith;
* Tests for exercising resizing task bounds.
*
* Build/Install/Run:
- * atest FrameworksServicesTests:TaskLaunchParamsModifierTests
+ * atest WmTests:TaskLaunchParamsModifierTests
*/
@MediumTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/am/TaskPersisterTest.java b/services/tests/wmtests/src/com/android/server/am/TaskPersisterTest.java
index 8d54bc236a66..41b105b69fc3 100644
--- a/services/tests/servicestests/src/com/android/server/am/TaskPersisterTest.java
+++ b/services/tests/wmtests/src/com/android/server/am/TaskPersisterTest.java
@@ -17,20 +17,16 @@
package com.android.server.am;
import android.content.pm.UserInfo;
-import android.os.Environment;
import android.os.UserHandle;
import android.os.UserManager;
import android.test.AndroidTestCase;
-import android.util.Log;
import android.util.SparseBooleanArray;
-import com.android.server.am.TaskPersister;
-
-import java.io.File;
-import java.util.Random;
-
/**
- * atest FrameworksServicesTests:TaskPersisterTest
+ * Tests for {@link TaskPersister}.
+ *
+ * Build/Install/Run:
+ * atest WmTests:TaskPersisterTest
*/
public class TaskPersisterTest extends AndroidTestCase {
private static final String TEST_USER_NAME = "AM-Test-User";
diff --git a/services/tests/servicestests/src/com/android/server/am/TaskRecordTests.java b/services/tests/wmtests/src/com/android/server/am/TaskRecordTests.java
index fa8a09cc2b85..23420aa7ed8e 100644
--- a/services/tests/servicestests/src/com/android/server/am/TaskRecordTests.java
+++ b/services/tests/wmtests/src/com/android/server/am/TaskRecordTests.java
@@ -60,7 +60,7 @@ import java.util.ArrayList;
* Tests for exercising {@link TaskRecord}.
*
* Build/Install/Run:
- * atest FrameworksServicesTests:com.android.server.am.TaskRecordTests
+ * atest WmTests:TaskRecordTests
*/
@MediumTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/am/TaskStackChangedListenerTest.java b/services/tests/wmtests/src/com/android/server/am/TaskStackChangedListenerTest.java
index 3f7c7148381e..c12489539c9e 100644
--- a/services/tests/servicestests/src/com/android/server/am/TaskStackChangedListenerTest.java
+++ b/services/tests/wmtests/src/com/android/server/am/TaskStackChangedListenerTest.java
@@ -53,6 +53,12 @@ import org.junit.runner.RunWith;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
+/**
+ * Tests for {@link TaskStackListener}.
+ *
+ * Build/Install/Run:
+ * atest WmTests:TaskStackChangedListenerTest
+ */
@MediumTest
@RunWith(AndroidJUnit4.class)
public class TaskStackChangedListenerTest {
diff --git a/services/tests/servicestests/src/com/android/server/am/UserControllerTest.java b/services/tests/wmtests/src/com/android/server/am/UserControllerTest.java
index cc4f51987523..fb5ded51489f 100644
--- a/services/tests/servicestests/src/com/android/server/am/UserControllerTest.java
+++ b/services/tests/wmtests/src/com/android/server/am/UserControllerTest.java
@@ -16,6 +16,30 @@
package com.android.server.am;
+import static android.content.pm.PackageManager.PERMISSION_GRANTED;
+import static android.testing.DexmakerShareClassLoaderRule.runWithDexmakerShareClassLoader;
+
+import static com.android.server.am.UserController.CONTINUE_USER_SWITCH_MSG;
+import static com.android.server.am.UserController.REPORT_LOCKED_BOOT_COMPLETE_MSG;
+import static com.android.server.am.UserController.REPORT_USER_SWITCH_COMPLETE_MSG;
+import static com.android.server.am.UserController.REPORT_USER_SWITCH_MSG;
+import static com.android.server.am.UserController.SYSTEM_USER_CURRENT_MSG;
+import static com.android.server.am.UserController.SYSTEM_USER_START_MSG;
+import static com.android.server.am.UserController.USER_SWITCH_TIMEOUT_MSG;
+
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyBoolean;
+import static org.mockito.Matchers.anyInt;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.when;
+
import android.app.IUserSwitchObserver;
import android.content.Context;
import android.content.IIntentReceiver;
@@ -48,30 +72,11 @@ import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
-import static android.content.pm.PackageManager.PERMISSION_GRANTED;
-import static android.testing.DexmakerShareClassLoaderRule.runWithDexmakerShareClassLoader;
-import static com.android.server.am.UserController.CONTINUE_USER_SWITCH_MSG;
-import static com.android.server.am.UserController.REPORT_LOCKED_BOOT_COMPLETE_MSG;
-import static com.android.server.am.UserController.REPORT_USER_SWITCH_COMPLETE_MSG;
-import static com.android.server.am.UserController.REPORT_USER_SWITCH_MSG;
-import static com.android.server.am.UserController.SYSTEM_USER_CURRENT_MSG;
-import static com.android.server.am.UserController.SYSTEM_USER_START_MSG;
-import static com.android.server.am.UserController.USER_SWITCH_TIMEOUT_MSG;
-import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyBoolean;
-import static org.mockito.Matchers.anyInt;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.when;
-
/**
- * Usage: bit FrameworksServicesTests:com.android.server.am.UserControllerTest
+ * Tests for {@link UserController}.
+ *
+ * Build/Install/Run:
+ * atest WmTests:UserControllerTest
*/
@Presubmit
public class UserControllerTest extends AndroidTestCase {
diff --git a/services/tests/servicestests/src/com/android/server/policy/FakeWindowState.java b/services/tests/wmtests/src/com/android/server/policy/FakeWindowState.java
index d34f951ffd61..d7eb105c5700 100644
--- a/services/tests/servicestests/src/com/android/server/policy/FakeWindowState.java
+++ b/services/tests/wmtests/src/com/android/server/policy/FakeWindowState.java
@@ -16,17 +16,13 @@
package com.android.server.policy;
-import android.annotation.Nullable;
-import android.graphics.Point;
import android.graphics.Rect;
import android.util.proto.ProtoOutputStream;
import android.view.Display;
-import android.view.DisplayCutout;
import android.view.IApplicationToken;
import android.view.WindowManager;
import com.android.server.wm.WindowFrames;
-import com.android.server.wm.utils.WmDisplayCutout;
public class FakeWindowState implements WindowManagerPolicy.WindowState {
diff --git a/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerInsetsTest.java b/services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerInsetsTest.java
index cce6ba718400..be044e911a6b 100644
--- a/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerInsetsTest.java
+++ b/services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerInsetsTest.java
@@ -37,6 +37,12 @@ import org.junit.Test;
import org.junit.rules.ErrorCollector;
import org.junit.runner.RunWith;
+/**
+ * Tests for {@link PhoneWindowManager} insets.
+ *
+ * Build/Install/Run:
+ * atest WmTests:PhoneWindowManagerInsetsTest
+ */
@RunWith(AndroidJUnit4.class)
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerLayoutTest.java b/services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerLayoutTest.java
index fee761dd92d3..4dbbeb16c55d 100644
--- a/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerLayoutTest.java
+++ b/services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerLayoutTest.java
@@ -49,6 +49,12 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+/**
+ * Tests for {@link PhoneWindowManager} layout.
+ *
+ * Build/Install/Run:
+ * atest WmTests:PhoneWindowManagerLayoutTest
+ */
@RunWith(AndroidJUnit4.class)
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerTest.java b/services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerTest.java
index d92d7e03ef3b..e20f5d0a325a 100644
--- a/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerTest.java
+++ b/services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerTest.java
@@ -52,6 +52,12 @@ import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
+/**
+ * Tests for {@link PhoneWindowManager}.
+ *
+ * Build/Install/Run:
+ * atest WmTests:PhoneWindowManagerTest
+ */
@RunWith(AndroidJUnit4.class)
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerTestBase.java b/services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerTestBase.java
index acd065e90a0c..e31b47b26f2c 100644
--- a/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerTestBase.java
+++ b/services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerTestBase.java
@@ -17,14 +17,14 @@
package com.android.server.policy;
import static android.view.Surface.ROTATION_0;
-import static android.view.Surface.ROTATION_180;
import static android.view.Surface.ROTATION_270;
import static android.view.Surface.ROTATION_90;
import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR;
import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR;
-import static com.android.server.wm.utils.CoordinateTransforms.transformPhysicalToLogicalCoordinates;
+import static com.android.server.wm.utils.CoordinateTransforms
+ .transformPhysicalToLogicalCoordinates;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock;
diff --git a/services/tests/servicestests/src/com/android/server/wm/AnimatingAppWindowTokenRegistryTest.java b/services/tests/wmtests/src/com/android/server/wm/AnimatingAppWindowTokenRegistryTest.java
index b5fe8b159c47..2291967b9b89 100644
--- a/services/tests/servicestests/src/com/android/server/wm/AnimatingAppWindowTokenRegistryTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/AnimatingAppWindowTokenRegistryTest.java
@@ -41,7 +41,7 @@ import org.mockito.MockitoAnnotations;
* Tests for the {@link TaskStack} class.
*
* Build/Install/Run:
- * atest FrameworksServicesTests:com.android.server.wm.AnimatingAppWindowTokenRegistryTest
+ * atest WmTests:AnimatingAppWindowTokenRegistryTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/AppTransitionTests.java b/services/tests/wmtests/src/com/android/server/wm/AppTransitionTests.java
index 3053c4197f82..a76299356ea7 100644
--- a/services/tests/servicestests/src/com/android/server/wm/AppTransitionTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/AppTransitionTests.java
@@ -38,7 +38,8 @@ import org.junit.runner.RunWith;
/**
* Test class for {@link AppTransition}.
*
- * atest AppTransitionTests
+ * Build/Install/Run:
+ * atest WmTests:AppTransitionTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/AppWindowContainerControllerTests.java b/services/tests/wmtests/src/com/android/server/wm/AppWindowContainerControllerTests.java
index fcd8a39e4d07..c3d89e59d2e8 100644
--- a/services/tests/servicestests/src/com/android/server/wm/AppWindowContainerControllerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/AppWindowContainerControllerTests.java
@@ -41,7 +41,8 @@ import org.junit.Test;
/**
* Test class for {@link AppWindowContainerController}.
*
- * atest FrameworksServicesTests:com.android.server.wm.AppWindowContainerControllerTests
+ * Build/Install/Run:
+ * atest WmTests:AppWindowContainerControllerTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenAnimationTests.java b/services/tests/wmtests/src/com/android/server/wm/AppWindowTokenAnimationTests.java
index e3ab5cf4fc52..b1029a3c6316 100644
--- a/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenAnimationTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/AppWindowTokenAnimationTests.java
@@ -26,11 +26,11 @@ import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.verify;
+import android.view.SurfaceControl;
+
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
-import android.view.SurfaceControl;
-
import com.android.server.wm.WindowTestUtils.TestAppWindowToken;
import org.junit.Test;
@@ -43,7 +43,7 @@ import org.mockito.MockitoAnnotations;
* Animation related tests for the {@link AppWindowToken} class.
*
* Build/Install/Run:
- * atest FrameworksServicesTests:com.android.server.wm.AppWindowTokenAnimationTests
+ * atest WmTests:AppWindowTokenAnimationTests
*/
@SmallTest
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenTests.java b/services/tests/wmtests/src/com/android/server/wm/AppWindowTokenTests.java
index 6d31dfbb8186..a0b244306578 100644
--- a/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/AppWindowTokenTests.java
@@ -52,7 +52,7 @@ import org.junit.runner.RunWith;
* Tests for the {@link AppWindowToken} class.
*
* Build/Install/Run:
- * atest FrameworksServicesTests:com.android.server.wm.AppWindowTokenTests
+ * atest WmTests:AppWindowTokenTests
*/
@SmallTest
// TODO: b/68267650
diff --git a/services/tests/servicestests/src/com/android/server/wm/BoundsAnimationControllerTests.java b/services/tests/wmtests/src/com/android/server/wm/BoundsAnimationControllerTests.java
index 12be0b3ae6f8..888ce4c7ac3d 100644
--- a/services/tests/servicestests/src/com/android/server/wm/BoundsAnimationControllerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/BoundsAnimationControllerTests.java
@@ -26,7 +26,6 @@ import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
import android.animation.ValueAnimator;
import android.content.Context;
@@ -57,7 +56,7 @@ import org.junit.runner.RunWith;
* appropriately.
*
* Build/Install/Run:
- * bit FrameworksServicesTests:com.android.server.wm.BoundsAnimationControllerTests
+ * atest WmTests:BoundsAnimationControllerTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/ConfigurationContainerTests.java b/services/tests/wmtests/src/com/android/server/wm/ConfigurationContainerTests.java
index 2b8214d162c9..34ff20604039 100644
--- a/services/tests/servicestests/src/com/android/server/wm/ConfigurationContainerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/ConfigurationContainerTests.java
@@ -17,7 +17,6 @@
package com.android.server.wm;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
-import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
@@ -48,7 +47,7 @@ import java.util.List;
* Test class for {@link ConfigurationContainer}.
*
* Build/Install/Run:
- * bit FrameworksServicesTests:com.android.server.wm.ConfigurationContainerTests
+ * atest WmTests:ConfigurationContainerTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/DimmerTests.java b/services/tests/wmtests/src/com/android/server/wm/DimmerTests.java
index 21555e38a7e8..5efbf3040c3e 100644
--- a/services/tests/servicestests/src/com/android/server/wm/DimmerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/DimmerTests.java
@@ -39,8 +39,10 @@ import org.junit.Test;
import org.junit.runner.RunWith;
/**
+ * Tests for {@link Dimmer}.
+ *
* Build/Install/Run:
- * atest FrameworksServicesTests:com.android.server.wm.DimmerTests;
+ * atest WmTests:DimmerTests;
*/
@Presubmit
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/servicestests/src/com/android/server/wm/DisplayContentTests.java b/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java
index b3303049be39..4e755ab95980 100644
--- a/services/tests/servicestests/src/com/android/server/wm/DisplayContentTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java
@@ -49,7 +49,6 @@ import android.graphics.Rect;
import android.os.SystemClock;
import android.platform.test.annotations.Presubmit;
import android.util.DisplayMetrics;
-import android.util.SparseIntArray;
import android.view.DisplayCutout;
import android.view.Gravity;
import android.view.MotionEvent;
@@ -74,7 +73,7 @@ import java.util.List;
* Tests for the {@link DisplayContent} class.
*
* Build/Install/Run:
- * atest com.android.server.wm.DisplayContentTests
+ * atest WmTests:DisplayContentTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/DisplaySettingsTests.java b/services/tests/wmtests/src/com/android/server/wm/DisplaySettingsTests.java
index 07eafa5c4be4..a6cd649b6453 100644
--- a/services/tests/servicestests/src/com/android/server/wm/DisplaySettingsTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/DisplaySettingsTests.java
@@ -35,6 +35,12 @@ import org.junit.runner.RunWith;
import java.io.File;
+/**
+ * Tests for {@link DisplaySettings}.
+ *
+ * Build/Install/Run:
+ * atest WmTests:DisplaySettingsTests
+ */
@SmallTest
@Presubmit
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/servicestests/src/com/android/server/wm/DragDropControllerTests.java b/services/tests/wmtests/src/com/android/server/wm/DragDropControllerTests.java
index 7125246b6a29..b7cd7644a0eb 100644
--- a/services/tests/servicestests/src/com/android/server/wm/DragDropControllerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/DragDropControllerTests.java
@@ -57,7 +57,8 @@ import java.util.concurrent.TimeUnit;
/**
* Tests for the {@link DragDropController} class.
*
- * atest FrameworksServicesTests:com.android.server.wm.DragDropControllerTests
+ * Build/Install/Run:
+ * atest WmTests:DragDropControllerTests
*/
@SmallTest
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/wmtests/src/com/android/server/wm/DummyWmTests.java b/services/tests/wmtests/src/com/android/server/wm/DummyWmTests.java
deleted file mode 100644
index aecb2783badd..000000000000
--- a/services/tests/wmtests/src/com/android/server/wm/DummyWmTests.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.wm;
-
-import android.platform.test.annotations.Presubmit;
-
-import org.junit.Test;
-
-import androidx.test.filters.FlakyTest;
-
-/**
- * Dummy test for com.android.server.wm
- * TODO(b/113800711): Remove this class once the actual tests are moved from servicestests.
- */
-public class DummyWmTests {
-
- @Presubmit
- @Test
- public void preSubmitTest() {}
-
- @FlakyTest
- @Presubmit
- @Test
- public void flakyPreSubmitTest() {}
-
- @Test
- public void postSubmitTest() {}
-
- @FlakyTest
- @Test
- public void flakyPostSubmitTest() {}
-}
diff --git a/services/tests/servicestests/src/com/android/server/wm/PinnedStackControllerTest.java b/services/tests/wmtests/src/com/android/server/wm/PinnedStackControllerTest.java
index 7222a999e23c..981c01ffd5cb 100644
--- a/services/tests/servicestests/src/com/android/server/wm/PinnedStackControllerTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/PinnedStackControllerTest.java
@@ -24,6 +24,12 @@ import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
+/**
+ * Tests for {@link PinnedStackController}.
+ *
+ * Build/Install/Run:
+ * atest WmTests:PinnedStackControllerTest
+ */
@SmallTest
@Presubmit
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/servicestests/src/com/android/server/wm/RecentsAnimationControllerTest.java b/services/tests/wmtests/src/com/android/server/wm/RecentsAnimationControllerTest.java
index e7c45d59078c..5672ff149d49 100644
--- a/services/tests/servicestests/src/com/android/server/wm/RecentsAnimationControllerTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/RecentsAnimationControllerTest.java
@@ -48,7 +48,10 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
/**
- * atest FrameworksServicesTests:com.android.server.wm.RecentsAnimationControllerTest
+ * Tests for {@link RecentsAnimationController}.
+ *
+ * Build/Install/Run:
+ * atest WmTests:RecentsAnimationControllerTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/RemoteAnimationControllerTest.java b/services/tests/wmtests/src/com/android/server/wm/RemoteAnimationControllerTest.java
index 7d19baa9f871..085b86a72a64 100644
--- a/services/tests/servicestests/src/com/android/server/wm/RemoteAnimationControllerTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/RemoteAnimationControllerTest.java
@@ -53,7 +53,10 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
/**
- * atest FrameworksServicesTests:com.android.server.wm.RemoteAnimationControllerTest
+ * Tests for {@link RemoteAnimationController}.
+ *
+ * Build/Install/Run:
+ * atest WmTests:RemoteAnimationControllerTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/RootWindowContainerTests.java b/services/tests/wmtests/src/com/android/server/wm/RootWindowContainerTests.java
index c1db6a6a4def..fdd08fa15a76 100644
--- a/services/tests/servicestests/src/com/android/server/wm/RootWindowContainerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/RootWindowContainerTests.java
@@ -16,7 +16,7 @@ import org.junit.runner.RunWith;
* Tests for the {@link RootWindowContainer} class.
*
* Build/Install/Run:
- * atest FrameworksServicesTests:com.android.server.wm.RootWindowContainerTests
+ * atest WmTests:RootWindowContainerTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/ScreenDecorWindowTests.java b/services/tests/wmtests/src/com/android/server/wm/ScreenDecorWindowTests.java
index 60025f0f03fe..e27dc06c17cb 100644
--- a/services/tests/servicestests/src/com/android/server/wm/ScreenDecorWindowTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/ScreenDecorWindowTests.java
@@ -72,7 +72,7 @@ import java.util.function.BooleanSupplier;
* Tests for the {@link android.view.WindowManager.LayoutParams#PRIVATE_FLAG_IS_SCREEN_DECOR} flag.
*
* Build/Install/Run:
- * atest FrameworksServicesTests:com.android.server.wm.ScreenDecorWindowTests
+ * atest WmTests:ScreenDecorWindowTests
*/
// TODO: Add test for FLAG_FULLSCREEN which hides the status bar and also other flags.
// TODO: Test non-Activity windows.
diff --git a/services/tests/servicestests/src/com/android/server/wm/StackWindowControllerTests.java b/services/tests/wmtests/src/com/android/server/wm/StackWindowControllerTests.java
index 9f2645cc98ae..83e2b7bb1e16 100644
--- a/services/tests/servicestests/src/com/android/server/wm/StackWindowControllerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/StackWindowControllerTests.java
@@ -34,7 +34,7 @@ import org.junit.runner.RunWith;
* Test class for {@link StackWindowController}.
*
* Build/Install/Run:
- * atest FrameworksServicesTests:StackWindowControllerTests
+ * atest WmTests:StackWindowControllerTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/SurfaceAnimationRunnerTest.java b/services/tests/wmtests/src/com/android/server/wm/SurfaceAnimationRunnerTest.java
index 4551c3611102..69aac2d1eba8 100644
--- a/services/tests/servicestests/src/com/android/server/wm/SurfaceAnimationRunnerTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/SurfaceAnimationRunnerTest.java
@@ -27,6 +27,8 @@ import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import static java.util.concurrent.TimeUnit.SECONDS;
+
import android.animation.AnimationHandler.AnimationFrameCallbackProvider;
import android.animation.ValueAnimator;
import android.graphics.Matrix;
@@ -54,14 +56,13 @@ import org.mockito.Mock;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
-import static java.util.concurrent.TimeUnit.SECONDS;
-
import java.util.concurrent.CountDownLatch;
/**
* Test class for {@link SurfaceAnimationRunner}.
*
- * atest FrameworksServicesTests:com.android.server.wm.SurfaceAnimationRunnerTest
+ * Build/Install/Run:
+ * atest WmTests:SurfaceAnimationRunnerTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/SurfaceAnimatorTest.java b/services/tests/wmtests/src/com/android/server/wm/SurfaceAnimatorTest.java
index 7b5e8deeeb65..b786cd5b6519 100644
--- a/services/tests/servicestests/src/com/android/server/wm/SurfaceAnimatorTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/SurfaceAnimatorTest.java
@@ -50,7 +50,8 @@ import org.mockito.MockitoAnnotations;
/**
* Test class for {@link SurfaceAnimatorTest}.
*
- * atest FrameworksServicesTests:com.android.server.wm.SurfaceAnimatorTest
+ * Build/Install/Run:
+ * atest WmTests:SurfaceAnimatorTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/TaskPositionerTests.java b/services/tests/wmtests/src/com/android/server/wm/TaskPositionerTests.java
index 17b7fc1fd0f0..fb10a65908a7 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TaskPositionerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TaskPositionerTests.java
@@ -45,7 +45,8 @@ import org.mockito.Mockito;
/**
* Tests for the {@link TaskPositioner} class.
*
- * runtest frameworks-services -c com.android.server.wm.TaskPositionerTests
+ * Build/Install/Run:
+ * atest WmTests:TaskPositionerTests
*/
@SmallTest
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/servicestests/src/com/android/server/wm/TaskPositioningControllerTests.java b/services/tests/wmtests/src/com/android/server/wm/TaskPositioningControllerTests.java
index ced084717494..e7ef31d62c71 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TaskPositioningControllerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TaskPositioningControllerTests.java
@@ -40,7 +40,8 @@ import org.junit.runner.RunWith;
/**
* Tests for the {@link TaskPositioningController} class.
*
- * atest com.android.server.wm.TaskPositioningControllerTests
+ * Build/Install/Run:
+ * atest WmTests:TaskPositioningControllerTests
*/
@SmallTest
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotCacheTest.java b/services/tests/wmtests/src/com/android/server/wm/TaskSnapshotCacheTest.java
index c9d800449ff9..50878ce805be 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotCacheTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TaskSnapshotCacheTest.java
@@ -33,7 +33,8 @@ import org.junit.runner.RunWith;
/**
* Test class for {@link TaskSnapshotCache}.
*
- * runtest frameworks-services -c com.android.server.wm.TaskSnapshotCacheTest
+ * Build/Install/Run:
+ * atest WmTests:TaskSnapshotCacheTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotControllerTest.java b/services/tests/wmtests/src/com/android/server/wm/TaskSnapshotControllerTest.java
index efce063c8fca..c78d200c309f 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotControllerTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TaskSnapshotControllerTest.java
@@ -20,7 +20,8 @@ import static android.view.WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW;
import static android.view.WindowManager.LayoutParams.FLAG_SECURE;
import static android.view.WindowManager.TRANSIT_UNSET;
-import static com.android.server.wm.TaskSnapshotController.*;
+import static com.android.server.wm.TaskSnapshotController.SNAPSHOT_MODE_APP_THEME;
+import static com.android.server.wm.TaskSnapshotController.SNAPSHOT_MODE_REAL;
import static junit.framework.Assert.assertEquals;
@@ -38,7 +39,8 @@ import org.junit.runner.RunWith;
/**
* Test class for {@link TaskSnapshotController}.
*
- * runtest frameworks-services -c com.android.server.wm.TaskSnapshotControllerTest
+ * Build/Install/Run:
+ * atest WmTests:TaskSnapshotControllerTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotPersisterLoaderTest.java b/services/tests/wmtests/src/com/android/server/wm/TaskSnapshotPersisterLoaderTest.java
index 600b2e52b083..31cf47b0ca75 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotPersisterLoaderTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TaskSnapshotPersisterLoaderTest.java
@@ -46,7 +46,8 @@ import java.io.File;
/**
* Test class for {@link TaskSnapshotPersister} and {@link TaskSnapshotLoader}
*
- * atest FrameworksServicesTests:TaskSnapshotPersisterLoaderTest
+ * Build/Install/Run:
+ * atest WmTests:TaskSnapshotPersisterLoaderTest
*/
@MediumTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotPersisterTestBase.java b/services/tests/wmtests/src/com/android/server/wm/TaskSnapshotPersisterTestBase.java
index 6f4f17380e3f..6f4f17380e3f 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotPersisterTestBase.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TaskSnapshotPersisterTestBase.java
diff --git a/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java b/services/tests/wmtests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java
index 91074b9db081..6df179e27931 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java
@@ -49,7 +49,8 @@ import org.junit.runner.RunWith;
/**
* Test class for {@link TaskSnapshotSurface}.
*
- * runtest frameworks-services -c com.android.server.wm.TaskSnapshotSurfaceTest
+ * Build/Install/Run:
+ * atest WmTests:TaskSnapshotSurfaceTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/TaskStackContainersTests.java b/services/tests/wmtests/src/com/android/server/wm/TaskStackContainersTests.java
index ea44279b46a9..cc6755e45f9a 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TaskStackContainersTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TaskStackContainersTests.java
@@ -37,7 +37,7 @@ import org.junit.runner.RunWith;
* Tests for the {@link DisplayContent.TaskStackContainers} container in {@link DisplayContent}.
*
* Build/Install/Run:
- * bit FrameworksServicesTests:com.android.server.wm.TaskStackContainersTests
+ * atest WmTests:TaskStackContainersTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/TaskStackTests.java b/services/tests/wmtests/src/com/android/server/wm/TaskStackTests.java
index 53a1185b4655..d60ed8ecfe6b 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TaskStackTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TaskStackTests.java
@@ -34,7 +34,7 @@ import org.junit.runner.RunWith;
* Tests for the {@link TaskStack} class.
*
* Build/Install/Run:
- * bit FrameworksServicesTests:com.android.server.wm.TaskStackTests
+ * atest WmTests:TaskStackTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/TaskWindowContainerControllerTests.java b/services/tests/wmtests/src/com/android/server/wm/TaskWindowContainerControllerTests.java
index edd76647f4a8..48abce2a677a 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TaskWindowContainerControllerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TaskWindowContainerControllerTests.java
@@ -33,7 +33,7 @@ import org.junit.runner.RunWith;
* Test class for {@link TaskWindowContainerController}.
*
* Build/Install/Run:
- * bit FrameworksServicesTests:com.android.server.wm.TaskWindowContainerControllerTests
+ * atest WmTests:TaskWindowContainerControllerTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/TestIWindow.java b/services/tests/wmtests/src/com/android/server/wm/TestIWindow.java
index 353aa7deb534..032f4162b48e 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TestIWindow.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TestIWindow.java
@@ -16,8 +16,6 @@
package com.android.server.wm;
-import com.android.internal.os.IResultReceiver;
-
import android.graphics.Rect;
import android.os.Bundle;
import android.os.ParcelFileDescriptor;
@@ -27,6 +25,8 @@ import android.view.DisplayCutout;
import android.view.DragEvent;
import android.view.IWindow;
+import com.android.internal.os.IResultReceiver;
+
public class TestIWindow extends IWindow.Stub {
@Override
public void executeCommand(String command, String parameters,
diff --git a/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java b/services/tests/wmtests/src/com/android/server/wm/TestWindowManagerPolicy.java
index 5fb89977f905..5fb89977f905 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TestWindowManagerPolicy.java
diff --git a/services/tests/servicestests/src/com/android/server/wm/UnknownAppVisibilityControllerTest.java b/services/tests/wmtests/src/com/android/server/wm/UnknownAppVisibilityControllerTest.java
index 3ac97027a893..616276a06563 100644
--- a/services/tests/servicestests/src/com/android/server/wm/UnknownAppVisibilityControllerTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/UnknownAppVisibilityControllerTest.java
@@ -30,7 +30,8 @@ import org.junit.runner.RunWith;
/**
* Test class for {@link AppTransition}.
*
- * runtest frameworks-services -c com.android.server.wm.UnknownAppVisibilityControllerTest
+ * Build/Install/Run:
+ * atest WmTests:UnknownAppVisibilityControllerTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/WallpaperControllerTests.java b/services/tests/wmtests/src/com/android/server/wm/WallpaperControllerTests.java
index 882e78924629..882e78924629 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WallpaperControllerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WallpaperControllerTests.java
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowAnimationSpecTest.java b/services/tests/wmtests/src/com/android/server/wm/WindowAnimationSpecTest.java
index 827d938aa73e..de49e75dd00c 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowAnimationSpecTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowAnimationSpecTest.java
@@ -41,7 +41,8 @@ import org.junit.runner.RunWith;
/**
* Tests for the {@link WindowAnimationSpec} class.
*
- * atest FrameworksServicesTests:com.android.server.wm.WindowAnimationSpecTest
+ * Build/Install/Run:
+ * atest WmTests:WindowAnimationSpecTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowConfigurationTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowConfigurationTests.java
index e7cc2859ff62..17a0f91bf49f 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowConfigurationTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowConfigurationTests.java
@@ -44,7 +44,7 @@ import org.junit.Test;
* Test class to for {@link android.app.WindowConfiguration}.
*
* Build/Install/Run:
- * bit FrameworksServicesTests:com.android.server.wm.WindowConfigurationTests
+ * atest WmTests:WindowConfigurationTests
*/
@SmallTest
@FlakyTest(bugId = 74078662)
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowContainerControllerTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowContainerControllerTests.java
index 6b1feb87aa42..b97a79b93215 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowContainerControllerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowContainerControllerTests.java
@@ -36,7 +36,7 @@ import org.junit.Test;
* Test class for {@link WindowContainerController}.
*
* Build/Install/Run:
- * bit FrameworksServicesTests:com.android.server.wm.WindowContainerControllerTests
+ * atest WmTests:WindowContainerControllerTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowContainerTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java
index dc763b9bb079..aa9fdb8c98d9 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowContainerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java
@@ -57,7 +57,7 @@ import java.util.Comparator;
* Test class for {@link WindowContainer}.
*
* Build/Install/Run:
- * atest FrameworksServicesTests:com.android.server.wm.WindowContainerTests
+ * atest WmTests:WindowContainerTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowContainerTraversalTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowContainerTraversalTests.java
index ffc86226cd39..7fbd8822ac29 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowContainerTraversalTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowContainerTraversalTests.java
@@ -37,6 +37,9 @@ import java.util.function.Consumer;
/**
* Tests for {@link WindowContainer#forAllWindows} and various implementations.
+ *
+ * Build/Install/Run:
+ * atest WmTests:WindowContainerTraversalTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowFrameTests.java
index 088672973524..f93a4eca8b74 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowFrameTests.java
@@ -21,7 +21,6 @@ import static android.view.WindowManager.LayoutParams.FILL_PARENT;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
import android.app.ActivityManager.TaskDescription;
import android.content.res.Configuration;
@@ -44,7 +43,8 @@ import org.junit.runner.RunWith;
/**
* Tests for the {@link WindowState#computeFrameLw} method and other window frame machinery.
*
- * Build/Install/Run: bit FrameworksServicesTests:com.android.server.wm.WindowFrameTests
+ * Build/Install/Run:
+ * atest WmTests:WindowFrameTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowManagerServiceRule.java b/services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceRule.java
index 54fd7db9b537..54fd7db9b537 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowManagerServiceRule.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceRule.java
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowManagerServiceRuleTest.java b/services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceRuleTest.java
index 570a853a62ca..570a853a62ca 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowManagerServiceRuleTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceRuleTest.java
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowStateTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java
index 6af3ea763c13..b8323913fd6c 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowStateTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java
@@ -57,6 +57,10 @@ import android.view.DisplayCutout;
import android.view.SurfaceControl;
import android.view.WindowManager;
+import androidx.test.filters.FlakyTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.server.wm.utils.WmDisplayCutout;
import org.junit.Test;
@@ -65,14 +69,11 @@ import org.junit.runner.RunWith;
import java.util.Arrays;
import java.util.LinkedList;
-import androidx.test.filters.FlakyTest;
-import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
-
/**
* Tests for the {@link WindowState} class.
*
- * atest FrameworksServicesTests:com.android.server.wm.WindowStateTests
+ * Build/Install/Run:
+ * atest WmTests:WindowStateTests
*/
@SmallTest
@FlakyTest(bugId = 74078662)
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowSurfacePlacerTest.java b/services/tests/wmtests/src/com/android/server/wm/WindowSurfacePlacerTest.java
index 057f04740198..f7ac344982cf 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowSurfacePlacerTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowSurfacePlacerTest.java
@@ -33,6 +33,12 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+/**
+ * Tests for {@link WindowSurfacePlacer}.
+ *
+ * Build/Install/Run:
+ * atest WmTests:WindowSurfacePlacerTest
+ */
@SmallTest
@Presubmit
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowTestUtils.java b/services/tests/wmtests/src/com/android/server/wm/WindowTestUtils.java
index a1b164065696..d9bf815b11a2 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowTestUtils.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowTestUtils.java
@@ -16,25 +16,12 @@
package com.android.server.wm;
-import android.app.ActivityManager;
-import android.content.Context;
-import android.content.res.Configuration;
-import android.graphics.Rect;
-import android.os.Binder;
-import android.os.IBinder;
-import android.view.Display;
-import android.view.IApplicationToken;
-import android.view.IWindow;
-import android.view.Surface;
-import android.view.SurfaceControl;
-import android.view.SurfaceControl.Transaction;
-import android.view.WindowManager;
-
import static android.app.AppOpsManager.OP_NONE;
import static android.content.pm.ActivityInfo.RESIZE_MODE_UNRESIZEABLE;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
import static com.android.server.wm.WindowContainer.POSITION_TOP;
+
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.anyBoolean;
import static org.mockito.Mockito.anyFloat;
@@ -43,6 +30,19 @@ import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
+import android.app.ActivityManager;
+import android.content.Context;
+import android.content.res.Configuration;
+import android.graphics.Rect;
+import android.os.Binder;
+import android.os.IBinder;
+import android.view.Display;
+import android.view.IApplicationToken;
+import android.view.IWindow;
+import android.view.Surface;
+import android.view.SurfaceControl.Transaction;
+import android.view.WindowManager;
+
import org.mockito.invocation.InvocationOnMock;
/**
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java b/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java
index 70e4ce419e0a..70e4ce419e0a 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowTokenTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowTokenTests.java
index 3732486f4a07..18b148e680c7 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowTokenTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowTokenTests.java
@@ -39,7 +39,7 @@ import org.junit.runner.RunWith;
* Tests for the {@link WindowToken} class.
*
* Build/Install/Run:
- * bit FrameworksServicesTests:com.android.server.wm.WindowTokenTests
+ * atest WmTests:WindowTokenTests
*/
@SmallTest
@FlakyTest(bugId = 74078662)
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowTracingTest.java b/services/tests/wmtests/src/com/android/server/wm/WindowTracingTest.java
index bbc6550d5753..9f9e9f97a778 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowTracingTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowTracingTest.java
@@ -37,7 +37,6 @@ import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.internal.util.Preconditions;
-import com.android.server.wm.WindowManagerTraceProto;
import org.junit.After;
import org.junit.Before;
@@ -55,7 +54,7 @@ import java.nio.charset.StandardCharsets;
* Test class for {@link WindowTracing}.
*
* Build/Install/Run:
- * bit FrameworksServicesTests:com.android.server.wm.WindowTracingTest
+ * atest WmTests:WindowTracingTest
*/
@SmallTest
@FlakyTest(bugId = 74078662)
diff --git a/services/tests/servicestests/src/com/android/server/wm/ZOrderingTests.java b/services/tests/wmtests/src/com/android/server/wm/ZOrderingTests.java
index 8f9fb1b7d5ec..07476af4e7d1 100644
--- a/services/tests/servicestests/src/com/android/server/wm/ZOrderingTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/ZOrderingTests.java
@@ -51,7 +51,7 @@ import java.util.LinkedList;
* Tests for the {@link WindowLayersController} class.
*
* Build/Install/Run:
- * bit FrameworksServicesTests:com.android.server.wm.ZOrderingTests
+ * atest WmTests:ZOrderingTests
*/
@SmallTest
@FlakyTest(bugId = 74078662)
diff --git a/services/tests/servicestests/src/com/android/server/wm/utils/CoordinateTransformsTest.java b/services/tests/wmtests/src/com/android/server/wm/utils/CoordinateTransformsTest.java
index f82b01224f96..6ad1677703c1 100644
--- a/services/tests/servicestests/src/com/android/server/wm/utils/CoordinateTransformsTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/utils/CoordinateTransformsTest.java
@@ -21,14 +21,16 @@ import static android.view.Surface.ROTATION_180;
import static android.view.Surface.ROTATION_270;
import static android.view.Surface.ROTATION_90;
-import static com.android.server.wm.utils.CoordinateTransforms.transformLogicalToPhysicalCoordinates;
-import static com.android.server.wm.utils.CoordinateTransforms.transformPhysicalToLogicalCoordinates;
-
-
+import static com.android.server.wm.utils.CoordinateTransforms
+ .transformLogicalToPhysicalCoordinates;
+import static com.android.server.wm.utils.CoordinateTransforms
+ .transformPhysicalToLogicalCoordinates;
import static com.android.server.wm.utils.CoordinateTransforms.transformToRotation;
import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
import android.graphics.Matrix;
import android.graphics.Point;
@@ -40,6 +42,12 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ErrorCollector;
+/**
+ * Tests for {@link CoordinateTransforms}.
+ *
+ * Build/Install/Run:
+ * atest WmTests:CoordinateTransformsTest
+ */
public class CoordinateTransformsTest {
private static final int W = 200;
diff --git a/services/tests/servicestests/src/com/android/server/wm/utils/InsetUtilsTest.java b/services/tests/wmtests/src/com/android/server/wm/utils/InsetUtilsTest.java
index 3364aef25bd0..e2d06cdff551 100644
--- a/services/tests/servicestests/src/com/android/server/wm/utils/InsetUtilsTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/utils/InsetUtilsTest.java
@@ -32,6 +32,12 @@ import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
+/**
+ * Tests for {@link InsetUtils}.
+ *
+ * Build/Install/Run:
+ * atest WmTests:InsetUtilsTest
+ */
@RunWith(AndroidJUnit4.class)
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/wm/utils/RotationCacheTest.java b/services/tests/wmtests/src/com/android/server/wm/utils/RotationCacheTest.java
index 5d08920b43d0..09d50bf2d27c 100644
--- a/services/tests/servicestests/src/com/android/server/wm/utils/RotationCacheTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/utils/RotationCacheTest.java
@@ -34,6 +34,12 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+/**
+ * Tests for {@link RotationCache}.
+ *
+ * Build/Install/Run:
+ * atest WmTests:RotationCacheTest
+ */
@RunWith(AndroidJUnit4.class)
@SmallTest
@FlakyTest(bugId = 74078662)
diff --git a/services/tests/servicestests/src/com/android/server/wm/utils/WmDisplayCutoutTest.java b/services/tests/wmtests/src/com/android/server/wm/utils/WmDisplayCutoutTest.java
index 9ce3dca7e096..74a6323f630e 100644
--- a/services/tests/servicestests/src/com/android/server/wm/utils/WmDisplayCutoutTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/utils/WmDisplayCutoutTest.java
@@ -16,7 +16,6 @@
package com.android.server.wm.utils;
-
import static android.view.DisplayCutout.NO_CUTOUT;
import static android.view.DisplayCutout.fromBoundingRect;
@@ -39,7 +38,8 @@ import java.util.Arrays;
/**
* Tests for {@link WmDisplayCutout}
*
- * Run with: atest WmDisplayCutoutTest
+ * Build/Install/Run:
+ * atest WmTests:WmDisplayCutoutTest
*/
@RunWith(AndroidJUnit4.class)
@SmallTest