Test restricting GPS always-on Workaound to Marshmellow and up
This commit is contained in:
parent
d56b9d30f0
commit
27cb7bc561
1 changed files with 2 additions and 1 deletions
|
@ -852,7 +852,8 @@ public class OsmandApplication extends MultiDexApplication {
|
|||
|
||||
public int navigationServiceGpsInterval(int interval) {
|
||||
// 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;
|
||||
}
|
||||
// Default: Save battery power by turning off GPS between measurements
|
||||
|
|
Loading…
Reference in a new issue