From 9274e0f349f9c1027cd0f16baad5d79135f61ff3 Mon Sep 17 00:00:00 2001 From: David Perez Date: Mon, 14 Jul 2025 16:36:13 -0500 Subject: [PATCH] Update the Androidx Crypto library (#5527) --- .../bitwarden/data/datasource/disk/di/PreferenceModule.kt | 7 ++++--- gradle/libs.versions.toml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/data/src/main/kotlin/com/bitwarden/data/datasource/disk/di/PreferenceModule.kt b/data/src/main/kotlin/com/bitwarden/data/datasource/disk/di/PreferenceModule.kt index 2ac1f3d45a..cbb559714b 100644 --- a/data/src/main/kotlin/com/bitwarden/data/datasource/disk/di/PreferenceModule.kt +++ b/data/src/main/kotlin/com/bitwarden/data/datasource/disk/di/PreferenceModule.kt @@ -1,3 +1,5 @@ +@file:Suppress("DEPRECATION") + package com.bitwarden.data.datasource.disk.di import android.app.Application @@ -37,13 +39,12 @@ object PreferenceModule { fun provideEncryptedSharedPreferences( application: Application, ): SharedPreferences = - @Suppress("TooGenericExceptionCaught") try { getEncryptedSharedPreferences(application = application) - } catch (e: GeneralSecurityException) { + } catch (_: GeneralSecurityException) { // Handle when a bad master key or key-set has been attempted destroyEncryptedSharedPreferencesAndRebuild(application = application) - } catch (e: RuntimeException) { + } catch (@Suppress("TooGenericExceptionCaught") _: RuntimeException) { // Handle KeystoreExceptions that get wrapped up in a RuntimeException destroyEncryptedSharedPreferencesAndRebuild(application = application) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 81bc533b8b..d70b287455 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -22,7 +22,7 @@ androidxHiltNavigationCompose = "1.2.0" androidxLifecycle = "2.9.1" androidxNavigation = "2.9.1" androidxRoom = "2.7.2" -androidxSecurityCrypto = "1.1.0-alpha06" +androidxSecurityCrypto = "1.1.0-beta01" androidxSplash = "1.1.0-rc01" androidxWork = "2.10.2" bitwardenSdk = "1.0.0-20250708.105256-238"