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
This commit is contained in:
Mike Lockwood
2009-04-02 21:41:57 -07:00
committed by The Android Open Source Project
parent f80f5d02ed
commit 9637d47489
5 changed files with 138 additions and 22 deletions

View File

@@ -312,20 +312,6 @@ public class LocationManager {
return goodProviders;
}
/**
* 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:
*