Skip to content

Commit 7ab7f53

Browse files
committed
Hide new location APIs and undeprecate old ones
Hide all new location APIs related to LocationRequest/Geofence and undeprecate all deprecated APIs consequently to the LocationRequest and Geofence introduction. Also introduce LocationRequestUnbundled for LocationProviders to use. Change-Id: I5b116c7d342041f45b341c88a4b6813571118018
1 parent 465c375 commit 7ab7f53

File tree

11 files changed

+241
-306
lines changed

11 files changed

+241
-306
lines changed

api/17.txt

Lines changed: 36 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -10586,7 +10586,7 @@ package android.location {
1058610586
field public static final android.os.Parcelable.Creator CREATOR;
1058710587
}
1058810588

10589-
public deprecated class Criteria implements android.os.Parcelable {
10589+
public class Criteria implements android.os.Parcelable {
1059010590
ctor public Criteria();
1059110591
ctor public Criteria(android.location.Criteria);
1059210592
method public int describeContents();
@@ -10632,13 +10632,6 @@ package android.location {
1063210632
method public static boolean isPresent();
1063310633
}
1063410634

10635-
public final class Geofence implements android.os.Parcelable {
10636-
method public static android.location.Geofence createCircle(double, double, float);
10637-
method public int describeContents();
10638-
method public void writeToParcel(android.os.Parcel, int);
10639-
field public static final android.os.Parcelable.Creator CREATOR;
10640-
}
10641-
1064210635
public final class GpsSatellite {
1064310636
method public float getAzimuth();
1064410637
method public float getElevation();
@@ -10684,7 +10677,7 @@ package android.location {
1068410677
method public android.os.Bundle getExtras();
1068510678
method public double getLatitude();
1068610679
method public double getLongitude();
10687-
method public deprecated java.lang.String getProvider();
10680+
method public java.lang.String getProvider();
1068810681
method public float getSpeed();
1068910682
method public long getTime();
1069010683
method public boolean hasAccuracy();
@@ -10722,57 +10715,51 @@ package android.location {
1072210715
}
1072310716

1072410717
public class LocationManager {
10725-
method public void addGeofence(android.location.LocationRequest, android.location.Geofence, android.app.PendingIntent);
1072610718
method public boolean addGpsStatusListener(android.location.GpsStatus.Listener);
1072710719
method public boolean addNmeaListener(android.location.GpsStatus.NmeaListener);
10728-
method public deprecated void addProximityAlert(double, double, float, long, android.app.PendingIntent);
10729-
method public deprecated void addTestProvider(java.lang.String, boolean, boolean, boolean, boolean, boolean, boolean, boolean, int, int);
10730-
method public deprecated void clearTestProviderEnabled(java.lang.String);
10731-
method public deprecated void clearTestProviderLocation(java.lang.String);
10732-
method public deprecated void clearTestProviderStatus(java.lang.String);
10733-
method public deprecated java.util.List<java.lang.String> getAllProviders();
10734-
method public deprecated java.lang.String getBestProvider(android.location.Criteria, boolean);
10720+
method public void addProximityAlert(double, double, float, long, android.app.PendingIntent);
10721+
method public void addTestProvider(java.lang.String, boolean, boolean, boolean, boolean, boolean, boolean, boolean, int, int);
10722+
method public void clearTestProviderEnabled(java.lang.String);
10723+
method public void clearTestProviderLocation(java.lang.String);
10724+
method public void clearTestProviderStatus(java.lang.String);
10725+
method public java.util.List<java.lang.String> getAllProviders();
10726+
method public java.lang.String getBestProvider(android.location.Criteria, boolean);
1073510727
method public android.location.GpsStatus getGpsStatus(android.location.GpsStatus);
10736-
method public deprecated android.location.Location getLastKnownLocation(java.lang.String);
10737-
method public android.location.Location getLastLocation();
10738-
method public deprecated android.location.LocationProvider getProvider(java.lang.String);
10739-
method public deprecated java.util.List<java.lang.String> getProviders(boolean);
10740-
method public deprecated java.util.List<java.lang.String> getProviders(android.location.Criteria, boolean);
10741-
method public deprecated boolean isProviderEnabled(java.lang.String);
10742-
method public void removeAllGeofences(android.app.PendingIntent);
10743-
method public void removeGeofence(android.location.Geofence, android.app.PendingIntent);
10728+
method public android.location.Location getLastKnownLocation(java.lang.String);
10729+
method public android.location.LocationProvider getProvider(java.lang.String);
10730+
method public java.util.List<java.lang.String> getProviders(boolean);
10731+
method public java.util.List<java.lang.String> getProviders(android.location.Criteria, boolean);
10732+
method public boolean isProviderEnabled(java.lang.String);
1074410733
method public void removeGpsStatusListener(android.location.GpsStatus.Listener);
1074510734
method public void removeNmeaListener(android.location.GpsStatus.NmeaListener);
10746-
method public deprecated void removeProximityAlert(android.app.PendingIntent);
10747-
method public deprecated void removeTestProvider(java.lang.String);
10735+
method public void removeProximityAlert(android.app.PendingIntent);
10736+
method public void removeTestProvider(java.lang.String);
1074810737
method public void removeUpdates(android.location.LocationListener);
1074910738
method public void removeUpdates(android.app.PendingIntent);
10750-
method public deprecated void requestLocationUpdates(java.lang.String, long, float, android.location.LocationListener);
10751-
method public deprecated void requestLocationUpdates(java.lang.String, long, float, android.location.LocationListener, android.os.Looper);
10752-
method public deprecated void requestLocationUpdates(long, float, android.location.Criteria, android.location.LocationListener, android.os.Looper);
10753-
method public deprecated void requestLocationUpdates(java.lang.String, long, float, android.app.PendingIntent);
10754-
method public deprecated void requestLocationUpdates(long, float, android.location.Criteria, android.app.PendingIntent);
10755-
method public void requestLocationUpdates(android.location.LocationRequest, android.location.LocationListener, android.os.Looper);
10756-
method public void requestLocationUpdates(android.location.LocationRequest, android.app.PendingIntent);
10757-
method public deprecated void requestSingleUpdate(java.lang.String, android.location.LocationListener, android.os.Looper);
10758-
method public deprecated void requestSingleUpdate(android.location.Criteria, android.location.LocationListener, android.os.Looper);
10759-
method public deprecated void requestSingleUpdate(java.lang.String, android.app.PendingIntent);
10760-
method public deprecated void requestSingleUpdate(android.location.Criteria, android.app.PendingIntent);
10761-
method public deprecated boolean sendExtraCommand(java.lang.String, java.lang.String, android.os.Bundle);
10762-
method public deprecated void setTestProviderEnabled(java.lang.String, boolean);
10763-
method public deprecated void setTestProviderLocation(java.lang.String, android.location.Location);
10764-
method public deprecated void setTestProviderStatus(java.lang.String, int, android.os.Bundle, long);
10765-
field public static final deprecated java.lang.String GPS_PROVIDER = "gps";
10739+
method public void requestLocationUpdates(java.lang.String, long, float, android.location.LocationListener);
10740+
method public void requestLocationUpdates(java.lang.String, long, float, android.location.LocationListener, android.os.Looper);
10741+
method public void requestLocationUpdates(long, float, android.location.Criteria, android.location.LocationListener, android.os.Looper);
10742+
method public void requestLocationUpdates(java.lang.String, long, float, android.app.PendingIntent);
10743+
method public void requestLocationUpdates(long, float, android.location.Criteria, android.app.PendingIntent);
10744+
method public void requestSingleUpdate(java.lang.String, android.location.LocationListener, android.os.Looper);
10745+
method public void requestSingleUpdate(android.location.Criteria, android.location.LocationListener, android.os.Looper);
10746+
method public void requestSingleUpdate(java.lang.String, android.app.PendingIntent);
10747+
method public void requestSingleUpdate(android.location.Criteria, android.app.PendingIntent);
10748+
method public boolean sendExtraCommand(java.lang.String, java.lang.String, android.os.Bundle);
10749+
method public void setTestProviderEnabled(java.lang.String, boolean);
10750+
method public void setTestProviderLocation(java.lang.String, android.location.Location);
10751+
method public void setTestProviderStatus(java.lang.String, int, android.os.Bundle, long);
10752+
field public static final java.lang.String GPS_PROVIDER = "gps";
1076610753
field public static final java.lang.String KEY_LOCATION_CHANGED = "location";
10767-
field public static final deprecated java.lang.String KEY_PROVIDER_ENABLED = "providerEnabled";
10754+
field public static final java.lang.String KEY_PROVIDER_ENABLED = "providerEnabled";
1076810755
field public static final java.lang.String KEY_PROXIMITY_ENTERING = "entering";
10769-
field public static final deprecated java.lang.String KEY_STATUS_CHANGED = "status";
10770-
field public static final deprecated java.lang.String NETWORK_PROVIDER = "network";
10771-
field public static final deprecated java.lang.String PASSIVE_PROVIDER = "passive";
10772-
field public static final deprecated java.lang.String PROVIDERS_CHANGED_ACTION = "android.location.PROVIDERS_CHANGED";
10756+
field public static final java.lang.String KEY_STATUS_CHANGED = "status";
10757+
field public static final java.lang.String NETWORK_PROVIDER = "network";
10758+
field public static final java.lang.String PASSIVE_PROVIDER = "passive";
10759+
field public static final java.lang.String PROVIDERS_CHANGED_ACTION = "android.location.PROVIDERS_CHANGED";
1077310760
}
1077410761

10775-
public deprecated class LocationProvider {
10762+
public class LocationProvider {
1077610763
method public int getAccuracy();
1077710764
method public java.lang.String getName();
1077810765
method public int getPowerRequirement();
@@ -10789,30 +10776,6 @@ package android.location {
1078910776
field public static final int TEMPORARILY_UNAVAILABLE = 1; // 0x1
1079010777
}
1079110778

10792-
public final class LocationRequest implements android.os.Parcelable {
10793-
method public static android.location.LocationRequest create();
10794-
method public int describeContents();
10795-
method public long getExpireAt();
10796-
method public long getFastestInterval();
10797-
method public long getInterval();
10798-
method public int getNumUpdates();
10799-
method public int getQuality();
10800-
method public android.location.LocationRequest setExpireAt(long);
10801-
method public android.location.LocationRequest setExpireIn(long);
10802-
method public android.location.LocationRequest setFastestInterval(long);
10803-
method public android.location.LocationRequest setInterval(long);
10804-
method public android.location.LocationRequest setNumUpdates(int);
10805-
method public android.location.LocationRequest setQuality(int);
10806-
method public void writeToParcel(android.os.Parcel, int);
10807-
field public static final int ACCURACY_BLOCK = 102; // 0x66
10808-
field public static final int ACCURACY_CITY = 104; // 0x68
10809-
field public static final int ACCURACY_FINE = 100; // 0x64
10810-
field public static final android.os.Parcelable.Creator CREATOR;
10811-
field public static final int POWER_HIGH = 203; // 0xcb
10812-
field public static final int POWER_LOW = 201; // 0xc9
10813-
field public static final int POWER_NONE = 200; // 0xc8
10814-
}
10815-
1081610779
}
1081710780

1081810781
package android.media {

0 commit comments

Comments
 (0)