Merge "Add package names to the QuickstepPressureRule's error message."
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 26aae27..a1ba34b 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 @@
         // 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);