summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2014-07-18 19:10:41 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-07-17 21:58:28 +0000
commit1787d9c51e982edd97c59d266e606719b7542e3f (patch)
tree127d37ccd02146575d6a430fa24ea22625736319 /services
parent3e3365babdf5b979e98afeb2544eb99421084eb7 (diff)
parent89101f7fe89134a609459e80f779c1a5114e562a (diff)
downloadframeworks_base-1787d9c51e982edd97c59d266e606719b7542e3f.zip
frameworks_base-1787d9c51e982edd97c59d266e606719b7542e3f.tar.gz
frameworks_base-1787d9c51e982edd97c59d266e606719b7542e3f.tar.bz2
Merge "Tear down agents properly at EOD in full restore" into lmp-dev
Diffstat (limited to 'services')
-rw-r--r--services/backup/java/com/android/server/backup/BackupManagerService.java19
1 files changed, 18 insertions, 1 deletions
diff --git a/services/backup/java/com/android/server/backup/BackupManagerService.java b/services/backup/java/com/android/server/backup/BackupManagerService.java
index ce9e85e..17a5263 100644
--- a/services/backup/java/com/android/server/backup/BackupManagerService.java
+++ b/services/backup/java/com/android/server/backup/BackupManagerService.java
@@ -3539,6 +3539,11 @@ public class BackupManagerService extends IBackupManager.Stub {
// In all cases we need to give the transport its finish callback
int finishResult = transport.finishBackup();
+ if (MORE_DEBUG) {
+ Slog.i(TAG, "Done trying to send backup data: result="
+ + result + " finishResult=" + finishResult);
+ }
+
// If we were otherwise in a good state, now interpret the final
// result based on what finishBackup() returned. If we're in a
// failure case already, preserve that result and ignore whatever
@@ -3561,7 +3566,7 @@ public class BackupManagerService extends IBackupManager.Stub {
// do nothing, clean up, and continue looping
} else if (result != BackupTransport.TRANSPORT_OK) {
if (DEBUG) {
- Slog.i(TAG, "Transport failed; aborting backup");
+ Slog.i(TAG, "Transport failed; aborting backup: " + result);
return;
}
}
@@ -4083,6 +4088,9 @@ public class BackupManagerService extends IBackupManager.Stub {
// okay, if the remote end failed at any point, deal with
// it by ignoring the rest of the restore on it
if (!agentSuccess) {
+ if (DEBUG) {
+ Slog.i(TAG, "Agent failure; ending restore");
+ }
mBackupHandler.removeMessages(MSG_TIMEOUT);
tearDownPipes();
tearDownAgent(mTargetApp);
@@ -4124,6 +4132,11 @@ public class BackupManagerService extends IBackupManager.Stub {
// If we got here we're either running smoothly or we've finished
if (info == null) {
+ if (MORE_DEBUG) {
+ Slog.i(TAG, "No [more] data for this package; tearing down");
+ }
+ tearDownPipes();
+ tearDownAgent(mTargetApp);
setRunning(false);
}
return (info != null);
@@ -7064,6 +7077,10 @@ if (MORE_DEBUG) Slog.v(TAG, " + got " + nRead + "; now wanting " + (size - soF
// Don't proceed until the engine has torn down the agent etc
eThread.waitForResult();
+ if (MORE_DEBUG) {
+ Slog.i(TAG, "engine thread finished; proceeding");
+ }
+
// Now we're really done with this one too
IoUtils.closeQuietly(mEnginePipes[0]);