diff options
author | Daniel Cashman <dcashman@google.com> | 2014-01-13 19:00:37 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-01-13 19:00:37 +0000 |
commit | 94827c3484da6f0a9cd171e6892d2710b1eafa12 (patch) | |
tree | 7825b581f0c34f07f89f566e3c341ca5c01ab2e3 /services | |
parent | 38c65b1f70042bc8e37e91106692158f0ce98703 (diff) | |
parent | 21a801d0885d65f128b84a593140b07fd0d4e980 (diff) | |
download | frameworks_base-94827c3484da6f0a9cd171e6892d2710b1eafa12.zip frameworks_base-94827c3484da6f0a9cd171e6892d2710b1eafa12.tar.gz frameworks_base-94827c3484da6f0a9cd171e6892d2710b1eafa12.tar.bz2 |
am 21a801d0: am 0d30e07d: am 3d5ea26f: am 4503409a: Merge "Clear cached locations when location providers disabled Bug: 12118307" into klp-dev
* commit '21a801d0885d65f128b84a593140b07fd0d4e980':
Clear cached locations when location providers disabled Bug: 12118307
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/LocationManagerService.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/LocationManagerService.java b/services/core/java/com/android/server/LocationManagerService.java index 8f480dd..eebd1c5 100644 --- a/services/core/java/com/android/server/LocationManagerService.java +++ b/services/core/java/com/android/server/LocationManagerService.java @@ -1148,6 +1148,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); |