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

Commit a754cbd1 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Clear cached locations when location providers disabled Bug: 12118307"

parents 6a7158ba afce2787
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1177,6 +1177,11 @@ public class LocationManagerService extends ILocationManager.Stub {
            boolean shouldBeEnabled = isAllowedByCurrentUserSettingsLocked(name);
            if (isEnabled && !shouldBeEnabled) {
                updateProviderListenersLocked(name, false, mCurrentUserId);
                // If any provider has been disabled, clear all last locations for all providers.
                // This is to be on the safe side in case a provider has location derived from
                // this disabled provider.
                mLastLocation.clear();
                mLastLocationCoarseInterval.clear();
                changesMade = true;
            } else if (!isEnabled && shouldBeEnabled) {
                updateProviderListenersLocked(name, true, mCurrentUserId);