Skip to content

Commit 4e31c4f

Browse files
author
Nick Pelly
committed
Add javadoc for new location API's.
Change-Id: If15024ee88421c07ba3a174747774fc451fd002e
1 parent 74fa7ea commit 4e31c4f

File tree

8 files changed

+840
-517
lines changed

8 files changed

+840
-517
lines changed

api/current.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10549,7 +10549,7 @@ package android.location {
1054910549
method public android.os.Bundle getExtras();
1055010550
method public double getLatitude();
1055110551
method public double getLongitude();
10552-
method public java.lang.String getProvider();
10552+
method public deprecated java.lang.String getProvider();
1055310553
method public float getSpeed();
1055410554
method public long getTime();
1055510555
method public boolean hasAccuracy();
@@ -10587,6 +10587,7 @@ package android.location {
1058710587
}
1058810588

1058910589
public class LocationManager {
10590+
method public void addGeofence(android.location.LocationRequest, android.location.Geofence, android.app.PendingIntent);
1059010591
method public boolean addGpsStatusListener(android.location.GpsStatus.Listener);
1059110592
method public boolean addNmeaListener(android.location.GpsStatus.NmeaListener);
1059210593
method public deprecated void addProximityAlert(double, double, float, long, android.app.PendingIntent);
@@ -10598,7 +10599,7 @@ package android.location {
1059810599
method public deprecated java.lang.String getBestProvider(android.location.Criteria, boolean);
1059910600
method public android.location.GpsStatus getGpsStatus(android.location.GpsStatus);
1060010601
method public deprecated android.location.Location getLastKnownLocation(java.lang.String);
10601-
method public android.location.Location getLastLocation(android.location.LocationRequest);
10602+
method public android.location.Location getLastLocation();
1060210603
method public deprecated android.location.LocationProvider getProvider(java.lang.String);
1060310604
method public deprecated java.util.List<java.lang.String> getProviders(boolean);
1060410605
method public deprecated java.util.List<java.lang.String> getProviders(android.location.Criteria, boolean);
@@ -10611,7 +10612,6 @@ package android.location {
1061110612
method public deprecated void removeTestProvider(java.lang.String);
1061210613
method public void removeUpdates(android.location.LocationListener);
1061310614
method public void removeUpdates(android.app.PendingIntent);
10614-
method public void requestGeofence(android.location.LocationRequest, android.location.Geofence, android.app.PendingIntent);
1061510615
method public deprecated void requestLocationUpdates(java.lang.String, long, float, android.location.LocationListener);
1061610616
method public deprecated void requestLocationUpdates(java.lang.String, long, float, android.location.LocationListener, android.os.Looper);
1061710617
method public deprecated void requestLocationUpdates(long, float, android.location.Criteria, android.location.LocationListener, android.os.Looper);

location/java/android/location/Criteria.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
* location provider. Providers maybe ordered according to accuracy,
2525
* power usage, ability to report altitude, speed,
2626
* and bearing, and monetary cost.
27-
* @deprecated {@link LocationRequest} instead
27+
*
28+
* @deprecated use {@link LocationRequest} instead, and also see notes
29+
* at {@link LocationManager}
2830
*/
2931
@Deprecated
3032
public class Criteria implements Parcelable {

location/java/android/location/Geofence.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@
2020
import android.os.Parcelable;
2121

2222
/**
23-
* Represents a Geofence
23+
* Represents a geographical boundary, also known as a geofence.
24+
*
25+
* <p>Currently only circular geofences are supported, but this object
26+
* is opaque so could be used in the future to represent polygons or other
27+
* shapes.
2428
*/
2529
public final class Geofence implements Parcelable {
2630
/** @hide */
@@ -33,6 +37,7 @@ public final class Geofence implements Parcelable {
3337

3438
/**
3539
* Create a horizontal, circular geofence.
40+
*
3641
* @param latitude latitude in degrees
3742
* @param longitude longitude in degrees
3843
* @param radius radius in meters
@@ -152,6 +157,9 @@ public int hashCode() {
152157
return result;
153158
}
154159

160+
/**
161+
* Two geofences are equal if they have identical properties.
162+
*/
155163
@Override
156164
public boolean equals(Object obj) {
157165
if (this == obj)

0 commit comments

Comments
 (0)