Removed UncaughtExceptionHandler (doesn't work on Android).

This commit is contained in:
akwizgran
2013-04-12 10:42:08 +01:00
parent 398f752c34
commit 0715493028

View File

@@ -6,7 +6,6 @@ import static java.util.logging.Level.INFO;
import static java.util.logging.Level.WARNING;
import static net.sf.briar.android.widgets.CommonLayoutParams.MATCH_MATCH;
import java.lang.Thread.UncaughtExceptionHandler;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Executor;
@@ -71,17 +70,6 @@ public class HomeScreenActivity extends BriarActivity {
// The activity was launched from the splash screen
showButtons();
}
// Ensure uncaught exceptions thrown on worker threads kill the JVM
final UncaughtExceptionHandler handler =
Thread.getDefaultUncaughtExceptionHandler();
UncaughtExceptionHandler die = new UncaughtExceptionHandler() {
public void uncaughtException(Thread thread, Throwable throwable) {
handler.uncaughtException(thread, throwable);
if(LOG.isLoggable(INFO)) LOG.info("Exiting");
System.exit(0);
}
};
Thread.setDefaultUncaughtExceptionHandler(die);
// Start the service and bind to it
startService(new Intent(BriarService.class.getName()));
bindService(new Intent(BriarService.class.getName()),