package com.denis.home.yandexmobilization;

import android.app.Application;

import com.facebook.stetho.Stetho;
import com.squareup.picasso.Picasso;

/**
 * Created by Denis on 20.04.2016.
 */
public class MyApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        Stetho.initializeWithDefaults(this);
        Picasso.with(this).setIndicatorsEnabled(true);
    }
}

@@ -64,24 +64,92 @@
 Application;
+%0Aimport android.net.http.HttpResponseCache;%0Aimport android.util.Log;
 %0A%0Aimport com
@@ -211,16 +211,66 @@
 casso;%0A%0A
+import java.io.File;%0Aimport java.io.IOException;%0A%0A
 /**%0A * C
@@ -353,16 +353,92 @@
 ation %7B%0A
+    private static final String TAG = MyApplication.class.getSimpleName();%0A%0A
     @Ove
@@ -498,16 +498,71 @@
 eate();%0A
+%0A        if (BuildConfig.FLAVOR.equals(%22devel%22)) %7B%0A    
         
@@ -606,16 +606,20 @@
         
+    
 Picasso.
@@ -657,16 +657,522 @@
 (true);%0A
+        %7D%0A%0A        try %7B%0A            File httpCacheDir = new File(getCacheDir(), %22http%22);%0A            long httpCacheSize = 10 * 1024 * 1024; // 10 MiB%0A            HttpResponseCache.install(httpCacheDir, httpCacheSize);%0A        %7D catch (IOException e) %7B%0A            Log.d(TAG, %22HTTP response cache installation failed:%22 + e);%0A        %7D%0A    %7D%0A%0A    protected void onStop() %7B%0A        HttpResponseCache cache = HttpResponseCache.getInstalled();%0A        if (cache != null) %7B%0A            cache.flush();%0A        %7D%0A
     %7D%0A%7D%0A

enable basic http cache, use Stetho and Picasso indicators only in devel flavor