public class SecureStorageModule extends Object
Modifier and Type | Method and Description |
---|---|
static SecureStorageModule |
create()
Create SecureStorageModule object.
|
SecureStorageManager |
getSecureStorageManager()
Get SecureStorageManager.
|
boolean |
isMigrationNeededForAndroidQ(String storageIdentifier,
DeviceFingerprintSource dfs)
Check if the migration is needed for Android Q with the given storage identifier.
|
void |
migrateForAndroidQ(String storageIdentifier,
DeviceFingerprintSource dfs)
Migrate the old secure storage data to be compatible with Android Q.
|
boolean |
reset(String storageIdentifier)
Cleanup the data associated with given storageIdentifier.
|
public static SecureStorageModule create()
public SecureStorageManager getSecureStorageManager()
SecureStorageManager
object.public boolean reset(String storageIdentifier) throws IdpSecureStorageException
storageIdentifier
- the name of the storage to be cleaned up.IdpSecureStorageException
- when database operation failed.IdpCore.reset()
public boolean isMigrationNeededForAndroidQ(String storageIdentifier, DeviceFingerprintSource dfs) throws IdpSecureStorageException
migrateForAndroidQ(String, DeviceFingerprintSource)
.
NOTE: This API should be called during the application startup to make sure that the permission popup, if any, will not interfere with other business flow.
For more information on Android Q privacy changes, refer to https://developer.android.com/preview/privacy/data-identifiers#device-ids
storageIdentifier
- The storage identifier need to be checked.dfs
- The device fingerprint source.IdpSecureStorageException
- When database operation failed.migrateForAndroidQ(String, DeviceFingerprintSource)
public void migrateForAndroidQ(String storageIdentifier, DeviceFingerprintSource dfs) throws IdpSecureStorageException
For more information on Android Q privacy changes, refer to https://developer.android.com/preview/privacy/data-identifiers#device-ids
storageIdentifier
- The name of the storage to be migrated.dfs
- The device fingerprint source.IdpSecureStorageException
- When database operation failed.isMigrationNeededForAndroidQ(String, DeviceFingerprintSource)