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

Commit 4970974d authored by Ashish Sharma's avatar Ashish Sharma
Browse files

Do not allow 0 or smaller periodicity for syncs.

b/9295383

Change-Id: I5f758f4a033d74e42a04b214a6b70b94d394280d
parent 3606254a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1966,6 +1966,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);