Start agent in correct mode for adb k/v restore
Previously we always started the agent in "dolly" mode, which meant that the application context might not be what the agent was expecting. Bug: 62524964 Test: Manual Change-Id: I6cd2fafcac97f7ca01a6e172325968d79cc01194
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user