fix webview wide viewport
This commit is contained in:
@ -3,9 +3,11 @@ package com.gh.gamecenter;
|
||||
import android.app.Application;
|
||||
|
||||
import com.facebook.stetho.Stetho;
|
||||
import com.facebook.stetho.okhttp3.StethoInterceptor;
|
||||
import com.squareup.leakcanary.LeakCanary;
|
||||
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.logging.HttpLoggingInterceptor;
|
||||
|
||||
/**
|
||||
* @author CsHeng
|
||||
@ -32,33 +34,11 @@ public class Injection {
|
||||
}
|
||||
|
||||
public static OkHttpClient.Builder provideRetrofitBuilder() {
|
||||
// HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(new HttpLoggingInterceptor.Logger() {
|
||||
//
|
||||
// @Override
|
||||
// public void log(String message) {
|
||||
// //分段打印retrofit日志
|
||||
// if (message.startsWith("{") || message.startsWith("["))
|
||||
// if (message.length() > 4000) {
|
||||
// for (int i = 0; i < message.length(); i += 4000) {
|
||||
// if (i + 4000 < message.length())
|
||||
// Utils.log("OkHttp_Body::" + i, message.substring(i, i + 4000));
|
||||
// else
|
||||
// Utils.log("OkHttp_Body::" + i, message.substring(i, message.length()));
|
||||
// }
|
||||
// } else
|
||||
// Utils.log("OkHttp_Body::", message);
|
||||
// }
|
||||
// });
|
||||
// loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
|
||||
|
||||
OkHttpClient.Builder builder = new OkHttpClient.Builder();
|
||||
// HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
|
||||
// interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
|
||||
// builder.addNetworkInterceptor(interceptor);
|
||||
// builder.addNetworkInterceptor(new StethoInterceptor());
|
||||
// if (BuildConfig.DEBUG) {
|
||||
// builder.addNetworkInterceptor(loggingInterceptor);
|
||||
// }
|
||||
HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
|
||||
interceptor.setLevel(HttpLoggingInterceptor.Level.HEADERS);
|
||||
builder.addNetworkInterceptor(interceptor);
|
||||
builder.addNetworkInterceptor(new StethoInterceptor());
|
||||
return builder;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user