summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2022-02-09 03:48:11 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2022-02-09 03:48:11 +0000
commit9b8e3a7efe7e68be1602c7206578855e954d848f (patch)
tree64aa243b893e4094db0b9f816c96209f614d3154
parenta7d82faa77376ea8f82da4f6c8c5e9c4f77ad618 (diff)
parentdd11a48672b3dd0cf978064d832de8095f205eae (diff)
downloadplatform_testing-android-s-v2-beta-3.tar.gz
Merge "Add package names to the QuickstepPressureRule's error message."android-s-v2-beta-3android-s-qpr3-beta-1android-s-v2-beta-3android-s-qpr3-beta-1
-rw-r--r--libraries/health/rules/src/android/platform/test/rule/QuickstepPressureRule.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/libraries/health/rules/src/android/platform/test/rule/QuickstepPressureRule.java b/libraries/health/rules/src/android/platform/test/rule/QuickstepPressureRule.java
index 26aae2726..a1ba34be9 100644
--- a/libraries/health/rules/src/android/platform/test/rule/QuickstepPressureRule.java
+++ b/libraries/health/rules/src/android/platform/test/rule/QuickstepPressureRule.java
@@ -55,7 +55,8 @@ public class QuickstepPressureRule extends TestWatcher {
// Open the application and ensure it reaches the foreground.
getContext().startActivity(getContext().getPackageManager().getLaunchIntentForPackage(pkg));
if (!getUiDevice().wait(Until.hasObject(By.pkg(pkg).depth(0)), UI_RESPONSE_TIMEOUT_MSECS)) {
- throw new RuntimeException("Application not found in foreground.");
+ throw new RuntimeException(
+ String.format("Application not found in foreground (package = %s).", pkg));
}
// Ensure the app doesn't immediately crash in the foreground.
SystemClock.sleep(MIN_CRASH_WAIT_TIMEOUT);