1、takingdata升级,精简无用的组件,480kb->220kb

2、数据统计部分整理,切勿更改数据统计和错误上报任何顺序
3、依赖整理
This commit is contained in:
CsHeng
2017-09-08 11:58:56 +08:00
parent 4de5593802
commit f552a06bd7
27 changed files with 263 additions and 654 deletions

View File

@ -2,6 +2,7 @@ package com.gh.gamecenter;
import android.app.Application;
import com.facebook.stetho.Stetho;
import com.facebook.stetho.okhttp3.StethoInterceptor;
import com.squareup.leakcanary.LeakCanary;
@ -17,20 +18,25 @@ import okhttp3.logging.HttpLoggingInterceptor;
public class Injection {
public static boolean appInit(Application application) {
// init leakcanary
if (LeakCanary.isInAnalyzerProcess(application)) {
// This process is dedicated to LeakCanary for heap analysis.
// You should not init your app in this process.
return false;
}
LeakCanary.install(application);
// Normal app init code...
// init stetho
Stetho.initializeWithDefaults(application);
return true;
}
public static OkHttpClient.Builder provideRetrofitBuilder() {
OkHttpClient.Builder builder = new OkHttpClient.Builder();
HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
interceptor.setLevel(HttpLoggingInterceptor.Level.BASIC);
builder.addNetworkInterceptor(interceptor);
builder.addNetworkInterceptor(new StethoInterceptor());
return builder;