summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nathan Harold <nharold@google.com> 2019-02-04 12:01:08 -0800
committer Nathan Harold <nharold@google.com> 2019-02-04 14:54:51 -0800
commit1aee57aaf122f258c46bdf978592c3aa8ea0fa6e (patch)
tree254b3ecd3e7be6bc2febacded117630aa1fe835d
parent821857f776da92438df05ae7794db264b580b30d (diff)
Update CellInfo Documentation on Updates
-Clarify that updates to CellInfo are not guaranteed regardless of SDK level. -Suggest that callers use getTimeStamp() to see how old/new the cached CellInfo data is. Bug: 122617476 Test: make offline-sdk-docs (docstring only change) Change-Id: Ie9f3597ab2ba027179ce3c37cfeb551e8f659886
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 455fa1e04070..760b147e9edd 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -4866,12 +4866,13 @@ public class TelephonyManager {
*
* <p>Apps targeting {@link android.os.Build.VERSION_CODES#Q Android Q} or higher will no
* longer trigger a refresh of the cached CellInfo by invoking this API. Instead, those apps
- * will receive the latest cached results. Apps targeting
+ * will receive the latest cached results, which may not be current. Apps targeting
* {@link android.os.Build.VERSION_CODES#Q Android Q} or higher that wish to request updated
* CellInfo should call
- * {android.telephony.TelephonyManager#requestCellInfoUpdate requestCellInfoUpdate()} and
- * listen for responses via {@link android.telephony.PhoneStateListener#onCellInfoChanged
- * onCellInfoChanged()}.
+ * {@link android.telephony.TelephonyManager#requestCellInfoUpdate requestCellInfoUpdate()};
+ * however, in all cases, updates will be rate-limited and are not guaranteed. To determine the
+ * recency of CellInfo data, callers should check
+ * {@link android.telephony.CellInfo#getTimeStamp CellInfo#getTimeStamp()}.
*
* <p>This method returns valid data for devices with
* {@link android.content.pm.PackageManager#FEATURE_TELEPHONY FEATURE_TELEPHONY}. In cases