use of com.nextcloud.client.errorhandling.ExceptionHandler in project android by nextcloud.
the class MainApp method attachBaseContext.
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
initGlobalContext(this);
DaggerAppComponent.builder().application(this).build().inject(this);
// we don't want to handle crashes occurring inside crash reporter activity/process;
// let the platform deal with those
final boolean isCrashReportingProcess = getAppProcessName().endsWith(":crash");
if (!isCrashReportingProcess) {
Thread.UncaughtExceptionHandler defaultPlatformHandler = Thread.getDefaultUncaughtExceptionHandler();
final ExceptionHandler crashReporter = new ExceptionHandler(this, defaultPlatformHandler);
Thread.setDefaultUncaughtExceptionHandler(crashReporter);
}
}
Aggregations