diff options
| author | 2018-01-19 10:30:25 +0000 | |
|---|---|---|
| committer | 2018-01-24 19:03:52 +0000 | |
| commit | dda88e7f07b60ed4ab0f8bf226e206e18dd71e66 (patch) | |
| tree | 9d04989a8d9cfe41968256d3c69acaacf72efabe | |
| parent | 9712788a0646b659b957952e9770943642dee1a8 (diff) | |
Remove @hide from incremental flags & return code.
See ag/3457616 for the implementation of the flags.
See ag/3498077 for the implementation of the return code
These changes are related because the transport uses the value of the
incremental/non-incremental flag to decide whether to request a
non-incremental backup using the new return code.
I chose to add both an INCREMENTAL and NON_INCREMENTAL flag to allow the
transport to distinguish between both cases and older versions of the OS
not supporting this flag.
Bug: 71792427
Change-Id: Ifa099fb73de70eb3b5b315cc3b266c308dfb719d
Test: None required, only changing javadoc.
| -rw-r--r-- | api/system-current.txt | 4 | ||||
| -rw-r--r-- | core/java/android/app/backup/BackupManagerMonitor.java | 1 | ||||
| -rw-r--r-- | core/java/android/app/backup/BackupTransport.java | 6 |
3 files changed, 6 insertions, 5 deletions
diff --git a/api/system-current.txt b/api/system-current.txt index 14320c46152f..e819baa4f746 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -514,6 +514,7 @@ package android.app.backup { field public static final int LOG_EVENT_ID_SIGNATURE_MISMATCH = 29; // 0x1d field public static final int LOG_EVENT_ID_SYSTEM_APP_NO_AGENT = 38; // 0x26 field public static final int LOG_EVENT_ID_TRANSPORT_IS_NULL = 50; // 0x32 + field public static final int LOG_EVENT_ID_TRANSPORT_NON_INCREMENTAL_BACKUP_REQUIRED = 51; // 0x33 field public static final int LOG_EVENT_ID_UNKNOWN_VERSION = 44; // 0x2c field public static final int LOG_EVENT_ID_VERSIONS_MATCH = 35; // 0x23 field public static final int LOG_EVENT_ID_VERSION_OF_BACKUP_OLDER = 36; // 0x24 @@ -570,9 +571,12 @@ package android.app.backup { method public java.lang.String transportDirName(); field public static final int AGENT_ERROR = -1003; // 0xfffffc15 field public static final int AGENT_UNKNOWN = -1004; // 0xfffffc14 + field public static final int FLAG_INCREMENTAL = 2; // 0x2 + field public static final int FLAG_NON_INCREMENTAL = 4; // 0x4 field public static final int FLAG_USER_INITIATED = 1; // 0x1 field public static final int NO_MORE_DATA = -1; // 0xffffffff field public static final int TRANSPORT_ERROR = -1000; // 0xfffffc18 + field public static final int TRANSPORT_NON_INCREMENTAL_BACKUP_REQUIRED = -1006; // 0xfffffc12 field public static final int TRANSPORT_NOT_INITIALIZED = -1001; // 0xfffffc17 field public static final int TRANSPORT_OK = 0; // 0x0 field public static final int TRANSPORT_PACKAGE_REJECTED = -1002; // 0xfffffc16 diff --git a/core/java/android/app/backup/BackupManagerMonitor.java b/core/java/android/app/backup/BackupManagerMonitor.java index a91aded1abf6..07e7688a48ae 100644 --- a/core/java/android/app/backup/BackupManagerMonitor.java +++ b/core/java/android/app/backup/BackupManagerMonitor.java @@ -174,7 +174,6 @@ public class BackupManagerMonitor { /** * The transport returned {@link BackupTransport#TRANSPORT_NON_INCREMENTAL_BACKUP_REQUIRED}. - * @hide */ public static final int LOG_EVENT_ID_TRANSPORT_NON_INCREMENTAL_BACKUP_REQUIRED = 51; diff --git a/core/java/android/app/backup/BackupTransport.java b/core/java/android/app/backup/BackupTransport.java index 266f58df3d7f..52ed0c192bed 100644 --- a/core/java/android/app/backup/BackupTransport.java +++ b/core/java/android/app/backup/BackupTransport.java @@ -60,8 +60,6 @@ public class BackupTransport { * * <p>This is only valid when backup manager called {@link * #performBackup(PackageInfo, ParcelFileDescriptor, int)} with {@link #FLAG_INCREMENTAL}. - * - * @hide */ public static final int TRANSPORT_NON_INCREMENTAL_BACKUP_REQUIRED = -1006; @@ -73,7 +71,7 @@ public class BackupTransport { * For key value backup, indicates that the backup data is a diff from a previous backup. The * transport must apply this diff to an existing backup to build the new backup set. * - * @hide + * @see #performBackup(PackageInfo, ParcelFileDescriptor, int) */ public static final int FLAG_INCREMENTAL = 1 << 1; @@ -81,7 +79,7 @@ public class BackupTransport { * For key value backup, indicates that the backup data is a complete set, not a diff from a * previous backup. The transport should clear any previous backup when storing this backup. * - * @hide + * @see #performBackup(PackageInfo, ParcelFileDescriptor, int) */ public static final int FLAG_NON_INCREMENTAL = 1 << 2; |