From d46bf23e8adf8913846b304936d3196c9bffb852 Mon Sep 17 00:00:00 2001 From: Shawn Date: Fri, 6 Jan 2017 14:29:06 -0700 Subject: [PATCH] added isActivityThread message to callbackexception issue cuplv/TraceRunner#18 --- .../TraceRunnerRuntimeInstrumentation.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TraceRunnerRuntimeInstrumentation/tracerunnerinstrumentation/src/main/java/edu/colorado/plv/tracerunner_runtime_instrumentation/TraceRunnerRuntimeInstrumentation.java b/TraceRunnerRuntimeInstrumentation/tracerunnerinstrumentation/src/main/java/edu/colorado/plv/tracerunner_runtime_instrumentation/TraceRunnerRuntimeInstrumentation.java index f315e64..be72188 100644 --- a/TraceRunnerRuntimeInstrumentation/tracerunnerinstrumentation/src/main/java/edu/colorado/plv/tracerunner_runtime_instrumentation/TraceRunnerRuntimeInstrumentation.java +++ b/TraceRunnerRuntimeInstrumentation/tracerunnerinstrumentation/src/main/java/edu/colorado/plv/tracerunner_runtime_instrumentation/TraceRunnerRuntimeInstrumentation.java @@ -72,6 +72,7 @@ public static void logException(Throwable t, String signature, String methodName public static void logCallbackException(Throwable t, String signature, String methodName){ int id = count.getAndIncrement(); String message = t.getMessage(); + boolean isActivityThread = Looper.getMainLooper().getThread() == Thread.currentThread(); StackTraceElement[] stackTrace = t.getStackTrace(); String className = stackTrace[0].getClassName(); TraceMsgContainer.CallbackExceptionMsg.Builder builder @@ -98,6 +99,7 @@ public static void logCallbackException(Throwable t, String signature, String me .setMessageId(id) .setThreadId(Thread.currentThread().getId()) .setCallbackException(builder) + .setIsActivityThread(isActivityThread) .build(); TraceMsgContainer container = TraceMsgContainer.newBuilder().setMsg(msg).build(); executorService.execute(new LogDat(container));