Remove CrashReporter handlers

Summary: This diff removes the custom global exception handler which was being used to send crash notifications. Removing it in the favour of next diff, where we detect crash by looking at Logcat

Reviewed By: passy

Differential Revision: D13590049

fbshipit-source-id: 2914d51b2c5f33c1cade4926dbbf72c041047c71
This commit is contained in:
Pritesh Nandgaonkar
2019-01-09 10:40:21 -08:00
committed by Facebook Github Bot
parent 422ab99d29
commit c6efea991d

View File

@@ -40,19 +40,8 @@ public class CrashReporterPlugin implements FlipperPlugin {
@Override @Override
public void onConnect(FlipperConnection connection) { public void onConnect(FlipperConnection connection) {
mConnection = connection; mConnection = connection;
prevHandler = Thread.getDefaultUncaughtExceptionHandler();
Thread.setDefaultUncaughtExceptionHandler(
new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread paramThread, Throwable paramThrowable) {
sendExceptionMessage(paramThread, paramThrowable);
if (prevHandler != null) {
prevHandler.uncaughtException(paramThread, paramThrowable);
}
}
});
} }
// This function is called from Litho's error boundary.
public void sendExceptionMessage(Thread paramThread, Throwable paramThrowable) { public void sendExceptionMessage(Thread paramThread, Throwable paramThrowable) {
if (mConnection != null) { if (mConnection != null) {
FlipperConnection connection = mConnection; FlipperConnection connection = mConnection;
@@ -77,7 +66,6 @@ public class CrashReporterPlugin implements FlipperPlugin {
@Override @Override
public void onDisconnect() { public void onDisconnect() {
mConnection = null; mConnection = null;
Thread.setDefaultUncaughtExceptionHandler(prevHandler);
} }
@Override @Override