mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 22:59:54 +01:00
Removed UncaughtExceptionHandler (doesn't work on Android).
This commit is contained in:
@@ -6,7 +6,6 @@ import static java.util.logging.Level.INFO;
|
|||||||
import static java.util.logging.Level.WARNING;
|
import static java.util.logging.Level.WARNING;
|
||||||
import static net.sf.briar.android.widgets.CommonLayoutParams.MATCH_MATCH;
|
import static net.sf.briar.android.widgets.CommonLayoutParams.MATCH_MATCH;
|
||||||
|
|
||||||
import java.lang.Thread.UncaughtExceptionHandler;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.Executor;
|
import java.util.concurrent.Executor;
|
||||||
@@ -71,17 +70,6 @@ public class HomeScreenActivity extends BriarActivity {
|
|||||||
// The activity was launched from the splash screen
|
// The activity was launched from the splash screen
|
||||||
showButtons();
|
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
|
// Start the service and bind to it
|
||||||
startService(new Intent(BriarService.class.getName()));
|
startService(new Intent(BriarService.class.getName()));
|
||||||
bindService(new Intent(BriarService.class.getName()),
|
bindService(new Intent(BriarService.class.getName()),
|
||||||
|
|||||||
Reference in New Issue
Block a user