diff options
| author | Harsh Shandilya <me@msfjarvis.dev> | 2020-04-21 13:30:42 +0530 |
|---|---|---|
| committer | Harsh Shandilya <me@msfjarvis.dev> | 2020-04-21 15:55:26 +0530 |
| commit | 500ab609737c9f297962ed6a1cd935a27f39517d (patch) | |
| tree | 56e93788cbc350b3f3bcaf27686ddb25c1faa7d1 /app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.kt | |
| parent | 72166c6912ea596e5087e553c64bfc5dd9ed3742 (diff) | |
| download | HardenedPass-500ab609737c9f297962ed6a1cd935a27f39517d.tar.gz HardenedPass-500ab609737c9f297962ed6a1cd935a27f39517d.zip | |
treewide: switch to logging via timberkt
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.kt')
| -rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.kt | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.kt b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.kt index 2d9eb813..7a2cc521 100644 --- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.kt +++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.kt @@ -24,6 +24,9 @@ import android.widget.Toast import androidx.appcompat.app.AlertDialog import androidx.core.os.bundleOf import androidx.preference.PreferenceManager +import com.github.ajalt.timberkt.Timber.tag +import com.github.ajalt.timberkt.e +import com.github.ajalt.timberkt.i import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.zeapo.pwdstore.PasswordEntry import com.zeapo.pwdstore.R @@ -48,7 +51,6 @@ import me.msfjarvis.openpgpktx.util.OpenPgpServiceConnection import org.apache.commons.io.FileUtils import org.openintents.openpgp.IOpenPgpService2 import org.openintents.openpgp.OpenPgpError -import timber.log.Timber class AutofillService : AccessibilityService(), CoroutineScope by CoroutineScope(Dispatchers.Default) { private var serviceConnection: OpenPgpServiceConnection? = null @@ -522,11 +524,11 @@ class AutofillService : AccessibilityService(), CoroutineScope by CoroutineScope lastPasswordMaxDate = System.currentTimeMillis() + ttl * 1000L } } catch (e: UnsupportedEncodingException) { - Timber.tag(Constants.TAG).e(e) + tag(Constants.TAG).e(e) } } OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED -> { - Timber.tag("PgpHandler").i("RESULT_CODE_USER_INTERACTION_REQUIRED") + tag("PgpHandler").i { "RESULT_CODE_USER_INTERACTION_REQUIRED" } val pi = result.getParcelableExtra<PendingIntent>(OpenPgpApi.RESULT_INTENT) // need to start a blank activity to call startIntentSenderForResult val intent = Intent(applicationContext, AutofillActivity::class.java) @@ -538,8 +540,8 @@ class AutofillService : AccessibilityService(), CoroutineScope by CoroutineScope val error = result.getParcelableExtra<OpenPgpError>(OpenPgpApi.RESULT_ERROR) if (error != null) { withContext(Dispatchers.Main) { Toast.makeText(applicationContext, "Error from OpenKeyChain : ${error.message}", Toast.LENGTH_LONG).show() } - Timber.tag(Constants.TAG).e("onError getErrorId: ${error.errorId}") - Timber.tag(Constants.TAG).e("onError getMessage: ${error.message}") + tag(Constants.TAG).e { "onError getErrorId: ${error.errorId}" } + tag(Constants.TAG).e { "onError getMessage: ${error.message}" } } } } |
