From acfb417cdc7af772209f33e99695eed2b6668b8f Mon Sep 17 00:00:00 2001 From: Makoto Onuki Date: Thu, 15 Mar 2018 11:01:09 -0700 Subject: Fix SyncResutl.delayUntil javadoc Fix: 17912666 Bug: 66950061 Test: presubmit Change-Id: I47b3a9fd087e7d7519eb1bc4a6182929a75d873b --- core/java/android/content/SyncResult.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/core/java/android/content/SyncResult.java b/core/java/android/content/SyncResult.java index 4f86af985dc6..f67d7f53d1c1 100644 --- a/core/java/android/content/SyncResult.java +++ b/core/java/android/content/SyncResult.java @@ -79,7 +79,17 @@ public final class SyncResult implements Parcelable { /** * Used to indicate to the SyncManager that future sync requests that match the request's - * Account and authority should be delayed at least this many seconds. + * Account and authority should be delayed until a time in seconds since Java epoch. + * + *

For example, if you want to delay the next sync for at least 5 minutes, then: + *

+     * result.delayUntil = (System.currentTimeMillis() / 1000) + 5 * 60;
+     * 
+ * + *

By default, when a sync fails, the system retries later with an exponential back-off + * with the system default initial delay time, which always wins over {@link #delayUntil} -- + * i.e. if the system back-off time is larger than {@link #delayUntil}, {@link #delayUntil} + * will essentially be ignored. */ public long delayUntil; -- cgit v1.2.3-59-g8ed1b