refactor: move logs to timber

This commit is contained in:
2026-06-08 19:07:09 +02:00
parent ceed94b253
commit f4b74ee43d
37 changed files with 267 additions and 258 deletions
@@ -1,7 +1,7 @@
package com.bitcointxoko.gudariwallet.security
import android.content.Context
import android.util.Log
import timber.log.Timber
import com.bitcointxoko.gudariwallet.util.WalletConstants
import com.google.crypto.tink.StreamingAead
import com.google.crypto.tink.integration.android.AndroidKeysetManager
@@ -21,7 +21,7 @@ object CredentialsTinkManager {
init {
// Register all StreamingAead primitives once at class load time
StreamingAeadConfig.register()
Log.d(TAG, "StreamingAeadConfig registered")
Timber.d("StreamingAeadConfig registered")
}
fun getOrCreateStreamingAead(context: Context): StreamingAead {
@@ -33,12 +33,12 @@ object CredentialsTinkManager {
.build()
.keysetHandle
Log.i(TAG, "Keyset loaded — key count: ${handle.size()}, primary key ID: ${handle.primary.id}")
Timber.i("Keyset loaded — key count: ${handle.size()}, primary key ID: ${handle.primary.id}")
handle.getPrimitive(StreamingAead::class.java).also {
Log.i(TAG, "StreamingAead primitive acquired successfully")
Timber.i("StreamingAead primitive acquired successfully")
}
} catch (e: Exception) {
Log.e(TAG, "Failed to initialise StreamingAead — Keystore may be unavailable", e)
Timber.e("Failed to initialise StreamingAead — Keystore may be unavailable", e)
throw e
}
}