commit | 94db2b112202143a4d9ed0494f6317f0672e0de3 | [log] [tgz] |
---|---|---|
author | TreeHugger Robot <treehugger-gerrit@google.com> | Fri Jul 23 04:03:25 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Fri Jul 23 04:03:25 2021 +0000 |
tree | 8d6e6561159d1ec9cc8728ae88cedb28e7b3b70f | |
parent | 4a13e713a13e1f81c095d939931d6a2e5d08bfd2 [diff] | |
parent | ec4be03dd34fd8e639684b0be905ae454a01b963 [diff] |
Merge "Improving diags when Launcher is invisible when the test fails" into sc-v2-dev am: ec4be03dd3 Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15352430 Change-Id: I861fe20f96d3da2565441b698ac07562665fce94
diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index 1f64131..5cd03e4 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
@@ -406,12 +406,15 @@ } private String getVisiblePackages() { - return mDevice.findObjects(getAnyObjectSelector()) + final String apps = mDevice.findObjects(getAnyObjectSelector()) .stream() .map(LauncherInstrumentation::getApplicationPackageSafe) .distinct() - .filter(pkg -> pkg != null && !"com.android.systemui".equals(pkg)) + .filter(pkg -> pkg != null && !SYSTEMUI_PACKAGE.equals(pkg)) .collect(Collectors.joining(", ")); + return !apps.isEmpty() + ? "active app: " + apps + : "the test doesn't see views from any app, including Launcher"; } private static String getApplicationPackageSafe(UiObject2 object) {