Index: testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusReporter.java |
diff --git a/testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusReporter.java b/testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusReporter.java |
index 1d887008bff9303f276550662d498db13b44e7a8..31da20e9442432635a73a8120ba037ff24a28a5a 100644 |
--- a/testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusReporter.java |
+++ b/testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusReporter.java |
@@ -6,6 +6,7 @@ package org.chromium.test.reporter; |
import android.content.Context; |
import android.content.Intent; |
+import android.util.Log; |
import org.chromium.base.ThreadUtils; |
@@ -28,6 +29,8 @@ public class TestStatusReporter { |
"org.chromium.test.reporter.TestStatusReporter.TEST_RUN_STARTED"; |
public static final String ACTION_TEST_RUN_FINISHED = |
"org.chromium.test.reporter.TestStatusReporter.TEST_RUN_FINISHED"; |
+ public static final String ACTION_UNCAUGHT_EXCEPTION = |
+ "org.chromium.test.reporter.TestStatusReporter.UNCAUGHT_EXCEPTION"; |
public static final String DATA_TYPE_HEARTBEAT = "org.chromium.test.reporter/heartbeat"; |
public static final String DATA_TYPE_RESULT = "org.chromium.test.reporter/result"; |
public static final String EXTRA_PID = |
@@ -107,6 +110,14 @@ public class TestStatusReporter { |
mContext.sendBroadcast(i); |
} |
+ public void uncaughtException(int pid, Throwable ex) { |
+ Intent i = new Intent(ACTION_UNCAUGHT_EXCEPTION); |
+ i.setType(DATA_TYPE_RESULT); |
+ i.putExtra(EXTRA_PID, pid); |
+ i.putExtra(EXTRA_STACK_TRACE, Log.getStackTraceString(ex)); |
+ mContext.sendBroadcast(i); |
+ } |
+ |
public void stopHeartbeat() { |
mKeepBeating.set(false); |
} |