package com.soutvoid.gamesproject.app;

import android.app.Application;
import android.support.multidex.MultiDex;
import android.support.v7.app.AppCompatDelegate;

import com.crashlytics.android.Crashlytics;
import com.crashlytics.android.core.BuildConfig;
import com.crashlytics.android.core.CrashlyticsCore;
import com.github.anrwatchdog.ANRWatchDog;
import com.soutvoid.gamesproject.app.dagger.AppComponent;
import com.soutvoid.gamesproject.app.dagger.AppModule;
import com.soutvoid.gamesproject.app.dagger.DaggerAppComponent;
import com.soutvoid.gamesproject.app.log.RemoteLogger;

import io.fabric.sdk.android.Fabric;
import io.fabric.sdk.android.Kit;

/**
 * Created by andrew on 2/20/17.
 */

public class App extends Application {

    private AppComponent appComponent;

    @Override
    public void onCreate() {
        MultiDex.install(getApplicationContext());
        super.onCreate();
        AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
    }

    private void initAnrWatchDog() {
        new ANRWatchDog().setReportMainThreadOnly().setANRListener(RemoteLogger::logError).start();
    }

    private void initFabric() {
        final Kit[] kits = {
                new Crashlytics.Builder().core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build()).build()
        };
        Fabric.with(this, kits);
    }

    private void initInjector() {
        appComponent = DaggerAppComponent.builder()
                .appModule(new AppModule(this))
                .build();
    }

    public AppComponent getAppComponent() {
        return this.appComponent;
    }
}

@@ -515,32 +515,81 @@
 erAppComponent;%0A
+import com.soutvoid.gamesproject.app.log.Logger;%0A
 import com.soutv
@@ -627,16 +627,16 @@
 Logger;%0A
-
 %0Aimport 
@@ -698,16 +698,106 @@
 oid.Kit;
+%0Aimport soutvoid.com.gamesproject.R;%0Aimport uk.co.chrisjenx.calligraphy.CalligraphyConfig;
 %0A%0A/**%0A *
@@ -1101,16 +1101,135 @@
 (true);%0A
+        initFabric();%0A        initAnrWatchDog();%0A        initInjector();%0A        initLog();%0A        initCalligraphy();%0A
     %7D%0A%0A 
@@ -1739,16 +1739,16 @@
 (this))%0A
-
         
@@ -1768,24 +1768,336 @@
 d();%0A    %7D%0A%0A
+    private void initLog() %7B%0A        Logger.init();%0A    %7D%0A%0A    private void initCalligraphy() %7B%0A        CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()%0A                .setDefaultFontPath(%22fonts/Roboto-Regular.ttf%22)%0A                .setFontAttrId(R.attr.fontPath)%0A                .build());%0A    %7D%0A%0A
     public A

добавлены шрифты. добавлены инициализации сервисов