hook database restore with restore session
1. Create feature flag for new backup & restore flow.
2. For each restore session (install reason is restore),
if its creation time is newer than the one we have in
SharedPreference, we update the entry and restores
favorite table from backup.
3. The restore operation is debounced so that when
multiple restore session is created within a small
amount of time, only the last invocation will get
executed.
Bug: 141472083
Change-Id: I7b5b63ec28741ba2b02ccfd13f591c961362ba36
Test:
1. apply on master, build & flash on physical device.
2. factory reset the device.
3. go through SuW, perform restore, exit without
adding work profile.
4. settings -> account -> add work profile account.
5. finish work profile setup, verify work profiles
is restored as well.
6 files changed