diff options
Diffstat (limited to 'app/src/main/java/com/zeapo/pwdstore/utils')
| -rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/utils/Otp.java | 6 | ||||
| -rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/utils/auth/Authenticator.kt | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/Otp.java b/app/src/main/java/com/zeapo/pwdstore/utils/Otp.java index a2ee2488..0092d085 100644 --- a/app/src/main/java/com/zeapo/pwdstore/utils/Otp.java +++ b/app/src/main/java/com/zeapo/pwdstore/utils/Otp.java @@ -4,7 +4,6 @@ */ package com.zeapo.pwdstore.utils; -import android.util.Log; import java.math.BigInteger; import java.nio.ByteBuffer; import java.security.InvalidKeyException; @@ -13,6 +12,7 @@ import java.util.Arrays; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; import org.apache.commons.codec.binary.Base32; +import timber.log.Timber; public class Otp { @@ -34,10 +34,10 @@ public class Otp { mac = Mac.getInstance(ALGORITHM); mac.init(signingKey); } catch (NoSuchAlgorithmException e) { - Log.e("TOTP", ALGORITHM + " unavailable - should never happen", e); + Timber.tag("TOTP").e(e, "%s unavailable - should never happen", ALGORITHM); return null; } catch (InvalidKeyException e) { - Log.e("TOTP", "Key is malformed", e); + Timber.tag("TOTP").e(e, "Key is malformed"); return null; } diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/auth/Authenticator.kt b/app/src/main/java/com/zeapo/pwdstore/utils/auth/Authenticator.kt index 71e5df54..908cc507 100644 --- a/app/src/main/java/com/zeapo/pwdstore/utils/auth/Authenticator.kt +++ b/app/src/main/java/com/zeapo/pwdstore/utils/auth/Authenticator.kt @@ -5,11 +5,11 @@ package com.zeapo.pwdstore.utils.auth import android.os.Handler -import android.util.Log import androidx.biometric.BiometricManager import androidx.biometric.BiometricPrompt import androidx.fragment.app.FragmentActivity import com.zeapo.pwdstore.R +import timber.log.Timber internal class Authenticator( private val fragmentActivity: FragmentActivity, @@ -22,19 +22,19 @@ internal class Authenticator( override fun onAuthenticationError(errorCode: Int, errString: CharSequence) { super.onAuthenticationError(errorCode, errString) - Log.d(TAG, "Error: $errorCode: $errString") + Timber.tag(TAG).d("Error: $errorCode: $errString") callback(AuthenticationResult.UnrecoverableError(errorCode, errString)) } override fun onAuthenticationFailed() { super.onAuthenticationFailed() - Log.d(TAG, "Failed") + Timber.tag(TAG).d("Failed") callback(AuthenticationResult.Failure) } override fun onAuthenticationSucceeded(result: BiometricPrompt.AuthenticationResult) { super.onAuthenticationSucceeded(result) - Log.d(TAG, "Success") + Timber.tag(TAG).d("Success") callback(AuthenticationResult.Success(result.cryptoObject)) } } |
