diff options
author | Christopher Tate <ctate@google.com> | 2014-08-07 14:19:50 -0700 |
---|---|---|
committer | Christopher Tate <ctate@android.com> | 2014-08-07 23:16:19 +0000 |
commit | e079264b981d87c648921185528b553a86ae353d (patch) | |
tree | 459b90cc45e9deeb29311d1fc5abecef1d88e799 /core/java/android/app/backup | |
parent | e41ab847a5c12cb7a6a5b2d0f40e101bc9ea6b59 (diff) | |
download | frameworks_base-e079264b981d87c648921185528b553a86ae353d.zip frameworks_base-e079264b981d87c648921185528b553a86ae353d.tar.gz frameworks_base-e079264b981d87c648921185528b553a86ae353d.tar.bz2 |
API to tell the transport to cancel a full backup in progress
Bug 16524520
Change-Id: If2cbffd3c8a03bf4eb7b11ff1ae784c437e27e7f
Diffstat (limited to 'core/java/android/app/backup')
-rw-r--r-- | core/java/android/app/backup/BackupTransport.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/core/java/android/app/backup/BackupTransport.java b/core/java/android/app/backup/BackupTransport.java index dc3bbc0..6adc2e0 100644 --- a/core/java/android/app/backup/BackupTransport.java +++ b/core/java/android/app/backup/BackupTransport.java @@ -405,6 +405,25 @@ public class BackupTransport { return BackupTransport.TRANSPORT_ERROR; } + /** + * Tells the transport to cancel the currently-ongoing full backup operation. This + * will happen between {@link #performFullBackup()} and {@link #finishBackup()} + * if the OS needs to abort the backup operation for any reason, such as a crash in + * the application undergoing backup. + * + * <p>When it receives this call, the transport should discard any partial archive + * that it has stored so far. If possible it should also roll back to the previous + * known-good archive in its datastore. + * + * <p>If the transport receives this callback, it will <em>not</em> receive a + * call to {@link #finishBackup()}. It needs to tear down any ongoing backup state + * here. + */ + public void cancelFullBackup() { + throw new UnsupportedOperationException( + "Transport cancelFullBackup() not implemented"); + } + // ------------------------------------------------------------------------------------ // Full restore interfaces |