From 508c3d5d91ff7ece787215b0636fbcdd6a0d6a41 Mon Sep 17 00:00:00 2001 From: shafik Date: Wed, 6 Mar 2019 16:30:57 +0000 Subject: [PATCH] API cleanup: DeviceConfig.Rollback documentation Added documentation for the different namespaces in DeviceConfig.Rollback with emphasis on the difference between them. Added flag type and namespace to the documentation of each flag. Fixes: 127282774 Test: build Change-Id: If62a94a0d2775d709af5aebc07b82154842853bc --- core/java/android/provider/DeviceConfig.java | 30 +++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/core/java/android/provider/DeviceConfig.java b/core/java/android/provider/DeviceConfig.java index 60c8d3612cd00..0ac7c37ee293f 100644 --- a/core/java/android/provider/DeviceConfig.java +++ b/core/java/android/provider/DeviceConfig.java @@ -323,18 +323,40 @@ public final class DeviceConfig { */ @SystemApi public interface Rollback { + + /** + * Namespace for flags that can be changed immediately after becoming available on device. + */ String NAMESPACE = "rollback"; + /** + * Namespace for flags that can be changed only after reboot. + */ String BOOT_NAMESPACE = "rollback_boot"; /** - * Timeout in milliseconds for enabling package rollback. + * Timeout duration in milliseconds for enabling package rollback. If we fail to enable + * rollback within that period, the install will proceed without rollback enabled. + * + *

If flag value is negative, the default value will be assigned. + * + * Flag type: {@code long} + * Namespace: Rollback.NAMESPACE */ String ENABLE_ROLLBACK_TIMEOUT = "enable_rollback_timeout"; - /** - * The lifetime duration of rollback packages in millis - */ + /** + * Lifetime duration of rollback packages in millis. A rollback will be available for + * at most that duration of time after a package is installed with + * {@link PackageInstaller.SessionParams#setEnableRollback()}. + * + *

If flag value is negative, the default value will be assigned. + * + * @see RollbackManager + * + * Flag type: {@code long} + * Namespace: Rollback.BOOT_NAMESPACE + */ String ROLLBACK_LIFETIME_IN_MILLIS = "rollback_lifetime_in_millis"; }