Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import com.flowcrypt.email.security.model.PgpKeyRingDetails
import com.flowcrypt.email.security.pgp.PgpKey
import com.flowcrypt.email.ui.notifications.ErrorNotificationManager
import com.flowcrypt.email.util.FlavorSettings
import com.flowcrypt.email.util.GeneralUtil
import com.flowcrypt.email.util.exception.CommonConnectionException
import com.flowcrypt.email.util.exception.ExceptionUtil
import com.flowcrypt.email.util.exception.GmailAPIException
Expand Down Expand Up @@ -198,9 +199,11 @@ class GmailApiHelper {
val credential = generateGoogleAccountCredential(context, account)

val transport = NetHttpTransport()
Logger.getLogger(HttpTransport::class.java.name).apply {
level = Level.CONFIG
addHandler(object : ConsoleHandler() {}.apply { level = Level.CONFIG })
if (GeneralUtil.isDebugBuild() && EmailUtil.hasEnabledDebug(context)) {
Logger.getLogger(HttpTransport::class.java.name).apply {
level = Level.CONFIG
addHandler(object : ConsoleHandler() {}.apply { level = Level.CONFIG })
}
}

val factory = GsonFactory.getDefaultInstance()
Expand Down