@@ -5,6 +5,11 @@ import androidx.fragment.app.FragmentActivity
55import kotlinx.coroutines.flow.Flow
66import uk.gov.android.securestore.authentication.AuthenticatorPromptConfiguration
77
8+ @Deprecated(
9+ " Replace with SecureStoreAsyncV2 to allow handling errors correctly - aim to be removed by 20th of April 2026" ,
10+ replaceWith = ReplaceWith (" java/uk/gov/android/securestore/SecureStoreAsyncV2.kt" ),
11+ level = DeprecationLevel .WARNING
12+ )
813/* *
914 * Create an instance of [SecureStoreAsync] to save, query and delete data. Data stored as a key value pair, with the value being a [String]
1015 */
@@ -15,6 +20,11 @@ interface SecureStoreAsync {
1520 * @param context Just a basic context to allow initialisation of storage
1621 * @param configurationAsync [SecureStorageConfigurationAsync] to allow setting of [AccessControlLevel] and store ID
1722 */
23+ @Deprecated(
24+ " Replace with SecureStoreAsyncV2.init() to allow handling errors correctly - aim to be removed by 20th of April 2026" ,
25+ replaceWith = ReplaceWith (" java/uk/gov/android/securestore/SecureStoreAsyncV2.kt" ),
26+ level = DeprecationLevel .WARNING
27+ )
1828 fun init (
1929 context : Context ,
2030 configurationAsync : SecureStorageConfigurationAsync ,
@@ -28,6 +38,11 @@ interface SecureStoreAsync {
2838 *
2939 * @throws [uk.gov.android.securestore.error.SecureStorageError] if unable to save
3040 */
41+ @Deprecated(
42+ " Replace with SecureStoreAsyncV2.upsert() to allow handling errors correctly - aim to be removed by 20th of April 2026" ,
43+ replaceWith = ReplaceWith (" java/uk/gov/android/securestore/SecureStoreAsyncV2.kt" ),
44+ level = DeprecationLevel .WARNING
45+ )
3146 suspend fun upsert (key : String , value : String ): String
3247
3348 /* *
@@ -36,13 +51,23 @@ interface SecureStoreAsync {
3651 * @param [key] The unique identifier for the value to delete
3752 *
3853 */
54+ @Deprecated(
55+ " Replace with SecureStoreAsyncV2.delete(...) to allow handling errors correctly - aim to be removed by 20th of April 2026" ,
56+ replaceWith = ReplaceWith (" java/uk/gov/android/securestore/SecureStoreAsyncV2.kt" ),
57+ level = DeprecationLevel .WARNING
58+ )
3959 fun delete (key : String )
4060
4161 /* *
4262 * Delete everything in the SecureStore
4363 *
4464 * @throws [uk.gov.android.securestore.error.SecureStorageError] if unable to delete
4565 */
66+ @Deprecated(
67+ " Replace with SecureStoreAsyncV2.deleteAll(...) to allow handling errors correctly - aim to be removed by 20th of April 2026" ,
68+ replaceWith = ReplaceWith (" java/uk/gov/android/securestore/SecureStoreAsyncV2.kt" ),
69+ level = DeprecationLevel .WARNING
70+ )
4671 suspend fun deleteAll ()
4772
4873 /* *
@@ -52,6 +77,11 @@ interface SecureStoreAsync {
5277 * @return [RetrievalEvent] to cover success or failure
5378 *
5479 */
80+ @Deprecated(
81+ " Replace with SecureStoreAsyncV2.retrieve() to allow handling errors correctly - aim to be removed by 20th of April 2026" ,
82+ replaceWith = ReplaceWith (" java/uk/gov/android/securestore/SecureStoreAsyncV2.kt" ),
83+ level = DeprecationLevel .WARNING
84+ )
5585 suspend fun retrieve (
5686 vararg key : String ,
5787 ): RetrievalEvent
@@ -65,6 +95,11 @@ interface SecureStoreAsync {
6595 * @return A [Flow] of [RetrievalEvent]s, allowing for multiple failed attempts for auth
6696 *
6797 */
98+ @Deprecated(
99+ " Replace with SecureStoreAsyncV2.retrieveWithAuthentication(...) to allow handling errors correctly - aim to be removed by 20th of April 2026" ,
100+ replaceWith = ReplaceWith (" java/uk/gov/android/securestore/SecureStoreAsyncV2.kt" ),
101+ level = DeprecationLevel .WARNING
102+ )
68103 suspend fun retrieveWithAuthentication (
69104 vararg key : String ,
70105 authPromptConfig : AuthenticatorPromptConfiguration ,
@@ -79,5 +114,10 @@ interface SecureStoreAsync {
79114 *
80115 * @throws [uk.gov.android.securestore.error.SecureStorageError] if unable to check for existence
81116 */
117+ @Deprecated(
118+ " Replace with SecureStoreAsyncV2.exists(...) to allow handling errors correctly - aim to be removed by 20th of April 2026" ,
119+ replaceWith = ReplaceWith (" java/uk/gov/android/securestore/SecureStoreAsyncV2.kt" ),
120+ level = DeprecationLevel .WARNING
121+ )
82122 fun exists (key : String ): Boolean
83123}
0 commit comments