Skip to content

Commit 8761e14

Browse files
scottamainAndroid (Google) Code Review
authored andcommitted
docs: Clarify the callback mechanisms for LocationRequest
and clarify horizontal geofencing Change-Id: I8ff264d7a12c8ec3c79854e008aeeb5f922ad459
1 parent c86e8df commit 8761e14

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

location/java/android/location/Geofence.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
/**
2323
* Represents a geographical boundary, also known as a geofence.
2424
*
25-
* <p>Currently only circular geofences are supported.
25+
* <p>Currently only circular geofences are supported and they do not support altitude changes.
2626
*/
2727
public final class Geofence implements Parcelable {
2828
/** @hide */
@@ -34,7 +34,7 @@ public final class Geofence implements Parcelable {
3434
private final float mRadius;
3535

3636
/**
37-
* Create a horizontal, circular geofence.
37+
* Create a circular geofence (on a flat, horizontal plane).
3838
*
3939
* @param latitude latitude in degrees
4040
* @param longitude longitude in degrees

location/java/android/location/LocationManager.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,10 @@ public void requestSingleUpdate(Criteria criteria, PendingIntent intent) {
811811
/**
812812
* Register for fused location updates using a LocationRequest and callback.
813813
*
814+
* <p>Upon a location update, the system delivers the new {@link Location} to the
815+
* provided {@link LocationListener}, by calling its {@link
816+
* LocationListener#onLocationChanged} method.</p>
817+
*
814818
* <p>The system will automatically select and enable the best providers
815819
* to compute a location for your application. It may use only passive
816820
* locations, or just a single location source, or it may fuse together
@@ -869,6 +873,10 @@ public void requestLocationUpdates(LocationRequest request, LocationListener lis
869873
/**
870874
* Register for fused location updates using a LocationRequest and a pending intent.
871875
*
876+
* <p>Upon a location update, the system delivers the new {@link Location} with your provided
877+
* {@link PendingIntent}, as the value for {@link LocationManager#KEY_LOCATION_CHANGED}
878+
* in the intent's extras.</p>
879+
*
872880
* <p> To unregister for Location updates, use: {@link #removeUpdates(PendingIntent)}.
873881
*
874882
* <p> See {@link #requestLocationUpdates(LocationRequest, LocationListener, Looper)}

0 commit comments

Comments
 (0)