When a user grabs a new phone, and has an existing phone and wishes to migrate apps and data to the new phone. What exactly happens with the SharedPreferences/AndroidKeyStore/AndroidAccountManager?
IE, if the new device has say not the same app, would it copy over everything in SharedPreferences/Datastore?
What if the new phone already have the same app? If its say the same version does the data merge or replaces or the migration fails and the new phone keeps its data?
What if the version of the apps differ? Which version of the app is chosen to be on the new device?
Then, with AndroidAccountManager, my understanding is that one app is chosen to be the main app that is tied to that account type, and if you have multiple apps all using the same account it would still be tied to the first app on the device with that kind of account (assuming IIRC all the apps have the same signing key and is using the same account type).
What happens in the migration? Would it keep that app -> AccountManager link? Or would it be random and whichever app goes first is it?
Then about AndroidKeyStore, since its hardware backed, would that mean all keys are lost and gone? And that means that all process involving them would need a way to generate new keys and to ensure a migration plan works? Would there be any signal about this at all or would it be just the keys are gone and that is it?