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 --- .../dev/msfjarvis/aps/autofill/oreo/ui/AutofillSmsActivity.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/src/nonFree/java/dev') diff --git a/app/src/nonFree/java/dev/msfjarvis/aps/autofill/oreo/ui/AutofillSmsActivity.kt b/app/src/nonFree/java/dev/msfjarvis/aps/autofill/oreo/ui/AutofillSmsActivity.kt index 5e53bf3e..094c6c33 100644 --- a/app/src/nonFree/java/dev/msfjarvis/aps/autofill/oreo/ui/AutofillSmsActivity.kt +++ b/app/src/nonFree/java/dev/msfjarvis/aps/autofill/oreo/ui/AutofillSmsActivity.kt @@ -17,8 +17,6 @@ import android.view.autofill.AutofillManager import androidx.annotation.RequiresApi import androidx.appcompat.app.AppCompatActivity import androidx.lifecycle.lifecycleScope -import com.github.ajalt.timberkt.e -import com.github.ajalt.timberkt.w import com.github.androidpasswordstore.autofillparser.AutofillAction import com.github.androidpasswordstore.autofillparser.Credentials import com.github.michaelbull.result.onFailure @@ -39,6 +37,8 @@ import kotlin.coroutines.suspendCoroutine import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext +import logcat.LogPriority.WARN +import logcat.logcat suspend fun Task.suspendableAwait() = suspendCoroutine { cont -> @@ -62,14 +62,14 @@ class AutofillSmsActivity : AppCompatActivity() { val googleApiAvailabilityInstance = GoogleApiAvailability.getInstance() val googleApiStatus = googleApiAvailabilityInstance.isGooglePlayServicesAvailable(context) if (googleApiStatus != ConnectionResult.SUCCESS) { - w { + logcat(WARN) { "Google Play Services unavailable or not updated: ${googleApiAvailabilityInstance.getErrorString(googleApiStatus)}" } return false } // https://developer.android.com/guide/topics/text/autofill-services#sms-autofill if (googleApiAvailabilityInstance.getApkVersion(context) < 190056000) { - w { "Google Play Service 19.0.56 or higher required for SMS OTP Autofill" } + logcat(WARN) { "Google Play Service 19.0.56 or higher required for SMS OTP Autofill" } return false } return true @@ -103,7 +103,7 @@ class AutofillSmsActivity : AppCompatActivity() { clientState = intent?.getBundleExtra(AutofillManager.EXTRA_CLIENT_STATE) ?: run { - e { "AutofillSmsActivity started without EXTRA_CLIENT_STATE" } + logcat(WARN) { "AutofillSmsActivity started without EXTRA_CLIENT_STATE" } finish() return } -- cgit v1.2.3