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

Commit 1019ff0b authored by Soonil Nagarkar's avatar Soonil Nagarkar
Browse files

Remove stationary throttling for location providers

Two flags give us the option of removing stationary throttling for all
providers, or for all providers except GNSS.

Bug: 354000147
Test: LocationProviderManagerTest
Flag: android.location.flags.keep_gnss_stationary_throttling
Flag: android.location.flags.disable_stationary_throttling
Change-Id: I0a25835449a202b671eb17e7253e7f1cd6f2884f
parent 057e584a
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
package: "android.location.flags"
container: "system"

flag {
    name: "keep_gnss_stationary_throttling"
    namespace: "location"
    description: "Keeps stationary throttling for the GNSS provider even if the disable_stationary_throttling flag is true."
    bug: "354000147"
}

flag {
    name: "disable_stationary_throttling"
    namespace: "location"
    description: "Disables stationary throttling for all providers"
    bug: "354000147"
}

flag {
    name: "new_geocoder"
    namespace: "location"
+5 −0
Original line number Diff line number Diff line
@@ -376,6 +376,11 @@ public class LocationManagerService extends ILocationManager.Stub implements
                            mContext.getContentResolver(),
                            Settings.Global.LOCATION_ENABLE_STATIONARY_THROTTLE,
                            defaultStationaryThrottlingSetting) != 0;
                    if (Flags.disableStationaryThrottling() && !(
                            Flags.keepGnssStationaryThrottling() && enableStationaryThrottling
                                    && GPS_PROVIDER.equals(manager.getName()))) {
                        enableStationaryThrottling = false;
                    }
                    if (enableStationaryThrottling) {
                        realProvider = new StationaryThrottlingLocationProvider(manager.getName(),
                                mInjector, realProvider);