diff options
author | Christopher Tate <ctate@google.com> | 2015-01-06 15:48:33 -0800 |
---|---|---|
committer | Christopher Tate <ctate@google.com> | 2015-01-06 15:48:33 -0800 |
commit | b89e1405cf9f1da533dc0843390a1b6783abb0f4 (patch) | |
tree | c3c9a188e6f2627c4bb04330b9fd31f7a64f3497 /core/java/android/app | |
parent | 1c6014e77dfad1a7af229d642df7b7300beee721 (diff) | |
download | frameworks_base-b89e1405cf9f1da533dc0843390a1b6783abb0f4.zip frameworks_base-b89e1405cf9f1da533dc0843390a1b6783abb0f4.tar.gz frameworks_base-b89e1405cf9f1da533dc0843390a1b6783abb0f4.tar.bz2 |
Support single-package backup rejection by the transport
We now cleanly handle the case of the transport blacklisting specific
packages from key/value backup. Previously we would halt the entire
backup pass and reschedule if the transport returned any error from
performBackup(pkg). Now, we recognize the TRANSPORT_PACKAGE_REJECTED
result from that invocation, and properly drop that package's work
but proceed with running the rest of the backup queue as expected.
Bug 18694053
Change-Id: Id0dd6d59492bdea9f970540d776f37db0cc5d99c
Diffstat (limited to 'core/java/android/app')
-rw-r--r-- | core/java/android/app/backup/BackupTransport.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/java/android/app/backup/BackupTransport.java b/core/java/android/app/backup/BackupTransport.java index 70bb5e4..e853540 100644 --- a/core/java/android/app/backup/BackupTransport.java +++ b/core/java/android/app/backup/BackupTransport.java @@ -213,8 +213,9 @@ public class BackupTransport { /** * Send one application's key/value data update to the backup destination. The - * transport may send the data immediately, or may buffer it. After this is called, - * {@link #finishBackup} will be called to ensure the data is sent and recorded successfully. + * transport may send the data immediately, or may buffer it. If this method returns + * {@link #TRANSPORT_OK}, {@link #finishBackup} will then be called to ensure the data + * is sent and recorded successfully. * * @param packageInfo The identity of the application whose data is being backed up. * This specifically includes the signature list for the package. @@ -226,6 +227,8 @@ public class BackupTransport { * is to provide a guarantee that no stale data exists in the restore set when the * device begins providing incremental backups. * @return one of {@link BackupTransport#TRANSPORT_OK} (OK so far), + * {@link BackupTransport#TRANSPORT_PACKAGE_REJECTED} (to suppress backup of this + * specific package, but allow others to proceed), * {@link BackupTransport#TRANSPORT_ERROR} (on network error or other failure), or * {@link BackupTransport#TRANSPORT_NOT_INITIALIZED} (if the backend dataset has * become lost due to inactivity purge or some other reason and needs re-initializing) |