summaryrefslogtreecommitdiff
path: root/tests/FlickerTests
diff options
context:
space:
mode:
author Uwais Ashraf <uwaisashraf@google.com> 2025-01-24 12:06:38 +0000
committer Uwais Ashraf <uwaisashraf@google.com> 2025-01-24 12:07:38 +0000
commitd2af9c0114925f486a1febdcb89b5d52c2c2b983 (patch)
tree5cd228061bb47f5aacb59d2df5a748e37361957d /tests/FlickerTests
parent0e8e667249d159c0f34cc747643ab3811b3bcb3f (diff)
Move RecentTasksUtils to a location that requires fewer dependencies.
Bug: 391577215 Flag: EXEMPT test-only change Test: Modified tests compile Change-Id: Ifad27c37061f16c3572f5f0eb928e11218691d6a
Diffstat (limited to 'tests/FlickerTests')
-rw-r--r--tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/RecentTasksUtils.kt27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/RecentTasksUtils.kt b/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/RecentTasksUtils.kt
new file mode 100644
index 000000000000..1a5fda7c8324
--- /dev/null
+++ b/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/RecentTasksUtils.kt
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2025 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.flicker.helpers
+
+import android.app.Instrumentation
+
+object RecentTasksUtils {
+ fun clearAllVisibleRecentTasks(instrumentation: Instrumentation) {
+ instrumentation.uiAutomation.executeShellCommand(
+ "dumpsys activity service SystemUIService WMShell recents clearAll"
+ )
+ }
+}