diff options
author | Mike Lockwood <> | 2009-04-02 21:41:57 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-04-02 21:41:57 -0700 |
commit | 9637d474899d9725da8a41fdf92b9bd1a15d301e (patch) | |
tree | 5383ecf1ab4bd1e34df329c276309b29dc8ef225 /location | |
parent | f80f5d02ed5793d1a9bf6f69885fa3c509e7d312 (diff) | |
download | frameworks_base-9637d474899d9725da8a41fdf92b9bd1a15d301e.zip frameworks_base-9637d474899d9725da8a41fdf92b9bd1a15d301e.tar.gz frameworks_base-9637d474899d9725da8a41fdf92b9bd1a15d301e.tar.bz2 |
AI 144372: Cleanup Settings support for enabling and disabling location providers:
LocationManagerService now listens for changes to settings,
making LocationManager.updateProviders() unnecessary.
Removed LocationManager.updateProviders()
Added Settings.Secure.setLocationProviderEnabled(), which is a thread-safe way
of enabling or disabling a single location provider.
This is safer than reading, modifying and writing the LOCATION_PROVIDERS_ALLOWED directly.
BUG=1729031
Automated import of CL 144372
Diffstat (limited to 'location')
-rw-r--r-- | location/java/android/location/ILocationManager.aidl | 2 | ||||
-rw-r--r-- | location/java/android/location/LocationManager.java | 14 |
2 files changed, 0 insertions, 16 deletions
diff --git a/location/java/android/location/ILocationManager.aidl b/location/java/android/location/ILocationManager.aidl index 69c404a..d0f9877 100644 --- a/location/java/android/location/ILocationManager.aidl +++ b/location/java/android/location/ILocationManager.aidl @@ -33,8 +33,6 @@ interface ILocationManager List getAllProviders(); List getProviders(boolean enabledOnly); - void updateProviders(); - void requestLocationUpdates(String provider, long minTime, float minDistance, in ILocationListener listener); void requestLocationUpdatesPI(String provider, long minTime, float minDistance, diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java index 022ee25..0c7254e 100644 --- a/location/java/android/location/LocationManager.java +++ b/location/java/android/location/LocationManager.java @@ -313,20 +313,6 @@ public class LocationManager { } /** - * Propagates the enabled/disabled state of the providers from the system - * settings to the providers themselves. - * - * {@hide} - */ - public void updateProviders() { - try { - mService.updateProviders(); - } catch (RemoteException ex) { - Log.e(TAG, "updateProviders: RemoteException", ex); - } - } - - /** * Returns the next looser power requirement, in the sequence: * * POWER_LOW -> POWER_MEDIUM -> POWER_HIGH -> NO_REQUIREMENT |