Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea059c76 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "SyncManager: Adjust sync remaining time calculation."

parents cf669f0f afa81a58
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -2242,10 +2242,9 @@ public class SyncManager {
                    final long shiftedLastPollTimeAbsolute =
                            (0 < lastPollTimeAbsolute - mSyncRandomOffsetMillis) ?
                                    (lastPollTimeAbsolute - mSyncRandomOffsetMillis) : 0;
                    long remainingMillis
                        = periodInMillis - (shiftedNowAbsolute % periodInMillis);
                    long timeSinceLastRunMillis
                        = (nowAbsolute - lastPollTimeAbsolute);
                    long remainingMillis = periodInMillis - timeSinceLastRunMillis;
                    // Schedule this periodic sync to run early if it's close enough to its next
                    // runtime, and far enough from its last run time.
                    // If we are early, there will still be time remaining in this period.