Disable LoggingInterceptor

This commit is contained in:
topjohnwu 2020-10-07 04:01:50 -07:00
parent 4e272b70ef
commit f0f1cdc501

View File

@ -20,7 +20,6 @@ import okhttp3.Dns
import okhttp3.HttpUrl
import okhttp3.OkHttpClient
import okhttp3.dnsoverhttps.DnsOverHttps
import okhttp3.logging.HttpLoggingInterceptor
import org.koin.dsl.module
import retrofit2.Retrofit
import retrofit2.converter.moshi.MoshiConverterFactory
@ -78,10 +77,10 @@ private class DnsResolver(client: OkHttpClient) : Dns {
fun createOkHttpClient(context: Context): OkHttpClient {
val builder = OkHttpClient.Builder()
val httpLoggingInterceptor = HttpLoggingInterceptor().apply {
level = HttpLoggingInterceptor.Level.HEADERS
}
builder.addInterceptor(httpLoggingInterceptor)
// val httpLoggingInterceptor = HttpLoggingInterceptor().apply {
// level = HttpLoggingInterceptor.Level.HEADERS
// }
// builder.addInterceptor(httpLoggingInterceptor)
if (!Networking.init(context)) {
Info.hasGMS = false