diff options
| author | David Christie <dnchrist@google.com> | 2014-01-10 12:53:41 -0800 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2014-01-10 12:53:41 -0800 |
| commit | bc39746ee9c5962538a96b3edff10e52eb00fc40 (patch) | |
| tree | d6fc1954276e2e2dbd80cc2744d1a9e8e0edab3f /services/java | |
| parent | 43253333d24e856a7ffef818fdfaedf3fd60d3b6 (diff) | |
| parent | 8e0c7768c87014fef277df84c737dd6c37fb8866 (diff) | |
| download | frameworks_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.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); |
