Skip to content

Commit 1f3f128

Browse files
Nick PellyAndroid (Google) Code Review
authored andcommitted
Merge "Add javadoc for new location API's." into jb-mr1-dev
2 parents 2ff0c04 + 4e31c4f commit 1f3f128

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
@@ -10556,7 +10556,7 @@ package android.location {
1055610556
method public android.os.Bundle getExtras();
1055710557
method public double getLatitude();
1055810558
method public double getLongitude();
10559-
method public java.lang.String getProvider();
10559+
method public deprecated java.lang.String getProvider();
1056010560
method public float getSpeed();
1056110561
method public long getTime();
1056210562
method public boolean hasAccuracy();
@@ -10594,6 +10594,7 @@ package android.location {
1059410594
}
1059510595

1059610596
public class LocationManager {
10597+
method public void addGeofence(android.location.LocationRequest, android.location.Geofence, android.app.PendingIntent);
1059710598
method public boolean addGpsStatusListener(android.location.GpsStatus.Listener);
1059810599
method public boolean addNmeaListener(android.location.GpsStatus.NmeaListener);
1059910600
method public deprecated void addProximityAlert(double, double, float, long, android.app.PendingIntent);
@@ -10605,7 +10606,7 @@ package android.location {
1060510606
method public deprecated java.lang.String getBestProvider(android.location.Criteria, boolean);
1060610607
method public android.location.GpsStatus getGpsStatus(android.location.GpsStatus);
1060710608
method public deprecated android.location.Location getLastKnownLocation(java.lang.String);
10608-
method public android.location.Location getLastLocation(android.location.LocationRequest);
10609+
method public android.location.Location getLastLocation();
1060910610
method public deprecated android.location.LocationProvider getProvider(java.lang.String);
1061010611
method public deprecated java.util.List<java.lang.String> getProviders(boolean);
1061110612
method public deprecated java.util.List<java.lang.String> getProviders(android.location.Criteria, boolean);
@@ -10618,7 +10619,6 @@ package android.location {
1061810619
method public deprecated void removeTestProvider(java.lang.String);
1061910620
method public void removeUpdates(android.location.LocationListener);
1062010621
method public void removeUpdates(android.app.PendingIntent);
10621-
method public void requestGeofence(android.location.LocationRequest, android.location.Geofence, android.app.PendingIntent);
1062210622
method public deprecated void requestLocationUpdates(java.lang.String, long, float, android.location.LocationListener);
1062310623
method public deprecated void requestLocationUpdates(java.lang.String, long, float, android.location.LocationListener, android.os.Looper);
1062410624
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)