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:
committed by
The Android Open Source Project
parent
f80f5d02ed
commit
9637d47489
@@ -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:
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user