Merge "Start agent in correct mode for adb k/v restore"

This commit is contained in:
TreeHugger Robot
2017-06-16 15:32:16 +00:00
committed by Android (Google) Code Review
2 changed files with 6 additions and 2 deletions

View File

@@ -7562,7 +7562,9 @@ if (MORE_DEBUG) Slog.v(TAG, " + got " + nRead + "; now wanting " + (size - soF
// All set; now set up the IPC and launch the agent
setUpPipes();
mAgent = bindToAgentSynchronous(mTargetApp,
ApplicationThreadConstants.BACKUP_MODE_RESTORE_FULL);
FullBackup.KEY_VALUE_DATA_TOKEN.equals(info.domain)
? ApplicationThreadConstants.BACKUP_MODE_INCREMENTAL
: ApplicationThreadConstants.BACKUP_MODE_RESTORE_FULL);
mAgentPackage = pkg;
} catch (IOException e) {
// fall through to error handling

View File

@@ -610,7 +610,9 @@ public class PerformAdbRestoreTask implements Runnable {
// All set; now set up the IPC and launch the agent
setUpPipes();
mAgent = mBackupManagerService.bindToAgentSynchronous(mTargetApp,
ApplicationThreadConstants.BACKUP_MODE_RESTORE_FULL);
FullBackup.KEY_VALUE_DATA_TOKEN.equals(info.domain)
? ApplicationThreadConstants.BACKUP_MODE_INCREMENTAL
: ApplicationThreadConstants.BACKUP_MODE_RESTORE_FULL);
mAgentPackage = pkg;
} catch (IOException e) {
// fall through to error handling