Use Android keystore for encrypting DB key.

Only for new accounts on API 23+.
This commit is contained in:
akwizgran
2020-01-09 14:06:42 +00:00
parent 8a6e886d09
commit 4d3c1b4fd2
12 changed files with 222 additions and 37 deletions

View File

@@ -16,6 +16,7 @@ import java.util.Set;
import java.util.logging.Logger;
import javax.annotation.Nullable;
import javax.annotation.concurrent.GuardedBy;
import javax.inject.Inject;
import static android.os.Build.VERSION.SDK_INT;
@@ -73,7 +74,7 @@ class AndroidAccountManager extends AccountManagerImpl
return PreferenceManager.getDefaultSharedPreferences(appContext);
}
// Locking: stateChangeLock
@GuardedBy("stateChangeLock")
private void deleteAppData(SharedPreferences... clear) {
// Clear and commit shared preferences
for (SharedPreferences prefs : clear) {