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

Commit 138912ab authored by Baktash Boghrati's avatar Baktash Boghrati
Browse files

Disable stationaty throttling for watches

Bug: 267685950
Test: Verfied not registering for stationary state with DeviceIdleController
Change-Id: I1ffa3ba4e1c21cb607fe505d017dec4c22b727c9
parent f2bd4af6
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);