From 71677f84e7705aa48b04829538b954a13cd11dec Mon Sep 17 00:00:00 2001 From: Mike Lockwood Date: Fri, 21 May 2010 14:03:45 -0400 Subject: [PATCH] Unhide new location manager APIs: Criteria.java LocationManager.java New APIs for criteria based location requests and single shot support. GeocoderParams.java GeocodeProvider.java LocationProvider.java APIs for network location unbundling. Change-Id: I3311fa01ce76fe4cba3537617e5b1c8d1f1d42b7 Signed-off-by: Mike Lockwood --- api/current.xml | 776 ++++++++++++++++++ location/java/android/location/Criteria.java | 19 - .../java/android/location/GeocoderParams.java | 2 - .../android/location/LocationManager.java | 12 - .../location/provider/GeocodeProvider.java | 2 - .../location/provider/LocationProvider.java | 2 - 6 files changed, 776 insertions(+), 37 deletions(-) diff --git a/api/current.xml b/api/current.xml index 54cd3fb607139..3e3703564a8a4 100644 --- a/api/current.xml +++ b/api/current.xml @@ -81605,6 +81605,28 @@ visibility="public" > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -83088,6 +83397,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ACCURACY_BEST) { @@ -181,7 +171,6 @@ public class Criteria implements Parcelable { * Returns a constant indicating the desired horizontal accuracy (latitude and longitude). * Accuracy may be {@link #ACCURACY_LOW}, {@link #ACCURACY_MEDIUM}, * {@link #ACCURACY_HIGH}, {@link #ACCURACY_BEST}, - * {@hide} */ public int getHorizontalAccuracy() { return mHorizontalAccuracy; @@ -194,7 +183,6 @@ public class Criteria implements Parcelable { * More accurate location may consume more power and may take longer. * * @throws IllegalArgumentException if accuracy is not one of the supported constants - * {@hide} */ public void setVerticalAccuracy(int accuracy) { if (accuracy < NO_REQUIREMENT || accuracy > ACCURACY_BEST) { @@ -207,7 +195,6 @@ public class Criteria implements Parcelable { * Returns a constant indicating the desired vertical accuracy (altitude). * Accuracy may be {@link #ACCURACY_LOW}, {@link #ACCURACY_MEDIUM}, * {@link #ACCURACY_HIGH}, {@link #ACCURACY_BEST}, - * {@hide} */ public int getVerticalAccuracy() { return mVerticalAccuracy; @@ -220,7 +207,6 @@ public class Criteria implements Parcelable { * More accurate location may consume more power and may take longer. * * @throws IllegalArgumentException if accuracy is not one of the supported constants - * {@hide} */ public void setSpeedAccuracy(int accuracy) { if (accuracy < NO_REQUIREMENT || accuracy > ACCURACY_BEST) { @@ -233,7 +219,6 @@ public class Criteria implements Parcelable { * Returns a constant indicating the desired speed accuracy * Accuracy may be {@link #ACCURACY_LOW}, {@link #ACCURACY_MEDIUM}, * {@link #ACCURACY_HIGH}, {@link #ACCURACY_BEST}, - * {@hide} */ public int getSpeedAccuracy() { return mSpeedAccuracy; @@ -246,7 +231,6 @@ public class Criteria implements Parcelable { * More accurate location may consume more power and may take longer. * * @throws IllegalArgumentException if accuracy is not one of the supported constants - * {@hide} */ public void setBearingAccuracy(int accuracy) { if (accuracy < NO_REQUIREMENT || accuracy > ACCURACY_BEST) { @@ -259,7 +243,6 @@ public class Criteria implements Parcelable { * Returns a constant indicating the desired bearing accuracy. * Accuracy may be {@link #ACCURACY_LOW}, {@link #ACCURACY_MEDIUM}, * {@link #ACCURACY_HIGH}, {@link #ACCURACY_BEST}, - * {@hide} */ public int getBearingAccuracy() { return mBearingAccuracy; @@ -277,7 +260,6 @@ public class Criteria implements Parcelable { * {@link #HORIZONTAL_ACCURACY_PRIORITY}, {@link #POWER_REQUIREMENT_PRIORITY}, * {@link #VERTICAL_ACCURACY_PRIORITY}, {@link #SPEED_ACCURACY_PRIORITY}, * {@link #BEARING_ACCURACY_PRIORITY}. - * {@hide} */ public void setPreferredPriority(int priority) { if (priority < HORIZONTAL_ACCURACY_PRIORITY || priority > POWER_REQUIREMENT_PRIORITY) { @@ -292,7 +274,6 @@ public class Criteria implements Parcelable { * The value can be {@link #HORIZONTAL_ACCURACY_PRIORITY}, * {@link #VERTICAL_ACCURACY_PRIORITY}, {@link #SPEED_ACCURACY_PRIORITY}, * {@link #BEARING_ACCURACY_PRIORITY} or {@link #POWER_REQUIREMENT_PRIORITY}. - * {@hide} */ public int getPriority() { return mPriority; diff --git a/location/java/android/location/GeocoderParams.java b/location/java/android/location/GeocoderParams.java index 174fe3e0af2ee..8b8e63b2c98af 100644 --- a/location/java/android/location/GeocoderParams.java +++ b/location/java/android/location/GeocoderParams.java @@ -29,8 +29,6 @@ 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; diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java index 11beadc1951bb..7d07e4b222a6e 100644 --- a/location/java/android/location/LocationManager.java +++ b/location/java/android/location/LocationManager.java @@ -545,8 +545,6 @@ public class LocationManager { * @throws IllegalArgumentException if listener is null * @throws SecurityException if no suitable permission is present to access * the location services. - * - * {@hide} */ public void requestLocationUpdates(long minTime, float minDistance, Criteria criteria, LocationListener listener, Looper looper) { @@ -683,8 +681,6 @@ public class LocationManager { * @throws IllegalArgumentException if provider is null or doesn't exist * @throws IllegalArgumentException if intent is null * @throws SecurityException if no suitable permission is present for the provider. - * - * {@hide} */ public void requestLocationUpdates(long minTime, float minDistance, Criteria criteria, PendingIntent intent) { if (criteria == null) { @@ -740,8 +736,6 @@ public class LocationManager { * @throws IllegalArgumentException if provider is null or doesn't exist * @throws IllegalArgumentException if listener is null * @throws SecurityException if no suitable permission is present for the provider. - * - * {@hide} */ public void requestSingleUpdate(String provider, LocationListener listener, Looper looper) { if (provider == null) { @@ -783,8 +777,6 @@ public class LocationManager { * @throws IllegalArgumentException if listener is null * @throws SecurityException if no suitable permission is present to access * the location services. - * - * {@hide} */ public void requestSingleUpdate(Criteria criteria, LocationListener listener, Looper looper) { if (criteria == null) { @@ -813,8 +805,6 @@ public class LocationManager { * @throws IllegalArgumentException if provider is null or doesn't exist * @throws IllegalArgumentException if intent is null * @throws SecurityException if no suitable permission is present for the provider. - * - * {@hide} */ public void requestSingleUpdate(String provider, PendingIntent intent) { if (provider == null) { @@ -844,8 +834,6 @@ public class LocationManager { * @throws IllegalArgumentException if provider is null or doesn't exist * @throws IllegalArgumentException if intent is null * @throws SecurityException if no suitable permission is present for the provider. - * - * {@hide} */ public void requestSingleUpdate(Criteria criteria, PendingIntent intent) { if (criteria == null) { diff --git a/location/java/android/location/provider/GeocodeProvider.java b/location/java/android/location/provider/GeocodeProvider.java index 86376a72d46f6..db5c078e94afe 100644 --- a/location/java/android/location/provider/GeocodeProvider.java +++ b/location/java/android/location/provider/GeocodeProvider.java @@ -29,8 +29,6 @@ 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 { diff --git a/location/java/android/location/provider/LocationProvider.java b/location/java/android/location/provider/LocationProvider.java index 1b5675d61d840..5771363ddae3f 100644 --- a/location/java/android/location/provider/LocationProvider.java +++ b/location/java/android/location/provider/LocationProvider.java @@ -33,8 +33,6 @@ 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 {