summaryrefslogtreecommitdiffstats
path: root/services/java
diff options
context:
space:
mode:
authorDavid Christie <dnchrist@google.com>2014-01-10 12:53:41 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2014-01-10 12:53:41 -0800
commitbc39746ee9c5962538a96b3edff10e52eb00fc40 (patch)
treed6fc1954276e2e2dbd80cc2744d1a9e8e0edab3f /services/java
parent43253333d24e856a7ffef818fdfaedf3fd60d3b6 (diff)
parent8e0c7768c87014fef277df84c737dd6c37fb8866 (diff)
downloadframeworks_base-bc39746ee9c5962538a96b3edff10e52eb00fc40.zip
frameworks_base-bc39746ee9c5962538a96b3edff10e52eb00fc40.tar.gz
frameworks_base-bc39746ee9c5962538a96b3edff10e52eb00fc40.tar.bz2
am 8e0c7768: DO NOT MERGE: Clear cached locations when location providers disabled Bug: 12118307
* commit '8e0c7768c87014fef277df84c737dd6c37fb8866': DO NOT MERGE: Clear cached locations when location providers disabled Bug: 12118307
Diffstat (limited to 'services/java')
-rw-r--r--services/java/com/android/server/LocationManagerService.java4
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);