use of com.xabber.android.utils.AppBlockCanaryContext in project xabber-android by redsolution.
the class Application method onCreate.
@Override
public void onCreate() {
super.onCreate();
if (BuildConfig.DEBUG) {
/**
* Leak Canary
*/
if (LeakCanary.isInAnalyzerProcess(this)) {
// You should not init your app in this process.
return;
}
LeakCanary.install(this);
/**
* Block Canary
*/
BlockCanary.install(this, new AppBlockCanaryContext()).start();
/**
* Android Dev Metrics
*/
AndroidDevMetrics.initWith(this);
/**
* Strict Mode
*/
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder().detectAll().penaltyLog().build());
}
/**
* Crashlytics
*/
// Set up Crashlytics, disabled for debug builds
Crashlytics crashlyticsKit = new Crashlytics.Builder().core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build()).build();
// Initialize Fabric with the debug-disabled crashlytics.
if (BuildConfig.USE_CRASHLYTICS) {
Fabric.with(this, crashlyticsKit);
}
Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
addManagers();
DatabaseManager.getInstance().addTables();
LogManager.i(this, "onCreate finished...");
}
Aggregations