[components] Added versioning system for the SQLCipher migration
commit4d6bc499ff32adc119baff23898a25d4d4b081c5
authorBen Dean-Kawamura <bdk@mozilla.com>
Fri, 8 Oct 2021 15:39:11 +0000 (8 11:39 -0400)
committerGrisha Kruglov <grigory@kruglov.ca>
Thu, 14 Oct 2021 03:30:28 +0000 (13 20:30 -0700)
tree6081837922e7d3dab0860672bde365b9ec4204bb
parent467e9590ec05c0faad044530a15614f425349715
[components] Added versioning system for the SQLCipher migration

Store an int that specifies if we've run the SQLCipher migration.  If we
decide to update the logic later on, this int can be used to determine
which version the user has run.

Don't delete the old crypto key.  This gives us the option of trying to
recover the old data in the case of a migration logic error.
mobile/android/android-components/components/service/sync-logins/src/main/java/mozilla/components/service/sync/logins/LoginsCrypto.kt
mobile/android/android-components/components/service/sync-logins/src/main/java/mozilla/components/service/sync/logins/SyncableLoginsStorage.kt