Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3eafb6e2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Increase timeout for ADB backup/restore of SharedStorage." into oc-dev

parents b2484f22 3b03673d
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -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