revert 500 margin

This commit is contained in:
sonora 2019-05-06 23:36:59 +02:00
parent 690de9e2fa
commit c2762e6610

View file

@ -55,7 +55,7 @@ public class OnNavigationServiceAlarmReceiver extends BroadcastReceiver {
if (Build.VERSION.SDK_INT >= 19) { if (Build.VERSION.SDK_INT >= 19) {
NavigationService service = ((OsmandApplication) context.getApplicationContext()).getNavigationService(); NavigationService service = ((OsmandApplication) context.getApplicationContext()).getNavigationService();
// Avoid drift // Avoid drift
while ((service.getNextManualWakeup() - SystemClock.elapsedRealtime()) < 500) { while ((service.getNextManualWakeup() - SystemClock.elapsedRealtime()) < 0) {
service.setNextManualWakeup(service.getNextManualWakeup() + service.getServiceOffInterval()); service.setNextManualWakeup(service.getNextManualWakeup() + service.getServiceOffInterval());
} }
AlarmManager alarmManager = (AlarmManager) service.getSystemService(Context.ALARM_SERVICE); AlarmManager alarmManager = (AlarmManager) service.getSystemService(Context.ALARM_SERVICE);