Search in sources :

Example 1 with Onboarding

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

the class FirebaseCrashlytics method init.

/* JADX INFO: Access modifiers changed from: package-private */
public static FirebaseCrashlytics init(FirebaseApp app, FirebaseInstanceIdInternal instanceId, CrashlyticsNativeComponent nativeComponent, AnalyticsConnector analyticsConnector) {
    CrashlyticsNativeComponent nativeComponent2;
    Context context = app.getApplicationContext();
    String appIdentifier = context.getPackageName();
    IdManager idManager = new IdManager(context, appIdentifier, instanceId);
    DataCollectionArbiter arbiter = new DataCollectionArbiter(app);
    if (nativeComponent == null) {
        nativeComponent2 = new MissingNativeComponent();
    } else {
        nativeComponent2 = nativeComponent;
    }
    final Onboarding onboarding = new Onboarding(app, context, idManager, arbiter);
    final CrashlyticsCore core = new CrashlyticsCore(app, idManager, nativeComponent2, arbiter, analyticsConnector);
    if (!onboarding.onPreExecute()) {
        Logger.getLogger().e("Unable to start Crashlytics.");
        return null;
    }
    final ExecutorService threadPoolExecutor = ExecutorUtils.buildSingleThreadExecutorService("com.google.firebase.crashlytics.startup");
    final SettingsController settingsController = onboarding.retrieveSettingsData(context, app, threadPoolExecutor);
    final boolean finishCoreInBackground = core.onPreExecute(settingsController);
    Tasks.call(threadPoolExecutor, new // from class: com.google.firebase.crashlytics.FirebaseCrashlytics.1
    Callable<Void>() {

        // java.util.concurrent.Callable
        @Override
        public Void call() throws Exception {
            Onboarding.this.doOnboarding(threadPoolExecutor, settingsController);
            if (!finishCoreInBackground) {
                return null;
            }
            core.doBackgroundInitializationAsync(settingsController);
            return null;
        }
    });
    return new FirebaseCrashlytics(core);
}
Also used : Context(android.content.Context) CrashlyticsCore(com.google.firebase.crashlytics.internal.common.CrashlyticsCore) IdManager(com.google.firebase.crashlytics.internal.common.IdManager) DataCollectionArbiter(com.google.firebase.crashlytics.internal.common.DataCollectionArbiter) CrashlyticsNativeComponent(com.google.firebase.crashlytics.internal.CrashlyticsNativeComponent) Onboarding(com.google.firebase.crashlytics.internal.Onboarding) ExecutorService(java.util.concurrent.ExecutorService) MissingNativeComponent(com.google.firebase.crashlytics.internal.MissingNativeComponent) SettingsController(com.google.firebase.crashlytics.internal.settings.SettingsController)

Aggregations

Context (android.content.Context)1 CrashlyticsNativeComponent (com.google.firebase.crashlytics.internal.CrashlyticsNativeComponent)1 MissingNativeComponent (com.google.firebase.crashlytics.internal.MissingNativeComponent)1 Onboarding (com.google.firebase.crashlytics.internal.Onboarding)1 CrashlyticsCore (com.google.firebase.crashlytics.internal.common.CrashlyticsCore)1 DataCollectionArbiter (com.google.firebase.crashlytics.internal.common.DataCollectionArbiter)1 IdManager (com.google.firebase.crashlytics.internal.common.IdManager)1 SettingsController (com.google.firebase.crashlytics.internal.settings.SettingsController)1 ExecutorService (java.util.concurrent.ExecutorService)1