summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nathan Harold <nharold@google.com> 2020-07-28 17:57:11 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2020-07-28 17:57:11 +0000
commit69cd49e502e44382110ab51873ef3e10a6a2c2ed (patch)
tree481754442da444fd309d60a051e27c8a46462a0b
parent74ac03aaac419c1f953c9cc0e8b556b112edb00e (diff)
parentabfeabcb33e8443ecfcbaaf59b84f17ae3be05b5 (diff)
Merge "Update Docstrings for #requestLocationUpdate()" am: abe015171f am: d3467070fc am: abfeabcb33
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1372239 Change-Id: I9ca0bd863594d7230257605e2b031754449166e5
-rw-r--r--telephony/java/android/telephony/CellLocation.java17
1 files changed, 6 insertions, 11 deletions
diff --git a/telephony/java/android/telephony/CellLocation.java b/telephony/java/android/telephony/CellLocation.java
index aa1230165e13..cdf735195d61 100644
--- a/telephony/java/android/telephony/CellLocation.java
+++ b/telephony/java/android/telephony/CellLocation.java
@@ -33,10 +33,12 @@ import com.android.internal.telephony.PhoneConstants;
public abstract class CellLocation {
/**
- * This method will not do anything.
+ * Request an updated CellLocation for callers targeting SDK 30 or older.
*
- * Whenever location changes, a callback will automatically be be sent to
- * all registrants of {@link PhoneStateListener#LISTEN_CELL_LOCATION}.
+ * Whenever Android is aware of location changes, a callback will automatically be sent to
+ * all registrants of {@link PhoneStateListener#LISTEN_CELL_LOCATION}. This API requests an
+ * additional location update for cases where power saving might cause location updates to be
+ * missed.
*
* <p>This method is a no-op for callers targeting SDK level 31 or greater.
* <p>This method is a no-op for callers that target SDK level 29 or 30 and lack
@@ -44,14 +46,7 @@ public abstract class CellLocation {
* <p>This method is a no-op for callers that target SDK level 28 or below and lack
* {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}.
*
- * Callers wishing to request a single location update should use
- * {@link TelephonyManager#requestCellInfoUpdate}.
- *
- * @deprecated this method has undesirable side-effects, and it calls into the OS without
- * access to a {@link android.content.Context Context}, meaning that certain safety checks and
- * attribution are error-prone. Given that this method has numerous downsides, and given that
- * there are long-available superior alternatives, callers are strongly discouraged from using
- * this method.
+ * @deprecated use {@link TelephonyManager#requestCellInfoUpdate}.
*/
@Deprecated
public static void requestLocationUpdate() {