package com.gh.gamecenter;

import android.app.Application;


import com.gh.gamecenter.mock.MockConfig;

import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;

/**
 * @author CsHeng
 * @Date 03/09/2017
 * @Time 4:34 PM
 */

public class Injection {

    public static boolean appInit(Application application) {
        // 监控Bundle大小,预防溢出(需要调试的时候再开启吧!)
//        TooLargeTool.startLogging(application);
        return true;
    }

    public static OkHttpClient.Builder provideRetrofitBuilder() {
        OkHttpClient.Builder builder = new OkHttpClient.Builder();
        HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
        interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
        builder.addNetworkInterceptor(interceptor);
        MockConfig.addBuilderMock(builder);
        return builder;
    }


}
