AI 144415: am: CL 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 Original author: lockwood Automated import of CL 144415
This commit is contained in:
committed by
The Android Open Source Project
parent
75e3034a35
commit
bd2a7126e5
@@ -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,
|
||||
|
||||
@@ -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