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

Commit b23aa90f authored by Baktash Boghrati's avatar Baktash Boghrati Committed by Android (Google) Code Review
Browse files

Merge "Disable stationaty throttling for watches"

parents dc7f9458 138912ab
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -363,9 +363,13 @@ public class LocationManagerService extends ILocationManager.Stub implements
            if (realProvider != null) {
                // custom logic wrapping all non-passive providers
                if (manager != mPassiveManager) {
                    int defaultStationaryThrottlingSetting =
                            mContext.getPackageManager().hasSystemFeature(
                                PackageManager.FEATURE_WATCH) ? 0 : 1;
                    boolean enableStationaryThrottling = Settings.Global.getInt(
                            mContext.getContentResolver(),
                            Settings.Global.LOCATION_ENABLE_STATIONARY_THROTTLE, 1) != 0;
                            Settings.Global.LOCATION_ENABLE_STATIONARY_THROTTLE,
                            defaultStationaryThrottlingSetting) != 0;
                    if (enableStationaryThrottling) {
                        realProvider = new StationaryThrottlingLocationProvider(manager.getName(),
                                mInjector, realProvider);