Remove @Inject, not necessary anymore when class is annotated with @ContributesBinding

This commit is contained in:
Benoit Marty
2025-10-22 18:37:13 +02:00
parent 666666a8b6
commit 826cacf209
273 changed files with 1 additions and 545 deletions

View File

@@ -9,7 +9,6 @@ package io.element.android.libraries.cryptography.impl
import dev.zacsweers.metro.AppScope
import dev.zacsweers.metro.ContributesBinding
import dev.zacsweers.metro.Inject
import io.element.android.libraries.cryptography.api.AESEncryptionSpecs
import io.element.android.libraries.cryptography.api.EncryptionDecryptionService
import io.element.android.libraries.cryptography.api.EncryptionResult
@@ -21,7 +20,6 @@ import javax.crypto.spec.GCMParameterSpec
* Default implementation of [EncryptionDecryptionService] using AES encryption.
*/
@ContributesBinding(AppScope::class)
@Inject
class AESEncryptionDecryptionService : EncryptionDecryptionService {
override fun createEncryptionCipher(key: SecretKey): Cipher {
return Cipher.getInstance(AESEncryptionSpecs.CIPHER_TRANSFORMATION).apply {

View File

@@ -12,7 +12,6 @@ import android.security.keystore.KeyGenParameterSpec
import android.security.keystore.KeyProperties
import dev.zacsweers.metro.AppScope
import dev.zacsweers.metro.ContributesBinding
import dev.zacsweers.metro.Inject
import io.element.android.libraries.cryptography.api.AESEncryptionSpecs
import io.element.android.libraries.cryptography.api.SecretKeyRepository
import timber.log.Timber
@@ -26,7 +25,6 @@ import javax.crypto.SecretKey
* The generated key uses AES algorithm, with a key size of 128 bits, and the GCM block mode.
*/
@ContributesBinding(AppScope::class)
@Inject
class KeyStoreSecretKeyRepository(
private val keyStore: KeyStore,
) : SecretKeyRepository {