LocationManager: Hide location provider and geocode provider APIs.
Also rename Geocoder.isImplemented() to Geocoder.isPresent() BUG: 3000738 BUG: 3001413 Change-Id: I56bb4e9a9c59f8b79de585eeb168f74c3ff1a853 Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
@@ -41,7 +41,7 @@ import java.util.List;
|
||||
* The Geocoder class requires a backend service that is not included in
|
||||
* the core android framework. The Geocoder query methods will return an
|
||||
* empty list if there no backend service in the platform. Use the
|
||||
* isImplemented() method to determine whether a Geocoder implementation
|
||||
* isPresent() method to determine whether a Geocoder implementation
|
||||
* exists.
|
||||
*/
|
||||
public final class Geocoder {
|
||||
@@ -56,13 +56,13 @@ public final class Geocoder {
|
||||
* connectivity may still cause these methods to return null or
|
||||
* empty lists.
|
||||
*/
|
||||
public static Boolean isImplemented() {
|
||||
public static boolean isPresent() {
|
||||
IBinder b = ServiceManager.getService(Context.LOCATION_SERVICE);
|
||||
ILocationManager lm = ILocationManager.Stub.asInterface(b);
|
||||
try {
|
||||
return lm.geocoderIsImplemented();
|
||||
return lm.geocoderIsPresent();
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "isImplemented: got RemoteException", e);
|
||||
Log.e(TAG, "isPresent: got RemoteException", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user