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

Commit 9ecadd7c authored by Daniel Cashman's avatar Daniel Cashman Committed by Android Git Automerger
Browse files

am 6f34b938: am 3238d0d9: Merge "Clear cached locations when location...

am 6f34b938: am 3238d0d9: Merge "Clear cached locations when location providers disabled Bug: 12118307" into jb-mr2-dev

* commit '6f34b938':
  Clear cached locations when location providers disabled Bug: 12118307
parents c454bbe8 6f34b938
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -1019,6 +1019,11 @@ public class LocationManagerService extends ILocationManager.Stub {
            boolean shouldBeEnabled = isAllowedByCurrentUserSettingsLocked(name);
            boolean shouldBeEnabled = isAllowedByCurrentUserSettingsLocked(name);
            if (isEnabled && !shouldBeEnabled) {
            if (isEnabled && !shouldBeEnabled) {
                updateProviderListenersLocked(name, false, mCurrentUserId);
                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;
                changesMade = true;
            } else if (!isEnabled && shouldBeEnabled) {
            } else if (!isEnabled && shouldBeEnabled) {
                updateProviderListenersLocked(name, true, mCurrentUserId);
                updateProviderListenersLocked(name, true, mCurrentUserId);