Merge "LocationManager: Hide location provider and geocode provider APIs." into gingerbread

This commit is contained in:
Mike Lockwood
2010-09-20 17:16:03 -07:00
committed by Android (Google) Code Review
7 changed files with 14 additions and 467 deletions

View File

@@ -82537,8 +82537,8 @@
<exception name="IOException" type="java.io.IOException">
</exception>
</method>
<method name="isImplemented"
return="java.lang.Boolean"
<method name="isPresent"
return="boolean"
abstract="false"
native="false"
synchronized="false"
@@ -82549,75 +82549,6 @@
>
</method>
</class>
<class name="GeocoderParams"
extends="java.lang.Object"
abstract="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<implements name="android.os.Parcelable">
</implements>
<method name="describeContents"
return="int"
abstract="false"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
</method>
<method name="getClientPackage"
return="java.lang.String"
abstract="false"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
</method>
<method name="getLocale"
return="java.util.Locale"
abstract="false"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
</method>
<method name="writeToParcel"
return="void"
abstract="false"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="parcel" type="android.os.Parcel">
</parameter>
<parameter name="flags" type="int">
</parameter>
</method>
<field name="CREATOR"
type="android.os.Parcelable.Creator"
transient="false"
volatile="false"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
</class>
<class name="GpsSatellite"
extends="java.lang.Object"
abstract="false"
@@ -84209,396 +84140,6 @@
</field>
</class>
</package>
<package name="android.location.provider"
>
<class name="GeocodeProvider"
extends="java.lang.Object"
abstract="true"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<constructor name="GeocodeProvider"
type="android.location.provider.GeocodeProvider"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
</constructor>
<method name="getBinder"
return="android.os.IBinder"
abstract="false"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
</method>
<method name="onGetFromLocation"
return="java.lang.String"
abstract="true"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="latitude" type="double">
</parameter>
<parameter name="longitude" type="double">
</parameter>
<parameter name="maxResults" type="int">
</parameter>
<parameter name="params" type="android.location.GeocoderParams">
</parameter>
<parameter name="addrs" type="java.util.List&lt;android.location.Address&gt;">
</parameter>
</method>
<method name="onGetFromLocationName"
return="java.lang.String"
abstract="true"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="locationName" type="java.lang.String">
</parameter>
<parameter name="lowerLeftLatitude" type="double">
</parameter>
<parameter name="lowerLeftLongitude" type="double">
</parameter>
<parameter name="upperRightLatitude" type="double">
</parameter>
<parameter name="upperRightLongitude" type="double">
</parameter>
<parameter name="maxResults" type="int">
</parameter>
<parameter name="params" type="android.location.GeocoderParams">
</parameter>
<parameter name="addrs" type="java.util.List&lt;android.location.Address&gt;">
</parameter>
</method>
</class>
<class name="LocationProvider"
extends="java.lang.Object"
abstract="true"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<constructor name="LocationProvider"
type="android.location.provider.LocationProvider"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
</constructor>
<method name="getBinder"
return="android.os.IBinder"
abstract="false"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
</method>
<method name="onAddListener"
return="void"
abstract="true"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="uid" type="int">
</parameter>
<parameter name="ws" type="android.os.WorkSource">
</parameter>
</method>
<method name="onDisable"
return="void"
abstract="true"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
</method>
<method name="onEnable"
return="void"
abstract="true"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
</method>
<method name="onEnableLocationTracking"
return="void"
abstract="true"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="enable" type="boolean">
</parameter>
</method>
<method name="onGetAccuracy"
return="int"
abstract="true"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
</method>
<method name="onGetInternalState"
return="java.lang.String"
abstract="true"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
</method>
<method name="onGetPowerRequirement"
return="int"
abstract="true"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
</method>
<method name="onGetStatus"
return="int"
abstract="true"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="extras" type="android.os.Bundle">
</parameter>
</method>
<method name="onGetStatusUpdateTime"
return="long"
abstract="true"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
</method>
<method name="onHasMonetaryCost"
return="boolean"
abstract="true"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
</method>
<method name="onMeetsCriteria"
return="boolean"
abstract="true"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="criteria" type="android.location.Criteria">
</parameter>
</method>
<method name="onRemoveListener"
return="void"
abstract="true"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="uid" type="int">
</parameter>
<parameter name="ws" type="android.os.WorkSource">
</parameter>
</method>
<method name="onRequiresCell"
return="boolean"
abstract="true"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
</method>
<method name="onRequiresNetwork"
return="boolean"
abstract="true"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
</method>
<method name="onRequiresSatellite"
return="boolean"
abstract="true"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
</method>
<method name="onSendExtraCommand"
return="boolean"
abstract="true"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="command" type="java.lang.String">
</parameter>
<parameter name="extras" type="android.os.Bundle">
</parameter>
</method>
<method name="onSetMinTime"
return="void"
abstract="true"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="minTime" type="long">
</parameter>
<parameter name="ws" type="android.os.WorkSource">
</parameter>
</method>
<method name="onSupportsAltitude"
return="boolean"
abstract="true"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
</method>
<method name="onSupportsBearing"
return="boolean"
abstract="true"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
</method>
<method name="onSupportsSpeed"
return="boolean"
abstract="true"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
</method>
<method name="onUpdateLocation"
return="void"
abstract="true"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="location" type="android.location.Location">
</parameter>
</method>
<method name="onUpdateNetworkState"
return="void"
abstract="true"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="state" type="int">
</parameter>
<parameter name="info" type="android.net.NetworkInfo">
</parameter>
</method>
<method name="reportLocation"
return="void"
abstract="false"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="location" type="android.location.Location">
</parameter>
</method>
</class>
</package>
<package name="android.media"
>
<class name="AsyncPlayer"

View File

@@ -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;
}
}

View File

@@ -29,6 +29,8 @@ import java.util.Locale;
* as well as the Geocoder client's package name for geocoder server
* logging. This information is kept in a separate class to allow for
* future expansion of the IGeocodeProvider interface.
*
* @hide
*/
public class GeocoderParams implements Parcelable {
private Locale mLocale;

View File

@@ -67,7 +67,7 @@ interface ILocationManager
// it need not be shared with other providers.
void reportLocation(in Location location, boolean passive);
boolean geocoderIsImplemented();
boolean geocoderIsPresent();
String getFromLocation(double latitude, double longitude, int maxResults,
in GeocoderParams params, out List<Address> addrs);
String getFromLocationName(String locationName,

View File

@@ -29,6 +29,8 @@ import java.util.List;
* outside of the core android platform.
* Geocode providers can be implemented as services and return the result of
* {@link GeocodeProvider#getBinder()} in its getBinder() method.
*
* @hide
*/
public abstract class GeocodeProvider {

View File

@@ -34,6 +34,8 @@ import android.util.Log;
* outside of the core android platform.
* Location providers can be implemented as services and return the result of
* {@link LocationProvider#getBinder()} in its getBinder() method.
*
* @hide
*/
public abstract class LocationProvider {

View File

@@ -1959,7 +1959,7 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
// Geocoder
public boolean geocoderIsImplemented() {
public boolean geocoderIsPresent() {
return mGeocodeProvider != null;
}