Merge "Increase timeout for ADB backup/restore of SharedStorage." into oc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
3eafb6e2c6
@@ -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