package com.github.ayltai.newspaper;

import android.app.Application;

import com.facebook.common.logging.FLog;
import com.facebook.stetho.Stetho;
import com.github.ayltai.newspaper.util.TestUtils;
import com.squareup.leakcanary.LeakCanary;

public abstract class BaseApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();

        if (!TestUtils.isRunningUnitTest() && !TestUtils.isRunningInstrumentalTest()) {
            if (!LeakCanary.isInAnalyzerProcess(this)) LeakCanary.install(this);

            FLog.setMinimumLoggingLevel(FLog.WARN);
            Stetho.initializeWithDefaults(this);
        }
    }
}

@@ -62,16 +62,46 @@
 ication;
+%0Aimport android.os.StrictMode;
 %0A%0Aimport
@@ -479,24 +479,514 @@
 alTest()) %7B%0A
+            StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()%0A                .detectCustomSlowCalls()%0A                .detectNetwork()%0A                .penaltyLog()%0A                .penaltyDeath()%0A                .build());%0A%0A            StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()%0A                .detectActivityLeaks()%0A                .detectLeakedRegistrationObjects()%0A                .penaltyLog()%0A                .penaltyDeath()%0A                .build());%0A%0A
             

Enable StrictMode in debug build