Increase timeout for ADB backup/restore of SharedStorage.
It previously used a backup timeout of 5 min, and restore timeout of 1 min, that would always timeout if the files on shared storage were big. Now increase both to 60 minutes. Bug: 37201952 Test: adb backup -shared && adb restore backup.ab Merged-In: Ice6648554933baf76e96fd151b506564487c91c6 Change-Id: I99095249e960fd47fc742154bc513347bf506548
This commit is contained in:
@@ -3868,9 +3868,14 @@ public class BackupManagerService {
|
||||
writeApkToBackup(mPackage, output);
|
||||
}
|
||||
|
||||
final boolean isSharedStorage =
|
||||
mPackage.packageName.equals(SHARED_BACKUP_AGENT_PACKAGE);
|
||||
final long timeout = isSharedStorage ?
|
||||
TIMEOUT_SHARED_BACKUP_INTERVAL : TIMEOUT_FULL_BACKUP_INTERVAL;
|
||||
|
||||
if (DEBUG) Slog.d(TAG, "Calling doFullBackup() on " + mPackage.packageName);
|
||||
prepareOperationTimeout(mToken, TIMEOUT_FULL_BACKUP_INTERVAL,
|
||||
mTimeoutMonitor /* in parent class */, OP_TYPE_BACKUP_WAIT);
|
||||
prepareOperationTimeout(mToken, timeout, mTimeoutMonitor /* in parent class */,
|
||||
OP_TYPE_BACKUP_WAIT);
|
||||
mAgent.doFullBackup(mPipe, mQuota, mToken, mBackupManagerBinder);
|
||||
} catch (IOException e) {
|
||||
Slog.e(TAG, "Error running full backup for " + mPackage.packageName);
|
||||
@@ -7578,9 +7583,12 @@ if (MORE_DEBUG) Slog.v(TAG, " + got " + nRead + "; now wanting " + (size - soF
|
||||
if (okay) {
|
||||
boolean agentSuccess = true;
|
||||
long toCopy = info.size;
|
||||
final boolean isSharedStorage = pkg.equals(SHARED_BACKUP_AGENT_PACKAGE);
|
||||
final long timeout = isSharedStorage ?
|
||||
TIMEOUT_SHARED_BACKUP_INTERVAL : TIMEOUT_RESTORE_INTERVAL;
|
||||
final int token = generateToken();
|
||||
try {
|
||||
prepareOperationTimeout(token, TIMEOUT_RESTORE_INTERVAL, null,
|
||||
prepareOperationTimeout(token, timeout, null,
|
||||
OP_TYPE_RESTORE_WAIT);
|
||||
if (FullBackup.OBB_TREE_TOKEN.equals(info.domain)) {
|
||||
if (DEBUG) Slog.d(TAG, "Restoring OBB file for " + pkg
|
||||
|
||||
Reference in New Issue
Block a user