Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1af0f92 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Clarifying documentation on removeUpdates and flushing"

parents 27c33df0 7d6333e8
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -1509,8 +1509,15 @@ public class LocationManager {
    }

    /**
     * Removes location updates for the specified {@link LocationListener}. Following this call,
     * the listener will not receive any more invocations of any kind.
     * Removes all location updates for the specified {@link LocationListener}. The given listener
     * is guaranteed not to receive any invocations that <b>happens-after</b> this method is
     * invoked.
     *
     * <p>If the given listener has any batched requests, this method will not flush any incomplete
     * location batches before stopping location updates. If you wish to flush any pending locations
     * before stopping, you must first call {@link #requestFlush(String, LocationListener, int)} and
     * then call this method once the flush is complete. If this method is invoked before the flush
     * is complete, you may not receive the flushed locations.
     *
     * @param listener listener that no longer needs location updates
     *
@@ -1537,6 +1544,8 @@ public class LocationManager {
     * Removes location updates for the specified {@link PendingIntent}. Following this call, the
     * PendingIntent will no longer receive location updates.
     *
     * <p>See {@link #removeUpdates(LocationListener)} for more detail on how this method works.
     *
     * @param pendingIntent pending intent that no longer needs location updates
     *
     * @throws IllegalArgumentException if pendingIntent is null