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

Commit 7f4d8293 authored by David Christie's avatar David Christie Committed by Android Git Automerger
Browse files

am 6826387e: DO NOT MERGE: Clear cached locations when location providers disabled Bug: 12118307

* commit '6826387e':
  DO NOT MERGE: Clear cached locations when location providers disabled Bug: 12118307
parents ef4694cb 6826387e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -918,6 +918,10 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
            boolean shouldBeEnabled = isAllowedBySettingsLocked(name, mCurrentUserId);
            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();
                changesMade = true;
            } else if (!isEnabled && shouldBeEnabled) {
                updateProviderListenersLocked(name, true, mCurrentUserId);