Use correct backup mode for k/v restore
When creating BackupAgent for k/v restore, use BACKUP_MODE_RESTORE
instead of BACKUP_MODE_INCREMENTAL, otherwise we can't differentiate
between backup and restore operations. See
https://b.corp.google.com/issues/272302093#comment5 for more context.
Bug: 272302093
Test: 1. atest CtsBackupTestCases CtsBackupHostTestCases (covers
functional testing of kv / full and backup / restore.
2. Update BackupAgent.java to print operationType param in
onCreate() -> run backup and restore of 'android' (kv) and
'com.android.wallpaperbackup' (full) and verify operationType
is always set correctly.
Change-Id: I82c88ffaea639d8fb69b6c56a9fec0756ca45528
3 files changed