summaryrefslogtreecommitdiffstats
path: root/services/core/java/com/android/server/content/SyncOperation.java
diff options
context:
space:
mode:
authorMatthew Williams <mjwilliams@google.com>2014-08-25 19:18:32 -0700
committerMatthew Williams <mjwilliams@google.com>2014-08-25 19:25:55 -0700
commit92a1c09aa467f03dad78472098d40992303937fb (patch)
tree0044ba75bab8f8a90fd2d3d5ab5348063bd6f5dc /services/core/java/com/android/server/content/SyncOperation.java
parent3c8a42ddd9482ebc8541f7af6f15afdf3b3ec151 (diff)
downloadframeworks_base-92a1c09aa467f03dad78472098d40992303937fb.zip
frameworks_base-92a1c09aa467f03dad78472098d40992303937fb.tar.gz
frameworks_base-92a1c09aa467f03dad78472098d40992303937fb.tar.bz2
Add maximum time-out to sync operation
BUG: 16219182 We have seen cases where run-away syncs keep going for a very long time. The default behaviour is that a sync can run for as long as it wants once there is nothing else waiting. This CL will change that, and impose a maximum time-limit of 30mins on each sync, after when the op with be cancelled and the adapter will go into back-off. This behaviour will only take effect for syncs that are not initializations, or user-initiated. Change-Id: I1731270ca2a6500b19fc125186aa0b0cd81d1126
Diffstat (limited to 'services/core/java/com/android/server/content/SyncOperation.java')
-rw-r--r--services/core/java/com/android/server/content/SyncOperation.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/content/SyncOperation.java b/services/core/java/com/android/server/content/SyncOperation.java
index 9a4abce..35827cc 100644
--- a/services/core/java/com/android/server/content/SyncOperation.java
+++ b/services/core/java/com/android/server/content/SyncOperation.java
@@ -273,6 +273,14 @@ public class SyncOperation implements Comparable {
return extras.getBoolean(ContentResolver.SYNC_EXTRAS_DISALLOW_METERED, false);
}
+ public boolean isManual() {
+ return extras.getBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, false);
+ }
+
+ public boolean isIgnoreSettings() {
+ return extras.getBoolean(ContentResolver.SYNC_EXTRAS_IGNORE_SETTINGS, false);
+ }
+
/** Changed in V3. */
public static String toKey(SyncStorageEngine.EndPoint info, Bundle extras) {
StringBuilder sb = new StringBuilder();