Search in sources :

Example 1 with SettingsDataProvider

use of com.google.firebase.crashlytics.internal.settings.SettingsDataProvider in project GreenHouse by utsanjan.

the class CrashlyticsController method enableExceptionHandling.

/* JADX INFO: Access modifiers changed from: package-private */
public void enableExceptionHandling(Thread.UncaughtExceptionHandler defaultHandler, SettingsDataProvider settingsProvider) {
    openSession();
    CrashlyticsUncaughtExceptionHandler.CrashListener crashListener = new // from class: com.google.firebase.crashlytics.internal.common.CrashlyticsController.5
    CrashlyticsUncaughtExceptionHandler.CrashListener() {

        // com.google.firebase.crashlytics.internal.common.CrashlyticsUncaughtExceptionHandler.CrashListener
        @Override
        public void onUncaughtException(SettingsDataProvider settingsDataProvider, Thread thread, Throwable ex) {
            CrashlyticsController.this.handleUncaughtException(settingsDataProvider, thread, ex);
        }
    };
    CrashlyticsUncaughtExceptionHandler crashlyticsUncaughtExceptionHandler = new CrashlyticsUncaughtExceptionHandler(crashListener, settingsProvider, defaultHandler);
    this.crashHandler = crashlyticsUncaughtExceptionHandler;
    Thread.setDefaultUncaughtExceptionHandler(crashlyticsUncaughtExceptionHandler);
}
Also used : CrashlyticsUncaughtExceptionHandler(com.google.firebase.crashlytics.internal.common.CrashlyticsUncaughtExceptionHandler) SettingsDataProvider(com.google.firebase.crashlytics.internal.settings.SettingsDataProvider) Thread(java.lang.Thread)

Example 2 with SettingsDataProvider

use of com.google.firebase.crashlytics.internal.settings.SettingsDataProvider in project firebase-android-sdk by firebase.

the class CrashlyticsReportPersistenceTest method getSettingsMock.

private static SettingsDataProvider getSettingsMock(int maxCompleteSessionsCount, int maxCustomExceptionEvents) {
    SettingsDataProvider settingsDataProvider = mock(SettingsDataProvider.class);
    Settings settingsMock = mock(Settings.class);
    SessionSettingsData sessionSettingsDataMock = new SessionSettingsData(maxCustomExceptionEvents, maxCompleteSessionsCount);
    when(settingsMock.getSessionData()).thenReturn(sessionSettingsDataMock);
    when(settingsDataProvider.getSettings()).thenReturn(settingsMock);
    return settingsDataProvider;
}
Also used : SessionSettingsData(com.google.firebase.crashlytics.internal.settings.model.SessionSettingsData) SettingsDataProvider(com.google.firebase.crashlytics.internal.settings.SettingsDataProvider) Settings(com.google.firebase.crashlytics.internal.settings.model.Settings)

Aggregations

SettingsDataProvider (com.google.firebase.crashlytics.internal.settings.SettingsDataProvider)2 CrashlyticsUncaughtExceptionHandler (com.google.firebase.crashlytics.internal.common.CrashlyticsUncaughtExceptionHandler)1 SessionSettingsData (com.google.firebase.crashlytics.internal.settings.model.SessionSettingsData)1 Settings (com.google.firebase.crashlytics.internal.settings.model.Settings)1 Thread (java.lang.Thread)1