Set successful sync after loop initiated from background sync

pull/14/head
Sam Bosley 13 years ago
parent e9083f0803
commit dd4e3d498d

@ -296,6 +296,7 @@ public class ActFmSyncThread {
} }
} }
boolean recordSyncSuccess = true;
if (timeForBackgroundSync()) { if (timeForBackgroundSync()) {
repopulateQueueFromOutstandingTables(); repopulateQueueFromOutstandingTables();
enqueueMessage(BriefMe.instantiateBriefMeForClass(TaskListMetadata.class, NameMaps.PUSHED_AT_TASK_LIST_METADATA), DEFAULT_REFRESH_RUNNABLE); enqueueMessage(BriefMe.instantiateBriefMeForClass(TaskListMetadata.class, NameMaps.PUSHED_AT_TASK_LIST_METADATA), DEFAULT_REFRESH_RUNNABLE);
@ -358,6 +359,9 @@ public class ActFmSyncThread {
} }
batchSize = Math.min(batchSize, messageBatch.size()) * 2; batchSize = Math.min(batchSize, messageBatch.size()) * 2;
if (recordSyncSuccess)
actFmPreferenceService.recordSuccessfulSync();
} catch (IOException e) { } catch (IOException e) {
Log.e(ERROR_TAG, "IOException", e); Log.e(ERROR_TAG, "IOException", e);
batchSize = Math.max(batchSize / 2, 1); batchSize = Math.max(batchSize / 2, 1);

Loading…
Cancel
Save