From 690de9e2fab71883a6ee3a6f3ff8ef0c17644146 Mon Sep 17 00:00:00 2001 From: sonora Date: Mon, 6 May 2019 23:21:19 +0200 Subject: [PATCH] use 500 ms margin --- .../src/net/osmand/plus/OnNavigationServiceAlarmReceiver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/OnNavigationServiceAlarmReceiver.java b/OsmAnd/src/net/osmand/plus/OnNavigationServiceAlarmReceiver.java index b89fff7e03..0cd1f734cf 100644 --- a/OsmAnd/src/net/osmand/plus/OnNavigationServiceAlarmReceiver.java +++ b/OsmAnd/src/net/osmand/plus/OnNavigationServiceAlarmReceiver.java @@ -55,7 +55,7 @@ public class OnNavigationServiceAlarmReceiver extends BroadcastReceiver { if (Build.VERSION.SDK_INT >= 19) { NavigationService service = ((OsmandApplication) context.getApplicationContext()).getNavigationService(); // Avoid drift - while ((service.getNextManualWakeup() - SystemClock.elapsedRealtime()) < 0) { + while ((service.getNextManualWakeup() - SystemClock.elapsedRealtime()) < 500) { service.setNextManualWakeup(service.getNextManualWakeup() + service.getServiceOffInterval()); } AlarmManager alarmManager = (AlarmManager) service.getSystemService(Context.ALARM_SERVICE);