Add Geocorder.isImplemented()
The Geocorder interface is not part of the Android core. It requires a backend service which may or may not be available on a device. The new isImplemented static method allows apps to discover whether the Geocorder is in fact available on the device. Change-Id: I2b5cf7bcc9cce4766bcbb156e91edf34b01f9296
This commit is contained in:
@@ -1940,6 +1940,10 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
|
||||
|
||||
// Geocoder
|
||||
|
||||
public Boolean geocoderIsImplemented() {
|
||||
return mGeocodeProvider != null;
|
||||
}
|
||||
|
||||
public String getFromLocation(double latitude, double longitude, int maxResults,
|
||||
GeocoderParams params, List<Address> addrs) {
|
||||
if (mGeocodeProvider != null) {
|
||||
|
||||
Reference in New Issue
Block a user