From c2ec12b343f7bf186270b221efa484b9a5ae2d3e Mon Sep 17 00:00:00 2001 From: Tim Su Date: Fri, 5 Jun 2009 11:37:30 +0000 Subject: [PATCH] Fixed how the autosync offset was being calculated. Really, how did this work before? Oh well, that's why we code review... =/ --- AndroidManifest.xml | 4 ++-- src/com/timsu/astrid/sync/SynchronizationService.java | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index dea926916..0b2afef69 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="110" + android:versionName="2.8.4"> diff --git a/src/com/timsu/astrid/sync/SynchronizationService.java b/src/com/timsu/astrid/sync/SynchronizationService.java index fcf922b3c..ad1941b24 100644 --- a/src/com/timsu/astrid/sync/SynchronizationService.java +++ b/src/com/timsu/astrid/sync/SynchronizationService.java @@ -100,12 +100,10 @@ public class SynchronizationService extends Service { latestSyncMillis = lastAutoSyncDate.getTime(); long offset = 0; if(latestSyncMillis != 0) - offset = Math.min(offset, Math.max(0, latestSyncMillis + interval - - System.currentTimeMillis())); + offset = Math.max(0, latestSyncMillis + interval - System.currentTimeMillis()); // give a little padding offset = Math.max(offset, AUTO_SYNC_MIN_OFFSET); - offset = AUTO_SYNC_MIN_OFFSET; timer.scheduleAtFixedRate(new TimerTask() { @Override