diff options
Diffstat (limited to 'services/java/com/android/server/LocationManagerService.java')
| -rw-r--r-- | services/java/com/android/server/LocationManagerService.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java index 8c1581c..dfec427 100644 --- a/services/java/com/android/server/LocationManagerService.java +++ b/services/java/com/android/server/LocationManagerService.java @@ -982,6 +982,10 @@ public class LocationManagerService extends ILocationManager.Stub implements Run boolean shouldBeEnabled = isAllowedBySettingsLocked(name); if (isEnabled && !shouldBeEnabled) { updateProviderListenersLocked(name, false); + // 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. + mLastKnownLocation.clear(); changesMade = true; } else if (!isEnabled && shouldBeEnabled) { updateProviderListenersLocked(name, true); |
