// Path: drodrolib/src/main/java/org/michenux/drodrolib/MCXApplication.java
// public class MCXApplication extends MultiDexApplication {
//     public static final String LOG_TAG = "MCX";
// 
//     private ObjectGraph objectGraph;
// 
//     public void inject(Activity activity) {
//         getObjectGraph().inject(activity);
//     }
// 
//     public void inject(ContentProvider contentProvider) {
//         getObjectGraph().inject(contentProvider);
//     }
// 
//     public void inject(Fragment fragment) {
//         getObjectGraph().inject(fragment);
//     }
// 
//     public void inject(AbstractThreadedSyncAdapter fragment) {
//         getObjectGraph().inject(fragment);
//     }
// 
//     public void injectSelf() {
//         getObjectGraph().inject(this);
//     }
// 
//     public synchronized ObjectGraph getObjectGraph() {
//         if (objectGraph == null) {
//             List<Object> modules = new ArrayList<>();
//             buildDaggerModules(modules);
//             this.objectGraph = ObjectGraph.create(modules.toArray());
//             onObjectGraphCreated(this.objectGraph);
//         }
//         return objectGraph;
//     }
// 
//     public void buildDaggerModules(List<Object> modules) {
//         modules.add(new MCXModule());
//     }
// 
//     public void onObjectGraphCreated(ObjectGraph objectGraph) {
//     }
// 
//     public static MCXApplication getRealApplication(Context applicationContext) {
//         MCXApplication application = null;
// 
//         if (applicationContext instanceof MCXApplication) {
//             application = (MCXApplication) applicationContext;
//         } else {
//             Application realApplication = null;
//             Field magicField = null;
//             try {
//                 magicField = applicationContext.getClass().getDeclaredField("realApplication");
//                 magicField.setAccessible(true);
//                 realApplication = (Application) magicField.get(applicationContext);
//             } catch (NoSuchFieldException e) {
//                 Log.e(LOG_TAG, e.getMessage(), e);
//             } catch (IllegalAccessException e) {
//                 Log.e(LOG_TAG, e.getMessage(), e);
//             }
// 
//             application = (MCXApplication) realApplication;
//         }
// 
//         return application;
//     }
// }


import android.util.Log;
import org.michenux.drodrolib.BuildConfig;
import org.michenux.drodrolib.MCXApplication;
import java.io.IOException;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;
package org.michenux.drodrolib.network.okhttp;





public class LoggingInterceptor implements Interceptor {
    @Override
    public Response intercept(Chain chain) throws IOException {
        Request request = chain.request();
        long t1 = System.nanoTime();

        String url = request.url().toString();

        if (BuildConfig.DEBUG) {
            Log.d(MCXApplication.LOG_TAG, String.format("Sending request %s on %s%n%s",
                    url, chain.connection(), request.headers()));
        }

        Response response = chain.proceed(request);

        long t2 = System.nanoTime();

        if (BuildConfig.DEBUG) {
// Path: drodrolib/src/main/java/org/michenux/drodrolib/MCXApplication.java
// public class MCXApplication extends MultiDexApplication {
//     public static final String LOG_TAG = "MCX";
// 
//     private ObjectGraph objectGraph;
// 
//     public void inject(Activity activity) {
//         getObjectGraph().inject(activity);
//     }
// 
//     public void inject(ContentProvider contentProvider) {
//         getObjectGraph().inject(contentProvider);
//     }
// 
//     public void inject(Fragment fragment) {
//         getObjectGraph().inject(fragment);
//     }
// 
//     public void inject(AbstractThreadedSyncAdapter fragment) {
//         getObjectGraph().inject(fragment);
//     }
// 
//     public void injectSelf() {
//         getObjectGraph().inject(this);
//     }
// 
//     public synchronized ObjectGraph getObjectGraph() {
//         if (objectGraph == null) {
//             List<Object> modules = new ArrayList<>();
//             buildDaggerModules(modules);
//             this.objectGraph = ObjectGraph.create(modules.toArray());
//             onObjectGraphCreated(this.objectGraph);
//         }
//         return objectGraph;
//     }
// 
//     public void buildDaggerModules(List<Object> modules) {
//         modules.add(new MCXModule());
//     }
// 
//     public void onObjectGraphCreated(ObjectGraph objectGraph) {
//     }
// 
//     public static MCXApplication getRealApplication(Context applicationContext) {
//         MCXApplication application = null;
// 
//         if (applicationContext instanceof MCXApplication) {
//             application = (MCXApplication) applicationContext;
//         } else {
//             Application realApplication = null;
//             Field magicField = null;
//             try {
//                 magicField = applicationContext.getClass().getDeclaredField("realApplication");
//                 magicField.setAccessible(true);
//                 realApplication = (Application) magicField.get(applicationContext);
//             } catch (NoSuchFieldException e) {
//                 Log.e(LOG_TAG, e.getMessage(), e);
//             } catch (IllegalAccessException e) {
//                 Log.e(LOG_TAG, e.getMessage(), e);
//             }
// 
//             application = (MCXApplication) realApplication;
//         }
// 
//         return application;
//     }
// }


// Path: drodrolib/src/main/java/org/michenux/drodrolib/network/okhttp/LoggingInterceptor.java
import android.util.Log;
import org.michenux.drodrolib.BuildConfig;
import org.michenux.drodrolib.MCXApplication;
import java.io.IOException;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;

package org.michenux.drodrolib.network.okhttp;





public class LoggingInterceptor implements Interceptor {
    @Override
    public Response intercept(Chain chain) throws IOException {
        Request request = chain.request();
        long t1 = System.nanoTime();

        String url = request.url().toString();

        if (BuildConfig.DEBUG) {
            Log.d(MCXApplication.LOG_TAG, String.format("Sending request %s on %s%n%s",
                    url, chain.connection(), request.headers()));
        }

        Response response = chain.proceed(request);

        long t2 = System.nanoTime();

        if (BuildConfig.DEBUG) {
            Log.d(MCXApplication.LOG_TAG, String.format("Received response for %s in %.1fms%n%s",