From 6030b00ee24cd6a1b79cf1828d098f9e3c39d70d Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Wed, 3 Jun 2020 01:28:50 -0700 Subject: [PATCH] Remove excessive logging --- app/src/main/java/com/topjohnwu/magisk/core/App.kt | 1 - .../java/com/topjohnwu/magisk/di/NetworkingModule.kt | 12 ++++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/core/App.kt b/app/src/main/java/com/topjohnwu/magisk/core/App.kt index 394c54f9d..16cf4fba6 100644 --- a/app/src/main/java/com/topjohnwu/magisk/core/App.kt +++ b/app/src/main/java/com/topjohnwu/magisk/core/App.kt @@ -31,7 +31,6 @@ open class App() : Application() { init { AppCompatDelegate.setCompatVectorFromResourcesEnabled(true) Shell.Config.setFlags(Shell.FLAG_MOUNT_MASTER) - Shell.Config.verboseLogging(BuildConfig.DEBUG) Shell.Config.addInitializers(RootInit::class.java) Shell.Config.setTimeout(2) FileProvider.callHandler = SuCallbackHandler diff --git a/app/src/main/java/com/topjohnwu/magisk/di/NetworkingModule.kt b/app/src/main/java/com/topjohnwu/magisk/di/NetworkingModule.kt index 37a255666..62ab2dd24 100644 --- a/app/src/main/java/com/topjohnwu/magisk/di/NetworkingModule.kt +++ b/app/src/main/java/com/topjohnwu/magisk/di/NetworkingModule.kt @@ -2,7 +2,6 @@ package com.topjohnwu.magisk.di import android.content.Context import com.squareup.moshi.Moshi -import com.topjohnwu.magisk.BuildConfig import com.topjohnwu.magisk.core.Const import com.topjohnwu.magisk.data.network.GithubApiServices import com.topjohnwu.magisk.data.network.GithubRawServices @@ -16,7 +15,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.adapter.rxjava2.RxJava2CallAdapterFactory @@ -36,12 +34,10 @@ val networkingModule = module { fun createOkHttpClient(context: Context): OkHttpClient { val builder = OkHttpClient.Builder() - if (BuildConfig.DEBUG) { - 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)) { builder.sslSocketFactory(NoSSLv3SocketFactory())