From 2cef6a5bb4cb4afb1b1f1b704f83c1565e441825 Mon Sep 17 00:00:00 2001 From: "(´⌣`ʃƪ)" Date: Sun, 3 Oct 2021 01:32:15 -0700 Subject: Replace Timber with logcat (#1509) * Replace Timber with logcat (#1505) * Add extension for asLog which takes a message param Co-authored-by: Aditya Wasan --- .../main/java/dev/msfjarvis/aps/ui/crypto/GetKeyIdsActivity.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'app/src/main/java/dev/msfjarvis/aps/ui/crypto/GetKeyIdsActivity.kt') diff --git a/app/src/main/java/dev/msfjarvis/aps/ui/crypto/GetKeyIdsActivity.kt b/app/src/main/java/dev/msfjarvis/aps/ui/crypto/GetKeyIdsActivity.kt index c98ea877..b24868c9 100644 --- a/app/src/main/java/dev/msfjarvis/aps/ui/crypto/GetKeyIdsActivity.kt +++ b/app/src/main/java/dev/msfjarvis/aps/ui/crypto/GetKeyIdsActivity.kt @@ -10,12 +10,14 @@ import android.os.Bundle import androidx.activity.result.IntentSenderRequest import androidx.activity.result.contract.ActivityResultContracts.StartIntentSenderForResult import androidx.lifecycle.lifecycleScope -import com.github.ajalt.timberkt.e import com.github.michaelbull.result.onFailure import com.github.michaelbull.result.runCatching import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext +import logcat.LogPriority.ERROR +import logcat.asLog +import logcat.logcat import me.msfjarvis.openpgpktx.util.OpenPgpApi import me.msfjarvis.openpgpktx.util.OpenPgpUtils import org.openintents.openpgp.IOpenPgpService2 @@ -43,7 +45,7 @@ class GetKeyIdsActivity : BasePgpActivity() { } override fun onError(e: Exception) { - e(e) + logcat(ERROR) { e.asLog() } } /** Get the Key ids from OpenKeychain */ @@ -63,7 +65,7 @@ class GetKeyIdsActivity : BasePgpActivity() { setResult(RESULT_OK, keyResult) finish() } - .onFailure { e -> e(e) } + .onFailure { e -> logcat(ERROR) { e.asLog() } } } OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED -> { val sender = getUserInteractionRequestIntent(result) -- cgit v1.2.3