Test restricting GPS always-on Workaound to Marshmellow and up

This commit is contained in:
sonora 2019-05-12 13:12:27 +02:00
parent d56b9d30f0
commit 27cb7bc561

View file

@ -852,7 +852,8 @@ public class OsmandApplication extends MultiDexApplication {
public int navigationServiceGpsInterval(int interval) { public int navigationServiceGpsInterval(int interval) {
// Issue 5632 Workaround: Keep GPS always on for SDKs where repeated AlarmManager scheduling is unreliable // Issue 5632 Workaround: Keep GPS always on for SDKs where repeated AlarmManager scheduling is unreliable
if ((Build.VERSION.SDK_INT >= 19) && (getSettings().SAVE_GLOBAL_TRACK_INTERVAL.get() < 5 * 60000)) { // Use for >= 23 for now, although manufacturer-dependent devices may be affected starting from 19
if ((Build.VERSION.SDK_INT >= 23) && (getSettings().SAVE_GLOBAL_TRACK_INTERVAL.get() < 5 * 60000)) {
return 0; return 0;
} }
// Default: Save battery power by turning off GPS between measurements // Default: Save battery power by turning off GPS between measurements