summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author John Reck <jreck@google.com> 2018-09-21 20:26:48 +0000
committer John Reck <jreck@google.com> 2018-09-21 20:44:31 +0000
commit3d294e73340ccc9acbd9753942d4b6ff75d1b1ac (patch)
tree9c16f882d39d56ef8743d7dd58dc1068313daec8
parent337db2dc3e6746c404175243596e6388ba0974fb (diff)
Revert "Move AM/WM unit tests out of FrameworksServicesTests to WmTests"
This reverts commit 337db2dc3e6746c404175243596e6388ba0974fb. Reason for revert: It's broken as treehugger repeatedly verified. The bypass of treehugger was wrong. Bug: 116322473 Change-Id: I773606dcbd6825b0652d60b66fa4394a75ff7609
-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/servicestests/src/com/android/server/am/ActivityLaunchParamsModifierTests.java (renamed from services/tests/wmtests/src/com/android/server/am/ActivityLaunchParamsModifierTests.java)2
-rw-r--r--services/tests/servicestests/src/com/android/server/am/ActivityManagerInternalTest.java (renamed from services/tests/wmtests/src/com/android/server/am/ActivityManagerInternalTest.java)13
-rw-r--r--services/tests/servicestests/src/com/android/server/am/ActivityManagerServiceTest.java (renamed from services/tests/wmtests/src/com/android/server/am/ActivityManagerServiceTest.java)13
-rw-r--r--services/tests/servicestests/src/com/android/server/am/ActivityManagerTest.java (renamed from services/tests/wmtests/src/com/android/server/am/ActivityManagerTest.java)9
-rw-r--r--services/tests/servicestests/src/com/android/server/am/ActivityOptionsTest.java (renamed from services/tests/wmtests/src/com/android/server/am/ActivityOptionsTest.java)5
-rw-r--r--services/tests/servicestests/src/com/android/server/am/ActivityRecordTests.java (renamed from services/tests/wmtests/src/com/android/server/am/ActivityRecordTests.java)2
-rw-r--r--services/tests/servicestests/src/com/android/server/am/ActivityStackSupervisorTests.java (renamed from services/tests/wmtests/src/com/android/server/am/ActivityStackSupervisorTests.java)2
-rw-r--r--services/tests/servicestests/src/com/android/server/am/ActivityStackTests.java (renamed from services/tests/wmtests/src/com/android/server/am/ActivityStackTests.java)2
-rw-r--r--services/tests/servicestests/src/com/android/server/am/ActivityStartControllerTests.java (renamed from services/tests/wmtests/src/com/android/server/am/ActivityStartControllerTests.java)2
-rw-r--r--services/tests/servicestests/src/com/android/server/am/ActivityStartInterceptorTest.java (renamed from services/tests/wmtests/src/com/android/server/am/ActivityStartInterceptorTest.java)2
-rw-r--r--services/tests/servicestests/src/com/android/server/am/ActivityStarterTests.java (renamed from services/tests/wmtests/src/com/android/server/am/ActivityStarterTests.java)2
-rw-r--r--services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java (renamed from services/tests/wmtests/src/com/android/server/am/ActivityTestsBase.java)14
-rw-r--r--services/tests/servicestests/src/com/android/server/am/AppErrorDialogTest.java (renamed from services/tests/wmtests/src/com/android/server/am/AppErrorDialogTest.java)5
-rw-r--r--services/tests/servicestests/src/com/android/server/am/AssistDataRequesterTest.java (renamed from services/tests/wmtests/src/com/android/server/am/AssistDataRequesterTest.java)3
-rw-r--r--services/tests/servicestests/src/com/android/server/am/BroadcastRecordTest.java (renamed from services/tests/wmtests/src/com/android/server/am/BroadcastRecordTest.java)2
-rw-r--r--services/tests/servicestests/src/com/android/server/am/ClientLifecycleManagerTests.java (renamed from services/tests/wmtests/src/com/android/server/am/ClientLifecycleManagerTests.java)22
-rw-r--r--services/tests/servicestests/src/com/android/server/am/CoreSettingsObserverTest.java (renamed from services/tests/wmtests/src/com/android/server/am/CoreSettingsObserverTest.java)13
-rw-r--r--services/tests/servicestests/src/com/android/server/am/GlobalSettingsToPropertiesMapperTest.java (renamed from services/tests/wmtests/src/com/android/server/am/GlobalSettingsToPropertiesMapperTest.java)3
-rw-r--r--services/tests/servicestests/src/com/android/server/am/LaunchParamsControllerTests.java (renamed from services/tests/wmtests/src/com/android/server/am/LaunchParamsControllerTests.java)2
-rw-r--r--services/tests/servicestests/src/com/android/server/am/LockTaskControllerTest.java (renamed from services/tests/wmtests/src/com/android/server/am/LockTaskControllerTest.java)19
-rw-r--r--services/tests/servicestests/src/com/android/server/am/MemoryStatUtilTest.java (renamed from services/tests/wmtests/src/com/android/server/am/MemoryStatUtilTest.java)6
-rw-r--r--services/tests/servicestests/src/com/android/server/am/PendingRemoteAnimationRegistryTest.java (renamed from services/tests/wmtests/src/com/android/server/am/PendingRemoteAnimationRegistryTest.java)5
-rw-r--r--services/tests/servicestests/src/com/android/server/am/PersistentConnectionTest.java (renamed from services/tests/wmtests/src/com/android/server/am/PersistentConnectionTest.java)7
-rw-r--r--services/tests/servicestests/src/com/android/server/am/RecentTasksTest.java (renamed from services/tests/wmtests/src/com/android/server/am/RecentTasksTest.java)11
-rw-r--r--services/tests/servicestests/src/com/android/server/am/RecentsAnimationTest.java (renamed from services/tests/wmtests/src/com/android/server/am/RecentsAnimationTest.java)5
-rw-r--r--services/tests/servicestests/src/com/android/server/am/RunningTasksTest.java (renamed from services/tests/wmtests/src/com/android/server/am/RunningTasksTest.java)6
-rw-r--r--services/tests/servicestests/src/com/android/server/am/SafeActivityOptionsTest.java (renamed from services/tests/wmtests/src/com/android/server/am/SafeActivityOptionsTest.java)6
-rw-r--r--services/tests/servicestests/src/com/android/server/am/TaskLaunchParamsModifierTests.java (renamed from services/tests/wmtests/src/com/android/server/am/TaskLaunchParamsModifierTests.java)3
-rw-r--r--services/tests/servicestests/src/com/android/server/am/TaskPersisterTest.java (renamed from services/tests/wmtests/src/com/android/server/am/TaskPersisterTest.java)12
-rw-r--r--services/tests/servicestests/src/com/android/server/am/TaskRecordTests.java (renamed from services/tests/wmtests/src/com/android/server/am/TaskRecordTests.java)2
-rw-r--r--services/tests/servicestests/src/com/android/server/am/TaskStackChangedListenerTest.java (renamed from services/tests/wmtests/src/com/android/server/am/TaskStackChangedListenerTest.java)6
-rw-r--r--services/tests/servicestests/src/com/android/server/am/UserControllerTest.java (renamed from services/tests/wmtests/src/com/android/server/am/UserControllerTest.java)51
-rw-r--r--services/tests/servicestests/src/com/android/server/policy/FakeWindowState.java (renamed from services/tests/wmtests/src/com/android/server/policy/FakeWindowState.java)4
-rw-r--r--services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerInsetsTest.java (renamed from services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerInsetsTest.java)6
-rw-r--r--services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerLayoutTest.java (renamed from services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerLayoutTest.java)6
-rw-r--r--services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerTest.java (renamed from services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerTest.java)6
-rw-r--r--services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerTestBase.java (renamed from services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerTestBase.java)4
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/AnimatingAppWindowTokenRegistryTest.java (renamed from services/tests/wmtests/src/com/android/server/wm/AnimatingAppWindowTokenRegistryTest.java)2
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/AppTransitionTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/AppTransitionTests.java)3
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/AppWindowContainerControllerTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/AppWindowContainerControllerTests.java)3
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/AppWindowTokenAnimationTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/AppWindowTokenAnimationTests.java)6
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/AppWindowTokenTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/AppWindowTokenTests.java)2
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/BoundsAnimationControllerTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/BoundsAnimationControllerTests.java)3
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/ConfigurationContainerTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/ConfigurationContainerTests.java)3
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/DimmerTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/DimmerTests.java)4
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/DisplayContentTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java)3
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/DisplaySettingsTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/DisplaySettingsTests.java)6
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/DragDropControllerTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/DragDropControllerTests.java)3
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/PinnedStackControllerTest.java (renamed from services/tests/wmtests/src/com/android/server/wm/PinnedStackControllerTest.java)6
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/RecentsAnimationControllerTest.java (renamed from services/tests/wmtests/src/com/android/server/wm/RecentsAnimationControllerTest.java)5
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/RemoteAnimationControllerTest.java (renamed from services/tests/wmtests/src/com/android/server/wm/RemoteAnimationControllerTest.java)5
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/RootWindowContainerTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/RootWindowContainerTests.java)2
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/ScreenDecorWindowTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/ScreenDecorWindowTests.java)2
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/StackWindowControllerTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/StackWindowControllerTests.java)2
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/SurfaceAnimationRunnerTest.java (renamed from services/tests/wmtests/src/com/android/server/wm/SurfaceAnimationRunnerTest.java)7
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/SurfaceAnimatorTest.java (renamed from services/tests/wmtests/src/com/android/server/wm/SurfaceAnimatorTest.java)3
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/TaskPositionerTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/TaskPositionerTests.java)3
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/TaskPositioningControllerTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/TaskPositioningControllerTests.java)3
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/TaskSnapshotCacheTest.java (renamed from services/tests/wmtests/src/com/android/server/wm/TaskSnapshotCacheTest.java)3
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/TaskSnapshotControllerTest.java (renamed from services/tests/wmtests/src/com/android/server/wm/TaskSnapshotControllerTest.java)6
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/TaskSnapshotPersisterLoaderTest.java (renamed from services/tests/wmtests/src/com/android/server/wm/TaskSnapshotPersisterLoaderTest.java)3
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/TaskSnapshotPersisterTestBase.java (renamed from services/tests/wmtests/src/com/android/server/wm/TaskSnapshotPersisterTestBase.java)0
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java (renamed from services/tests/wmtests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java)3
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/TaskStackContainersTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/TaskStackContainersTests.java)2
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/TaskStackTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/TaskStackTests.java)2
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/TaskWindowContainerControllerTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/TaskWindowContainerControllerTests.java)2
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/TestIWindow.java (renamed from services/tests/wmtests/src/com/android/server/wm/TestIWindow.java)4
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java (renamed from services/tests/wmtests/src/com/android/server/wm/TestWindowManagerPolicy.java)0
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/UnknownAppVisibilityControllerTest.java (renamed from services/tests/wmtests/src/com/android/server/wm/UnknownAppVisibilityControllerTest.java)3
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/WallpaperControllerTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/WallpaperControllerTests.java)0
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/WindowAnimationSpecTest.java (renamed from services/tests/wmtests/src/com/android/server/wm/WindowAnimationSpecTest.java)3
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/WindowConfigurationTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/WindowConfigurationTests.java)2
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/WindowContainerControllerTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/WindowContainerControllerTests.java)2
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/WindowContainerTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java)2
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/WindowContainerTraversalTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/WindowContainerTraversalTests.java)3
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/WindowFrameTests.java)4
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/WindowManagerServiceRule.java (renamed from services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceRule.java)0
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/WindowManagerServiceRuleTest.java (renamed from services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceRuleTest.java)0
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/WindowStateTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java)11
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/WindowSurfacePlacerTest.java (renamed from services/tests/wmtests/src/com/android/server/wm/WindowSurfacePlacerTest.java)6
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/WindowTestUtils.java (renamed from services/tests/wmtests/src/com/android/server/wm/WindowTestUtils.java)28
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java (renamed from services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java)0
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/WindowTokenTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/WindowTokenTests.java)2
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/WindowTracingTest.java (renamed from services/tests/wmtests/src/com/android/server/wm/WindowTracingTest.java)3
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/ZOrderingTests.java (renamed from services/tests/wmtests/src/com/android/server/wm/ZOrderingTests.java)2
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/utils/CoordinateTransformsTest.java (renamed from services/tests/wmtests/src/com/android/server/wm/utils/CoordinateTransformsTest.java)18
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/utils/InsetUtilsTest.java (renamed from services/tests/wmtests/src/com/android/server/wm/utils/InsetUtilsTest.java)6
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/utils/RotationCacheTest.java (renamed from services/tests/wmtests/src/com/android/server/wm/utils/RotationCacheTest.java)6
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/utils/WmDisplayCutoutTest.java (renamed from services/tests/wmtests/src/com/android/server/wm/utils/WmDisplayCutoutTest.java)4
-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/DummyAmTests.java46
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/DummyWmTests.java46
97 files changed, 342 insertions, 336 deletions
diff --git a/services/core/java/com/android/server/am/TEST_MAPPING b/services/core/java/com/android/server/am/TEST_MAPPING
index 3f603cc55f82..b817669ce70c 100644
--- a/services/core/java/com/android/server/am/TEST_MAPPING
+++ b/services/core/java/com/android/server/am/TEST_MAPPING
@@ -37,6 +37,20 @@
]
},
{
+ "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": [
{
@@ -59,6 +73,14 @@
"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 50c81f5222de..e212b0481ed6 100644
--- a/services/core/java/com/android/server/policy/TEST_MAPPING
+++ b/services/core/java/com/android/server/policy/TEST_MAPPING
@@ -1,6 +1,20 @@
{
"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": [
{
@@ -17,6 +31,14 @@
],
"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 30d84fb4923c..0c9a14be964f 100644
--- a/services/core/java/com/android/server/wm/TEST_MAPPING
+++ b/services/core/java/com/android/server/wm/TEST_MAPPING
@@ -12,6 +12,20 @@
]
},
{
+ "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": [
{
@@ -31,6 +45,14 @@
"name": "CtsWindowManagerDeviceTestCases"
},
{
+ "name": "FrameworksServicesTests",
+ "options": [
+ {
+ "include-filter": "com.android.server.wm."
+ }
+ ]
+ },
+ {
"name": "WmTests",
"options": [
{
diff --git a/services/tests/wmtests/src/com/android/server/am/ActivityLaunchParamsModifierTests.java b/services/tests/servicestests/src/com/android/server/am/ActivityLaunchParamsModifierTests.java
index fb09f0dcdf91..9de64f2cf211 100644
--- a/services/tests/wmtests/src/com/android/server/am/ActivityLaunchParamsModifierTests.java
+++ b/services/tests/servicestests/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 WmTests:ActivityLaunchParamsModifierTests
+ * atest FrameworksServicesTests:ActivityLaunchParamsModifierTests
*/
@MediumTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/am/ActivityManagerInternalTest.java b/services/tests/servicestests/src/com/android/server/am/ActivityManagerInternalTest.java
index 751ac520a7d0..9a7488e42326 100644
--- a/services/tests/wmtests/src/com/android/server/am/ActivityManagerInternalTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityManagerInternalTest.java
@@ -34,8 +34,17 @@ import org.mockito.MockitoAnnotations;
/**
* Test class for {@link ActivityManagerInternal}.
*
- * Build/Install/Run:
- * atest WmTests:ActivityManagerInternalTest
+ * 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
*/
@RunWith(AndroidJUnit4.class)
public class ActivityManagerInternalTest {
diff --git a/services/tests/wmtests/src/com/android/server/am/ActivityManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/am/ActivityManagerServiceTest.java
index 5d5f930e3f3b..47ce8796e449 100644
--- a/services/tests/wmtests/src/com/android/server/am/ActivityManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityManagerServiceTest.java
@@ -89,8 +89,17 @@ import java.util.function.Function;
/**
* Test class for {@link ActivityManagerService}.
*
- * Build/Install/Run:
- * atest WmTests:ActivityManagerServiceTest
+ * 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
*/
@SmallTest
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/wmtests/src/com/android/server/am/ActivityManagerTest.java b/services/tests/servicestests/src/com/android/server/am/ActivityManagerTest.java
index a2f942e7f96e..ba25b1659bd2 100644
--- a/services/tests/wmtests/src/com/android/server/am/ActivityManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityManagerTest.java
@@ -18,18 +18,13 @@ package com.android.server.am;
import android.app.ActivityManager;
import android.app.IActivityManager;
-import android.os.RemoteException;
+import android.os.ServiceManager;
import android.os.UserHandle;
+import android.os.RemoteException;
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/wmtests/src/com/android/server/am/ActivityOptionsTest.java b/services/tests/servicestests/src/com/android/server/am/ActivityOptionsTest.java
index 45c509aad108..d15bff4f6378 100644
--- a/services/tests/wmtests/src/com/android/server/am/ActivityOptionsTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityOptionsTest.java
@@ -34,10 +34,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
/**
- * Tests for {@link ActivityOptions}.
- *
- * Build/Install/Run:
- * atest WmTests:ActivityOptionsTest
+ * atest FrameworksServicesTests:ActivityOptionsTest
*/
@MediumTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/am/ActivityRecordTests.java b/services/tests/servicestests/src/com/android/server/am/ActivityRecordTests.java
index 171203aa63c2..ffc7fa26d9a1 100644
--- a/services/tests/wmtests/src/com/android/server/am/ActivityRecordTests.java
+++ b/services/tests/servicestests/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 WmTests:com.android.server.am.ActivityRecordTests
+ * atest FrameworksServicesTests:com.android.server.am.ActivityRecordTests
*/
@MediumTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/am/ActivityStackSupervisorTests.java b/services/tests/servicestests/src/com/android/server/am/ActivityStackSupervisorTests.java
index 2e4924550cce..0345a81b5bec 100644
--- a/services/tests/wmtests/src/com/android/server/am/ActivityStackSupervisorTests.java
+++ b/services/tests/servicestests/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 WmTests:ActivityStackSupervisorTests
+ * atest FrameworksServicesTests:com.android.server.am.ActivityStackSupervisorTests
*/
@MediumTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/am/ActivityStackTests.java b/services/tests/servicestests/src/com/android/server/am/ActivityStackTests.java
index 971ae9966e93..ab814ee15df0 100644
--- a/services/tests/wmtests/src/com/android/server/am/ActivityStackTests.java
+++ b/services/tests/servicestests/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 WmTests:ActivityStackTests
+ * atest FrameworksServicesTests:com.android.server.am.ActivityStackTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/am/ActivityStartControllerTests.java b/services/tests/servicestests/src/com/android/server/am/ActivityStartControllerTests.java
index 6d110a06aef1..e1ebbcf8f653 100644
--- a/services/tests/wmtests/src/com/android/server/am/ActivityStartControllerTests.java
+++ b/services/tests/servicestests/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 WmTests:ActivityStartControllerTests
+ * atest FrameworksServicesTests:ActivityStartControllerTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/am/ActivityStartInterceptorTest.java b/services/tests/servicestests/src/com/android/server/am/ActivityStartInterceptorTest.java
index fb28b9b3e29e..86541b95f395 100644
--- a/services/tests/wmtests/src/com/android/server/am/ActivityStartInterceptorTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityStartInterceptorTest.java
@@ -59,7 +59,7 @@ import org.mockito.MockitoAnnotations;
* Unit tests for {@link ActivityStartInterceptorTest}.
*
* Build/Install/Run:
- * atest WmTests:ActivityStartInterceptorTest
+ * atest FrameworksServicesTests:com.android.server.am.ActivityStartInterceptorTest
*/
@Presubmit
@SmallTest
diff --git a/services/tests/wmtests/src/com/android/server/am/ActivityStarterTests.java b/services/tests/servicestests/src/com/android/server/am/ActivityStarterTests.java
index 2aa6bda6d0b1..749403ea4013 100644
--- a/services/tests/wmtests/src/com/android/server/am/ActivityStarterTests.java
+++ b/services/tests/servicestests/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 WmTests:ActivityStarterTests
+ * atest FrameworksServicesTests:ActivityStarterTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/am/ActivityTestsBase.java b/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
index 2902ee2b1639..0e8200992a14 100644
--- a/services/tests/wmtests/src/com/android/server/am/ActivityTestsBase.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
@@ -39,6 +39,14 @@ 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;
@@ -46,7 +54,6 @@ 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;
@@ -63,10 +70,7 @@ 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;
@@ -76,9 +80,7 @@ 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/wmtests/src/com/android/server/am/AppErrorDialogTest.java b/services/tests/servicestests/src/com/android/server/am/AppErrorDialogTest.java
index 01351bbd3992..87d367fcb2b2 100644
--- a/services/tests/wmtests/src/com/android/server/am/AppErrorDialogTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/AppErrorDialogTest.java
@@ -33,10 +33,7 @@ import org.junit.runner.RunWith;
import java.io.File;
/**
- * Tests for {@link AppErrorDialog}.
- *
- * Build/Install/Run:
- * atest WmTests:AppErrorDialogTest
+ * runtest -c com.android.server.am.AppErrorDialogTest frameworks-services
*/
@RunWith(AndroidJUnit4.class)
@SmallTest
diff --git a/services/tests/wmtests/src/com/android/server/am/AssistDataRequesterTest.java b/services/tests/servicestests/src/com/android/server/am/AssistDataRequesterTest.java
index 20ddd8b0c704..a030210398d6 100644
--- a/services/tests/wmtests/src/com/android/server/am/AssistDataRequesterTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/AssistDataRequesterTest.java
@@ -64,8 +64,7 @@ import java.util.concurrent.TimeUnit;
* Note: Currently, we only support fetching the screenshot for the current application, so the
* screenshot checks are hardcoded accordingly.
*
- * Build/Install/Run:
- * atest WmTests:AssistDataRequesterTest
+ * runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/am/AssistDataRequesterTest.java
*/
@MediumTest
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/wmtests/src/com/android/server/am/BroadcastRecordTest.java b/services/tests/servicestests/src/com/android/server/am/BroadcastRecordTest.java
index f8c88b264705..62c5734561f9 100644
--- a/services/tests/wmtests/src/com/android/server/am/BroadcastRecordTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/BroadcastRecordTest.java
@@ -40,7 +40,7 @@ import java.util.List;
* Test class for {@link BroadcastRecord}.
*
* Build/Install/Run:
- * atest WmTests:BroadcastRecordTest
+ * atest FrameworksServicesTests:com.android.server.am.BroadcastRecordTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/am/ClientLifecycleManagerTests.java b/services/tests/servicestests/src/com/android/server/am/ClientLifecycleManagerTests.java
index 457c12eebcac..b4ad183db386 100644
--- a/services/tests/wmtests/src/com/android/server/am/ClientLifecycleManagerTests.java
+++ b/services/tests/servicestests/src/com/android/server/am/ClientLifecycleManagerTests.java
@@ -1,19 +1,3 @@
-/*
- * 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;
@@ -32,12 +16,6 @@ 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/wmtests/src/com/android/server/am/CoreSettingsObserverTest.java b/services/tests/servicestests/src/com/android/server/am/CoreSettingsObserverTest.java
index 60389ae7650f..fe8256eeb977 100644
--- a/services/tests/wmtests/src/com/android/server/am/CoreSettingsObserverTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/CoreSettingsObserverTest.java
@@ -48,8 +48,17 @@ import java.io.File;
/**
* Test class for {@link CoreSettingsObserver}.
*
- * Build/Install/Run:
- * atest WmTests:CoreSettingsObserverTest
+ * 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
*/
@SmallTest
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/wmtests/src/com/android/server/am/GlobalSettingsToPropertiesMapperTest.java b/services/tests/servicestests/src/com/android/server/am/GlobalSettingsToPropertiesMapperTest.java
index 0395db9a2092..765aaad45efb 100644
--- a/services/tests/wmtests/src/com/android/server/am/GlobalSettingsToPropertiesMapperTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/GlobalSettingsToPropertiesMapperTest.java
@@ -37,9 +37,6 @@ import java.util.Map;
/**
* Tests for {@link GlobalSettingsToPropertiesMapper}
- *
- * Build/Install/Run:
- * atest WmTests:GlobalSettingsToPropertiesMapperTest
*/
@RunWith(AndroidJUnit4.class)
@SmallTest
diff --git a/services/tests/wmtests/src/com/android/server/am/LaunchParamsControllerTests.java b/services/tests/servicestests/src/com/android/server/am/LaunchParamsControllerTests.java
index 73b819e968fa..d4bab2ef2a43 100644
--- a/services/tests/wmtests/src/com/android/server/am/LaunchParamsControllerTests.java
+++ b/services/tests/servicestests/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 WmTests:LaunchParamsControllerTests
+ * atest FrameworksServicesTests:LaunchParamsControllerTests
*/
@MediumTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/am/LockTaskControllerTest.java b/services/tests/servicestests/src/com/android/server/am/LockTaskControllerTest.java
index 1ce5c422f8ef..863a0d8d34a4 100644
--- a/services/tests/wmtests/src/com/android/server/am/LockTaskControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/LockTaskControllerTest.java
@@ -35,20 +35,9 @@ 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.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 static org.junit.Assert.*;
+import static org.mockito.ArgumentMatchers.*;
+import static org.mockito.Mockito.*;
import android.app.StatusBarManager;
import android.app.admin.DevicePolicyManager;
@@ -88,7 +77,7 @@ import org.mockito.verification.VerificationMode;
* Unit tests for {@link LockTaskController}.
*
* Build/Install/Run:
- * atest WmTests:LockTaskControllerTest
+ * bit FrameworksServicesTests:com.android.server.am.LockTaskControllerTest
*/
@Presubmit
@SmallTest
diff --git a/services/tests/wmtests/src/com/android/server/am/MemoryStatUtilTest.java b/services/tests/servicestests/src/com/android/server/am/MemoryStatUtilTest.java
index 912b02370f60..06c74371eb51 100644
--- a/services/tests/wmtests/src/com/android/server/am/MemoryStatUtilTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/MemoryStatUtilTest.java
@@ -29,12 +29,6 @@ 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/wmtests/src/com/android/server/am/PendingRemoteAnimationRegistryTest.java b/services/tests/servicestests/src/com/android/server/am/PendingRemoteAnimationRegistryTest.java
index e69d2071c9e6..1c4e0f64759b 100644
--- a/services/tests/wmtests/src/com/android/server/am/PendingRemoteAnimationRegistryTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/PendingRemoteAnimationRegistryTest.java
@@ -38,10 +38,7 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
/**
- * Tests for {@link PendingRemoteAnimationRegistry}.
- *
- * Build/Install/Run:
- * atest WmTests:PendingRemoteAnimationRegistryTest
+ * atest PendingRemoteAnimationRegistryTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/am/PersistentConnectionTest.java b/services/tests/servicestests/src/com/android/server/am/PersistentConnectionTest.java
index 5c42081d4655..54f93a88a387 100644
--- a/services/tests/wmtests/src/com/android/server/am/PersistentConnectionTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/PersistentConnectionTest.java
@@ -13,7 +13,6 @@
* 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;
@@ -42,12 +41,6 @@ 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/wmtests/src/com/android/server/am/RecentTasksTest.java b/services/tests/servicestests/src/com/android/server/am/RecentTasksTest.java
index 93685d8a83f3..70cfad1d0f2f 100644
--- a/services/tests/wmtests/src/com/android/server/am/RecentTasksTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/RecentTasksTest.java
@@ -17,6 +17,7 @@
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;
@@ -37,8 +38,6 @@ 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;
@@ -56,6 +55,7 @@ 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,6 +68,8 @@ 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;
@@ -77,10 +79,7 @@ import java.util.Random;
import java.util.Set;
/**
- * Tests for {@link RecentTasks}.
- *
- * Build/Install/Run:
- * atest WmTests:RecentTasksTest
+ * atest FrameworksServicesTests:RecentTasksTest
*/
@MediumTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/am/RecentsAnimationTest.java b/services/tests/servicestests/src/com/android/server/am/RecentsAnimationTest.java
index 4958782aa063..f15b5f7f04b0 100644
--- a/services/tests/wmtests/src/com/android/server/am/RecentsAnimationTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/RecentsAnimationTest.java
@@ -45,10 +45,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
/**
- * Tests for {@link RecentsAnimation}.
- *
- * Build/Install/Run:
- * atest WmTests:RecentsAnimationTest
+ * atest FrameworksServicesTests:RecentsAnimationTest
*/
@MediumTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/am/RunningTasksTest.java b/services/tests/servicestests/src/com/android/server/am/RunningTasksTest.java
index ddb3e64741de..aa3046fb694c 100644
--- a/services/tests/wmtests/src/com/android/server/am/RunningTasksTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/RunningTasksTest.java
@@ -30,6 +30,7 @@ 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;
@@ -42,10 +43,7 @@ import org.junit.runner.RunWith;
import java.util.ArrayList;
/**
- * Tests for {@link RunningTasks}.
- *
- * Build/Install/Run:
- * atest WmTests:RunningTasksTest
+ * atest FrameworksServicesTests:RunningTasksTest
*/
@MediumTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/am/SafeActivityOptionsTest.java b/services/tests/servicestests/src/com/android/server/am/SafeActivityOptionsTest.java
index 99f53453c064..8e4e7e6b63c3 100644
--- a/services/tests/wmtests/src/com/android/server/am/SafeActivityOptionsTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/SafeActivityOptionsTest.java
@@ -28,12 +28,6 @@ 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/wmtests/src/com/android/server/am/TaskLaunchParamsModifierTests.java b/services/tests/servicestests/src/com/android/server/am/TaskLaunchParamsModifierTests.java
index 5050744eb19b..f5b8f78cfd53 100644
--- a/services/tests/wmtests/src/com/android/server/am/TaskLaunchParamsModifierTests.java
+++ b/services/tests/servicestests/src/com/android/server/am/TaskLaunchParamsModifierTests.java
@@ -22,6 +22,7 @@ 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;
@@ -39,7 +40,7 @@ import org.junit.runner.RunWith;
* Tests for exercising resizing task bounds.
*
* Build/Install/Run:
- * atest WmTests:TaskLaunchParamsModifierTests
+ * atest FrameworksServicesTests:TaskLaunchParamsModifierTests
*/
@MediumTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/am/TaskPersisterTest.java b/services/tests/servicestests/src/com/android/server/am/TaskPersisterTest.java
index 41b105b69fc3..8d54bc236a66 100644
--- a/services/tests/wmtests/src/com/android/server/am/TaskPersisterTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/TaskPersisterTest.java
@@ -17,16 +17,20 @@
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;
+
/**
- * Tests for {@link TaskPersister}.
- *
- * Build/Install/Run:
- * atest WmTests:TaskPersisterTest
+ * atest FrameworksServicesTests:TaskPersisterTest
*/
public class TaskPersisterTest extends AndroidTestCase {
private static final String TEST_USER_NAME = "AM-Test-User";
diff --git a/services/tests/wmtests/src/com/android/server/am/TaskRecordTests.java b/services/tests/servicestests/src/com/android/server/am/TaskRecordTests.java
index 23420aa7ed8e..fa8a09cc2b85 100644
--- a/services/tests/wmtests/src/com/android/server/am/TaskRecordTests.java
+++ b/services/tests/servicestests/src/com/android/server/am/TaskRecordTests.java
@@ -60,7 +60,7 @@ import java.util.ArrayList;
* Tests for exercising {@link TaskRecord}.
*
* Build/Install/Run:
- * atest WmTests:TaskRecordTests
+ * atest FrameworksServicesTests:com.android.server.am.TaskRecordTests
*/
@MediumTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/am/TaskStackChangedListenerTest.java b/services/tests/servicestests/src/com/android/server/am/TaskStackChangedListenerTest.java
index c12489539c9e..3f7c7148381e 100644
--- a/services/tests/wmtests/src/com/android/server/am/TaskStackChangedListenerTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/TaskStackChangedListenerTest.java
@@ -53,12 +53,6 @@ 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/wmtests/src/com/android/server/am/UserControllerTest.java b/services/tests/servicestests/src/com/android/server/am/UserControllerTest.java
index fb5ded51489f..cc4f51987523 100644
--- a/services/tests/wmtests/src/com/android/server/am/UserControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/UserControllerTest.java
@@ -16,30 +16,6 @@
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;
@@ -72,11 +48,30 @@ 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;
+
/**
- * Tests for {@link UserController}.
- *
- * Build/Install/Run:
- * atest WmTests:UserControllerTest
+ * Usage: bit FrameworksServicesTests:com.android.server.am.UserControllerTest
*/
@Presubmit
public class UserControllerTest extends AndroidTestCase {
diff --git a/services/tests/wmtests/src/com/android/server/policy/FakeWindowState.java b/services/tests/servicestests/src/com/android/server/policy/FakeWindowState.java
index d7eb105c5700..d34f951ffd61 100644
--- a/services/tests/wmtests/src/com/android/server/policy/FakeWindowState.java
+++ b/services/tests/servicestests/src/com/android/server/policy/FakeWindowState.java
@@ -16,13 +16,17 @@
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/wmtests/src/com/android/server/policy/PhoneWindowManagerInsetsTest.java b/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerInsetsTest.java
index be044e911a6b..cce6ba718400 100644
--- a/services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerInsetsTest.java
+++ b/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerInsetsTest.java
@@ -37,12 +37,6 @@ 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/wmtests/src/com/android/server/policy/PhoneWindowManagerLayoutTest.java b/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerLayoutTest.java
index 4dbbeb16c55d..fee761dd92d3 100644
--- a/services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerLayoutTest.java
+++ b/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerLayoutTest.java
@@ -49,12 +49,6 @@ 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/wmtests/src/com/android/server/policy/PhoneWindowManagerTest.java b/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerTest.java
index e20f5d0a325a..d92d7e03ef3b 100644
--- a/services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerTest.java
@@ -52,12 +52,6 @@ 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/wmtests/src/com/android/server/policy/PhoneWindowManagerTestBase.java b/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerTestBase.java
index e31b47b26f2c..acd065e90a0c 100644
--- a/services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerTestBase.java
+++ b/services/tests/servicestests/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/wmtests/src/com/android/server/wm/AnimatingAppWindowTokenRegistryTest.java b/services/tests/servicestests/src/com/android/server/wm/AnimatingAppWindowTokenRegistryTest.java
index 2291967b9b89..b5fe8b159c47 100644
--- a/services/tests/wmtests/src/com/android/server/wm/AnimatingAppWindowTokenRegistryTest.java
+++ b/services/tests/servicestests/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 WmTests:AnimatingAppWindowTokenRegistryTest
+ * atest FrameworksServicesTests:com.android.server.wm.AnimatingAppWindowTokenRegistryTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/wm/AppTransitionTests.java b/services/tests/servicestests/src/com/android/server/wm/AppTransitionTests.java
index a76299356ea7..3053c4197f82 100644
--- a/services/tests/wmtests/src/com/android/server/wm/AppTransitionTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/AppTransitionTests.java
@@ -38,8 +38,7 @@ import org.junit.runner.RunWith;
/**
* Test class for {@link AppTransition}.
*
- * Build/Install/Run:
- * atest WmTests:AppTransitionTests
+ * atest AppTransitionTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/wm/AppWindowContainerControllerTests.java b/services/tests/servicestests/src/com/android/server/wm/AppWindowContainerControllerTests.java
index c3d89e59d2e8..fcd8a39e4d07 100644
--- a/services/tests/wmtests/src/com/android/server/wm/AppWindowContainerControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/AppWindowContainerControllerTests.java
@@ -41,8 +41,7 @@ import org.junit.Test;
/**
* Test class for {@link AppWindowContainerController}.
*
- * Build/Install/Run:
- * atest WmTests:AppWindowContainerControllerTests
+ * atest FrameworksServicesTests:com.android.server.wm.AppWindowContainerControllerTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/wm/AppWindowTokenAnimationTests.java b/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenAnimationTests.java
index b1029a3c6316..e3ab5cf4fc52 100644
--- a/services/tests/wmtests/src/com/android/server/wm/AppWindowTokenAnimationTests.java
+++ b/services/tests/servicestests/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 WmTests:AppWindowTokenAnimationTests
+ * atest FrameworksServicesTests:com.android.server.wm.AppWindowTokenAnimationTests
*/
@SmallTest
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/wmtests/src/com/android/server/wm/AppWindowTokenTests.java b/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenTests.java
index a0b244306578..6d31dfbb8186 100644
--- a/services/tests/wmtests/src/com/android/server/wm/AppWindowTokenTests.java
+++ b/services/tests/servicestests/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 WmTests:AppWindowTokenTests
+ * atest FrameworksServicesTests:com.android.server.wm.AppWindowTokenTests
*/
@SmallTest
// TODO: b/68267650
diff --git a/services/tests/wmtests/src/com/android/server/wm/BoundsAnimationControllerTests.java b/services/tests/servicestests/src/com/android/server/wm/BoundsAnimationControllerTests.java
index 888ce4c7ac3d..12be0b3ae6f8 100644
--- a/services/tests/wmtests/src/com/android/server/wm/BoundsAnimationControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/BoundsAnimationControllerTests.java
@@ -26,6 +26,7 @@ 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;
@@ -56,7 +57,7 @@ import org.junit.runner.RunWith;
* appropriately.
*
* Build/Install/Run:
- * atest WmTests:BoundsAnimationControllerTests
+ * bit FrameworksServicesTests:com.android.server.wm.BoundsAnimationControllerTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/wm/ConfigurationContainerTests.java b/services/tests/servicestests/src/com/android/server/wm/ConfigurationContainerTests.java
index 34ff20604039..2b8214d162c9 100644
--- a/services/tests/wmtests/src/com/android/server/wm/ConfigurationContainerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/ConfigurationContainerTests.java
@@ -17,6 +17,7 @@
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;
@@ -47,7 +48,7 @@ import java.util.List;
* Test class for {@link ConfigurationContainer}.
*
* Build/Install/Run:
- * atest WmTests:ConfigurationContainerTests
+ * bit FrameworksServicesTests:com.android.server.wm.ConfigurationContainerTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/wm/DimmerTests.java b/services/tests/servicestests/src/com/android/server/wm/DimmerTests.java
index 5efbf3040c3e..21555e38a7e8 100644
--- a/services/tests/wmtests/src/com/android/server/wm/DimmerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/DimmerTests.java
@@ -39,10 +39,8 @@ import org.junit.Test;
import org.junit.runner.RunWith;
/**
- * Tests for {@link Dimmer}.
- *
* Build/Install/Run:
- * atest WmTests:DimmerTests;
+ * atest FrameworksServicesTests:com.android.server.wm.DimmerTests;
*/
@Presubmit
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java b/services/tests/servicestests/src/com/android/server/wm/DisplayContentTests.java
index 4e755ab95980..b3303049be39 100644
--- a/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/DisplayContentTests.java
@@ -49,6 +49,7 @@ 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;
@@ -73,7 +74,7 @@ import java.util.List;
* Tests for the {@link DisplayContent} class.
*
* Build/Install/Run:
- * atest WmTests:DisplayContentTests
+ * atest com.android.server.wm.DisplayContentTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/wm/DisplaySettingsTests.java b/services/tests/servicestests/src/com/android/server/wm/DisplaySettingsTests.java
index a6cd649b6453..07eafa5c4be4 100644
--- a/services/tests/wmtests/src/com/android/server/wm/DisplaySettingsTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/DisplaySettingsTests.java
@@ -35,12 +35,6 @@ 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/wmtests/src/com/android/server/wm/DragDropControllerTests.java b/services/tests/servicestests/src/com/android/server/wm/DragDropControllerTests.java
index b7cd7644a0eb..7125246b6a29 100644
--- a/services/tests/wmtests/src/com/android/server/wm/DragDropControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/DragDropControllerTests.java
@@ -57,8 +57,7 @@ import java.util.concurrent.TimeUnit;
/**
* Tests for the {@link DragDropController} class.
*
- * Build/Install/Run:
- * atest WmTests:DragDropControllerTests
+ * atest FrameworksServicesTests:com.android.server.wm.DragDropControllerTests
*/
@SmallTest
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/wmtests/src/com/android/server/wm/PinnedStackControllerTest.java b/services/tests/servicestests/src/com/android/server/wm/PinnedStackControllerTest.java
index 981c01ffd5cb..7222a999e23c 100644
--- a/services/tests/wmtests/src/com/android/server/wm/PinnedStackControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/PinnedStackControllerTest.java
@@ -24,12 +24,6 @@ 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/wmtests/src/com/android/server/wm/RecentsAnimationControllerTest.java b/services/tests/servicestests/src/com/android/server/wm/RecentsAnimationControllerTest.java
index 5672ff149d49..e7c45d59078c 100644
--- a/services/tests/wmtests/src/com/android/server/wm/RecentsAnimationControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/RecentsAnimationControllerTest.java
@@ -48,10 +48,7 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
/**
- * Tests for {@link RecentsAnimationController}.
- *
- * Build/Install/Run:
- * atest WmTests:RecentsAnimationControllerTest
+ * atest FrameworksServicesTests:com.android.server.wm.RecentsAnimationControllerTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/wm/RemoteAnimationControllerTest.java b/services/tests/servicestests/src/com/android/server/wm/RemoteAnimationControllerTest.java
index 085b86a72a64..7d19baa9f871 100644
--- a/services/tests/wmtests/src/com/android/server/wm/RemoteAnimationControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/RemoteAnimationControllerTest.java
@@ -53,10 +53,7 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
/**
- * Tests for {@link RemoteAnimationController}.
- *
- * Build/Install/Run:
- * atest WmTests:RemoteAnimationControllerTest
+ * atest FrameworksServicesTests:com.android.server.wm.RemoteAnimationControllerTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/wm/RootWindowContainerTests.java b/services/tests/servicestests/src/com/android/server/wm/RootWindowContainerTests.java
index fdd08fa15a76..c1db6a6a4def 100644
--- a/services/tests/wmtests/src/com/android/server/wm/RootWindowContainerTests.java
+++ b/services/tests/servicestests/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 WmTests:RootWindowContainerTests
+ * atest FrameworksServicesTests:com.android.server.wm.RootWindowContainerTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/wm/ScreenDecorWindowTests.java b/services/tests/servicestests/src/com/android/server/wm/ScreenDecorWindowTests.java
index e27dc06c17cb..60025f0f03fe 100644
--- a/services/tests/wmtests/src/com/android/server/wm/ScreenDecorWindowTests.java
+++ b/services/tests/servicestests/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 WmTests:ScreenDecorWindowTests
+ * atest FrameworksServicesTests:com.android.server.wm.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/wmtests/src/com/android/server/wm/StackWindowControllerTests.java b/services/tests/servicestests/src/com/android/server/wm/StackWindowControllerTests.java
index 83e2b7bb1e16..9f2645cc98ae 100644
--- a/services/tests/wmtests/src/com/android/server/wm/StackWindowControllerTests.java
+++ b/services/tests/servicestests/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 WmTests:StackWindowControllerTests
+ * atest FrameworksServicesTests:StackWindowControllerTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/wm/SurfaceAnimationRunnerTest.java b/services/tests/servicestests/src/com/android/server/wm/SurfaceAnimationRunnerTest.java
index 69aac2d1eba8..4551c3611102 100644
--- a/services/tests/wmtests/src/com/android/server/wm/SurfaceAnimationRunnerTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/SurfaceAnimationRunnerTest.java
@@ -27,8 +27,6 @@ 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;
@@ -56,13 +54,14 @@ 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}.
*
- * Build/Install/Run:
- * atest WmTests:SurfaceAnimationRunnerTest
+ * atest FrameworksServicesTests:com.android.server.wm.SurfaceAnimationRunnerTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/wm/SurfaceAnimatorTest.java b/services/tests/servicestests/src/com/android/server/wm/SurfaceAnimatorTest.java
index b786cd5b6519..7b5e8deeeb65 100644
--- a/services/tests/wmtests/src/com/android/server/wm/SurfaceAnimatorTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/SurfaceAnimatorTest.java
@@ -50,8 +50,7 @@ import org.mockito.MockitoAnnotations;
/**
* Test class for {@link SurfaceAnimatorTest}.
*
- * Build/Install/Run:
- * atest WmTests:SurfaceAnimatorTest
+ * atest FrameworksServicesTests:com.android.server.wm.SurfaceAnimatorTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskPositionerTests.java b/services/tests/servicestests/src/com/android/server/wm/TaskPositionerTests.java
index fb10a65908a7..17b7fc1fd0f0 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TaskPositionerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TaskPositionerTests.java
@@ -45,8 +45,7 @@ import org.mockito.Mockito;
/**
* Tests for the {@link TaskPositioner} class.
*
- * Build/Install/Run:
- * atest WmTests:TaskPositionerTests
+ * runtest frameworks-services -c com.android.server.wm.TaskPositionerTests
*/
@SmallTest
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskPositioningControllerTests.java b/services/tests/servicestests/src/com/android/server/wm/TaskPositioningControllerTests.java
index e7ef31d62c71..ced084717494 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TaskPositioningControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TaskPositioningControllerTests.java
@@ -40,8 +40,7 @@ import org.junit.runner.RunWith;
/**
* Tests for the {@link TaskPositioningController} class.
*
- * Build/Install/Run:
- * atest WmTests:TaskPositioningControllerTests
+ * atest com.android.server.wm.TaskPositioningControllerTests
*/
@SmallTest
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskSnapshotCacheTest.java b/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotCacheTest.java
index 50878ce805be..c9d800449ff9 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TaskSnapshotCacheTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotCacheTest.java
@@ -33,8 +33,7 @@ import org.junit.runner.RunWith;
/**
* Test class for {@link TaskSnapshotCache}.
*
- * Build/Install/Run:
- * atest WmTests:TaskSnapshotCacheTest
+ * runtest frameworks-services -c com.android.server.wm.TaskSnapshotCacheTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskSnapshotControllerTest.java b/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotControllerTest.java
index c78d200c309f..efce063c8fca 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TaskSnapshotControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotControllerTest.java
@@ -20,8 +20,7 @@ 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.SNAPSHOT_MODE_APP_THEME;
-import static com.android.server.wm.TaskSnapshotController.SNAPSHOT_MODE_REAL;
+import static com.android.server.wm.TaskSnapshotController.*;
import static junit.framework.Assert.assertEquals;
@@ -39,8 +38,7 @@ import org.junit.runner.RunWith;
/**
* Test class for {@link TaskSnapshotController}.
*
- * Build/Install/Run:
- * atest WmTests:TaskSnapshotControllerTest
+ * runtest frameworks-services -c com.android.server.wm.TaskSnapshotControllerTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskSnapshotPersisterLoaderTest.java b/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotPersisterLoaderTest.java
index 31cf47b0ca75..600b2e52b083 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TaskSnapshotPersisterLoaderTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotPersisterLoaderTest.java
@@ -46,8 +46,7 @@ import java.io.File;
/**
* Test class for {@link TaskSnapshotPersister} and {@link TaskSnapshotLoader}
*
- * Build/Install/Run:
- * atest WmTests:TaskSnapshotPersisterLoaderTest
+ * atest FrameworksServicesTests:TaskSnapshotPersisterLoaderTest
*/
@MediumTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskSnapshotPersisterTestBase.java b/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotPersisterTestBase.java
index 6f4f17380e3f..6f4f17380e3f 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TaskSnapshotPersisterTestBase.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotPersisterTestBase.java
diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java b/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java
index 6df179e27931..91074b9db081 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java
@@ -49,8 +49,7 @@ import org.junit.runner.RunWith;
/**
* Test class for {@link TaskSnapshotSurface}.
*
- * Build/Install/Run:
- * atest WmTests:TaskSnapshotSurfaceTest
+ * runtest frameworks-services -c com.android.server.wm.TaskSnapshotSurfaceTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskStackContainersTests.java b/services/tests/servicestests/src/com/android/server/wm/TaskStackContainersTests.java
index cc6755e45f9a..ea44279b46a9 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TaskStackContainersTests.java
+++ b/services/tests/servicestests/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:
- * atest WmTests:TaskStackContainersTests
+ * bit FrameworksServicesTests:com.android.server.wm.TaskStackContainersTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskStackTests.java b/services/tests/servicestests/src/com/android/server/wm/TaskStackTests.java
index d60ed8ecfe6b..53a1185b4655 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TaskStackTests.java
+++ b/services/tests/servicestests/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:
- * atest WmTests:TaskStackTests
+ * bit FrameworksServicesTests:com.android.server.wm.TaskStackTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskWindowContainerControllerTests.java b/services/tests/servicestests/src/com/android/server/wm/TaskWindowContainerControllerTests.java
index 48abce2a677a..edd76647f4a8 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TaskWindowContainerControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TaskWindowContainerControllerTests.java
@@ -33,7 +33,7 @@ import org.junit.runner.RunWith;
* Test class for {@link TaskWindowContainerController}.
*
* Build/Install/Run:
- * atest WmTests:TaskWindowContainerControllerTests
+ * bit FrameworksServicesTests:com.android.server.wm.TaskWindowContainerControllerTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/wm/TestIWindow.java b/services/tests/servicestests/src/com/android/server/wm/TestIWindow.java
index 032f4162b48e..353aa7deb534 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TestIWindow.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TestIWindow.java
@@ -16,6 +16,8 @@
package com.android.server.wm;
+import com.android.internal.os.IResultReceiver;
+
import android.graphics.Rect;
import android.os.Bundle;
import android.os.ParcelFileDescriptor;
@@ -25,8 +27,6 @@ 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/wmtests/src/com/android/server/wm/TestWindowManagerPolicy.java b/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java
index 5fb89977f905..5fb89977f905 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TestWindowManagerPolicy.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java
diff --git a/services/tests/wmtests/src/com/android/server/wm/UnknownAppVisibilityControllerTest.java b/services/tests/servicestests/src/com/android/server/wm/UnknownAppVisibilityControllerTest.java
index 616276a06563..3ac97027a893 100644
--- a/services/tests/wmtests/src/com/android/server/wm/UnknownAppVisibilityControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/UnknownAppVisibilityControllerTest.java
@@ -30,8 +30,7 @@ import org.junit.runner.RunWith;
/**
* Test class for {@link AppTransition}.
*
- * Build/Install/Run:
- * atest WmTests:UnknownAppVisibilityControllerTest
+ * runtest frameworks-services -c com.android.server.wm.UnknownAppVisibilityControllerTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/wm/WallpaperControllerTests.java b/services/tests/servicestests/src/com/android/server/wm/WallpaperControllerTests.java
index 882e78924629..882e78924629 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WallpaperControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WallpaperControllerTests.java
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowAnimationSpecTest.java b/services/tests/servicestests/src/com/android/server/wm/WindowAnimationSpecTest.java
index de49e75dd00c..827d938aa73e 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowAnimationSpecTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowAnimationSpecTest.java
@@ -41,8 +41,7 @@ import org.junit.runner.RunWith;
/**
* Tests for the {@link WindowAnimationSpec} class.
*
- * Build/Install/Run:
- * atest WmTests:WindowAnimationSpecTest
+ * atest FrameworksServicesTests:com.android.server.wm.WindowAnimationSpecTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowConfigurationTests.java b/services/tests/servicestests/src/com/android/server/wm/WindowConfigurationTests.java
index 17a0f91bf49f..e7cc2859ff62 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowConfigurationTests.java
+++ b/services/tests/servicestests/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:
- * atest WmTests:WindowConfigurationTests
+ * bit FrameworksServicesTests:com.android.server.wm.WindowConfigurationTests
*/
@SmallTest
@FlakyTest(bugId = 74078662)
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowContainerControllerTests.java b/services/tests/servicestests/src/com/android/server/wm/WindowContainerControllerTests.java
index b97a79b93215..6b1feb87aa42 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowContainerControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowContainerControllerTests.java
@@ -36,7 +36,7 @@ import org.junit.Test;
* Test class for {@link WindowContainerController}.
*
* Build/Install/Run:
- * atest WmTests:WindowContainerControllerTests
+ * bit FrameworksServicesTests:com.android.server.wm.WindowContainerControllerTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java b/services/tests/servicestests/src/com/android/server/wm/WindowContainerTests.java
index aa9fdb8c98d9..dc763b9bb079 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowContainerTests.java
@@ -57,7 +57,7 @@ import java.util.Comparator;
* Test class for {@link WindowContainer}.
*
* Build/Install/Run:
- * atest WmTests:WindowContainerTests
+ * atest FrameworksServicesTests:com.android.server.wm.WindowContainerTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowContainerTraversalTests.java b/services/tests/servicestests/src/com/android/server/wm/WindowContainerTraversalTests.java
index 7fbd8822ac29..ffc86226cd39 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowContainerTraversalTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowContainerTraversalTests.java
@@ -37,9 +37,6 @@ 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/wmtests/src/com/android/server/wm/WindowFrameTests.java b/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
index f93a4eca8b74..088672973524 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowFrameTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
@@ -21,6 +21,7 @@ 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;
@@ -43,8 +44,7 @@ import org.junit.runner.RunWith;
/**
* Tests for the {@link WindowState#computeFrameLw} method and other window frame machinery.
*
- * Build/Install/Run:
- * atest WmTests:WindowFrameTests
+ * Build/Install/Run: bit FrameworksServicesTests:com.android.server.wm.WindowFrameTests
*/
@SmallTest
@Presubmit
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceRule.java b/services/tests/servicestests/src/com/android/server/wm/WindowManagerServiceRule.java
index 54fd7db9b537..54fd7db9b537 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceRule.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowManagerServiceRule.java
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceRuleTest.java b/services/tests/servicestests/src/com/android/server/wm/WindowManagerServiceRuleTest.java
index 570a853a62ca..570a853a62ca 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceRuleTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowManagerServiceRuleTest.java
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java b/services/tests/servicestests/src/com/android/server/wm/WindowStateTests.java
index b8323913fd6c..6af3ea763c13 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowStateTests.java
@@ -57,10 +57,6 @@ 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;
@@ -69,11 +65,14 @@ 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.
*
- * Build/Install/Run:
- * atest WmTests:WindowStateTests
+ * atest FrameworksServicesTests:com.android.server.wm.WindowStateTests
*/
@SmallTest
@FlakyTest(bugId = 74078662)
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowSurfacePlacerTest.java b/services/tests/servicestests/src/com/android/server/wm/WindowSurfacePlacerTest.java
index f7ac344982cf..057f04740198 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowSurfacePlacerTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowSurfacePlacerTest.java
@@ -33,12 +33,6 @@ 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/wmtests/src/com/android/server/wm/WindowTestUtils.java b/services/tests/servicestests/src/com/android/server/wm/WindowTestUtils.java
index d9bf815b11a2..a1b164065696 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowTestUtils.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowTestUtils.java
@@ -16,20 +16,6 @@
package com.android.server.wm;
-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;
-import static org.mockito.Mockito.anyInt;
-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;
@@ -40,9 +26,23 @@ 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;
+import static org.mockito.Mockito.anyInt;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
import org.mockito.invocation.InvocationOnMock;
/**
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java b/services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java
index 70e4ce419e0a..70e4ce419e0a 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowTokenTests.java b/services/tests/servicestests/src/com/android/server/wm/WindowTokenTests.java
index 18b148e680c7..3732486f4a07 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowTokenTests.java
+++ b/services/tests/servicestests/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:
- * atest WmTests:WindowTokenTests
+ * bit FrameworksServicesTests:com.android.server.wm.WindowTokenTests
*/
@SmallTest
@FlakyTest(bugId = 74078662)
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowTracingTest.java b/services/tests/servicestests/src/com/android/server/wm/WindowTracingTest.java
index 9f9e9f97a778..bbc6550d5753 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowTracingTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowTracingTest.java
@@ -37,6 +37,7 @@ 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;
@@ -54,7 +55,7 @@ import java.nio.charset.StandardCharsets;
* Test class for {@link WindowTracing}.
*
* Build/Install/Run:
- * atest WmTests:WindowTracingTest
+ * bit FrameworksServicesTests:com.android.server.wm.WindowTracingTest
*/
@SmallTest
@FlakyTest(bugId = 74078662)
diff --git a/services/tests/wmtests/src/com/android/server/wm/ZOrderingTests.java b/services/tests/servicestests/src/com/android/server/wm/ZOrderingTests.java
index 07476af4e7d1..8f9fb1b7d5ec 100644
--- a/services/tests/wmtests/src/com/android/server/wm/ZOrderingTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/ZOrderingTests.java
@@ -51,7 +51,7 @@ import java.util.LinkedList;
* Tests for the {@link WindowLayersController} class.
*
* Build/Install/Run:
- * atest WmTests:ZOrderingTests
+ * bit FrameworksServicesTests:com.android.server.wm.ZOrderingTests
*/
@SmallTest
@FlakyTest(bugId = 74078662)
diff --git a/services/tests/wmtests/src/com/android/server/wm/utils/CoordinateTransformsTest.java b/services/tests/servicestests/src/com/android/server/wm/utils/CoordinateTransformsTest.java
index 6ad1677703c1..f82b01224f96 100644
--- a/services/tests/wmtests/src/com/android/server/wm/utils/CoordinateTransformsTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/utils/CoordinateTransformsTest.java
@@ -21,16 +21,14 @@ 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.assertEquals;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
import android.graphics.Matrix;
import android.graphics.Point;
@@ -42,12 +40,6 @@ 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/wmtests/src/com/android/server/wm/utils/InsetUtilsTest.java b/services/tests/servicestests/src/com/android/server/wm/utils/InsetUtilsTest.java
index e2d06cdff551..3364aef25bd0 100644
--- a/services/tests/wmtests/src/com/android/server/wm/utils/InsetUtilsTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/utils/InsetUtilsTest.java
@@ -32,12 +32,6 @@ 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/wmtests/src/com/android/server/wm/utils/RotationCacheTest.java b/services/tests/servicestests/src/com/android/server/wm/utils/RotationCacheTest.java
index 09d50bf2d27c..5d08920b43d0 100644
--- a/services/tests/wmtests/src/com/android/server/wm/utils/RotationCacheTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/utils/RotationCacheTest.java
@@ -34,12 +34,6 @@ 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/wmtests/src/com/android/server/wm/utils/WmDisplayCutoutTest.java b/services/tests/servicestests/src/com/android/server/wm/utils/WmDisplayCutoutTest.java
index 74a6323f630e..9ce3dca7e096 100644
--- a/services/tests/wmtests/src/com/android/server/wm/utils/WmDisplayCutoutTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/utils/WmDisplayCutoutTest.java
@@ -16,6 +16,7 @@
package com.android.server.wm.utils;
+
import static android.view.DisplayCutout.NO_CUTOUT;
import static android.view.DisplayCutout.fromBoundingRect;
@@ -38,8 +39,7 @@ import java.util.Arrays;
/**
* Tests for {@link WmDisplayCutout}
*
- * Build/Install/Run:
- * atest WmTests:WmDisplayCutoutTest
+ * Run with: atest WmDisplayCutoutTest
*/
@RunWith(AndroidJUnit4.class)
@SmallTest
diff --git a/services/tests/wmtests/Android.mk b/services/tests/wmtests/Android.mk
index 9a6c2252ffdf..0f8b18ab92cf 100644
--- a/services/tests/wmtests/Android.mk
+++ b/services/tests/wmtests/Android.mk
@@ -14,14 +14,9 @@ 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 a03573da0aca..1fb947309028 100644
--- a/services/tests/wmtests/AndroidManifest.xml
+++ b/services/tests/wmtests/AndroidManifest.xml
@@ -22,27 +22,7 @@
android:minSdkVersion="1"
android:targetSdkVersion="28" />
- <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>
+ <application android:testOnly="true" />
<instrumentation
android:name="androidx.test.runner.AndroidJUnitRunner"
diff --git a/services/tests/wmtests/AndroidTest.xml b/services/tests/wmtests/AndroidTest.xml
index 16e16dc75329..2717ef901216 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/wmtests/src/com/android/server/am/DummyAmTests.java b/services/tests/wmtests/src/com/android/server/am/DummyAmTests.java
new file mode 100644
index 000000000000..023e4ab6636f
--- /dev/null
+++ b/services/tests/wmtests/src/com/android/server/am/DummyAmTests.java
@@ -0,0 +1,46 @@
+/*
+ * 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/wmtests/src/com/android/server/wm/DummyWmTests.java b/services/tests/wmtests/src/com/android/server/wm/DummyWmTests.java
new file mode 100644
index 000000000000..aecb2783badd
--- /dev/null
+++ b/services/tests/wmtests/src/com/android/server/wm/DummyWmTests.java
@@ -0,0 +1,46 @@
+/*
+ * 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() {}
+}