diff options
| author | 2013-06-10 20:15:59 +0000 | |
|---|---|---|
| committer | 2013-06-10 20:15:59 +0000 | |
| commit | 58100fb813f4a68386757fc80244dbb756ea35d5 (patch) | |
| tree | f37a3d0a7e2d3266cf67abd62279bda89342ec51 | |
| parent | a9221987c047a9a05da9cc4f3446a0d581494a85 (diff) | |
| parent | 59dc7a8e75647d5112efd0719e210cdcf83f56c2 (diff) | |
Merge "Do not allow 0 or smaller periodicity for syncs. b/9295383" into jb-mr2-dev
| -rw-r--r-- | services/java/com/android/server/content/SyncManager.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/services/java/com/android/server/content/SyncManager.java b/services/java/com/android/server/content/SyncManager.java index 1c883ec8ce25..ff1281e5c546 100644 --- a/services/java/com/android/server/content/SyncManager.java +++ b/services/java/com/android/server/content/SyncManager.java @@ -1971,6 +1971,10 @@ public class SyncManager { for (int i = 0, N = info.periodicSyncs.size(); i < N; i++) { final Bundle extras = info.periodicSyncs.get(i).first; final Long periodInMillis = info.periodicSyncs.get(i).second * 1000; + // Skip if the period is invalid + if (periodInMillis <= 0) { + continue; + } // find when this periodic sync was last scheduled to run final long lastPollTimeAbsolute = status.getPeriodicSyncTime(i); |