summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorZoey Chen <zoeychen@google.com>2021-06-30 01:42:11 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-06-30 01:42:11 +0000
commit9b685c9eefa96ca9efa2dcce8366dd12a1a15bf4 (patch)
tree3326342031c441ee02c39b9c4dda4412091cee26 /core/java
parent22f606ab9856e2bca35eccd60e4fbe2936a1781e (diff)
parentfc3e38324fd63b240e7f894279403e78a4496718 (diff)
Merge "[Telephony] Add description about location permission" into sc-dev am: fc3e38324f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14748170 Change-Id: Ib6708105a56659cd50e5c3b7ce3b376cc7d900ab
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/telephony/PhoneStateListener.java6
-rw-r--r--core/java/android/telephony/TelephonyCallback.java7
2 files changed, 11 insertions, 2 deletions
diff --git a/core/java/android/telephony/PhoneStateListener.java b/core/java/android/telephony/PhoneStateListener.java
index a1ffe345d457..d39b56ddabed 100644
--- a/core/java/android/telephony/PhoneStateListener.java
+++ b/core/java/android/telephony/PhoneStateListener.java
@@ -621,7 +621,11 @@ public class PhoneStateListener {
* The instance of {@link ServiceState} passed as an argument here will have various levels of
* location information stripped from it depending on the location permissions that your app
* holds. Only apps holding the {@link Manifest.permission#ACCESS_FINE_LOCATION} permission will
- * receive all the information in {@link ServiceState}.
+ * receive all the information in {@link ServiceState}, otherwise the cellIdentity will be null
+ * if apps only holding the {@link Manifest.permission#ACCESS_COARSE_LOCATION} permission.
+ * Network operator name in long/short alphanumeric format and numeric id will be null if apps
+ * holding neither {@link android.Manifest.permission#ACCESS_FINE_LOCATION} nor
+ * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}.
*
* @see ServiceState#STATE_EMERGENCY_ONLY
* @see ServiceState#STATE_IN_SERVICE
diff --git a/core/java/android/telephony/TelephonyCallback.java b/core/java/android/telephony/TelephonyCallback.java
index 1a25c8b4e671..dd4de0a81392 100644
--- a/core/java/android/telephony/TelephonyCallback.java
+++ b/core/java/android/telephony/TelephonyCallback.java
@@ -663,7 +663,12 @@ public class TelephonyCallback {
* levels of location information stripped from it depending on the location permissions
* that your app holds.
* Only apps holding the {@link Manifest.permission#ACCESS_FINE_LOCATION} permission will
- * receive all the information in {@link ServiceState}.
+ * receive all the information in {@link ServiceState}, otherwise the cellIdentity
+ * will be null if apps only holding the {@link Manifest.permission#ACCESS_COARSE_LOCATION}
+ * permission.
+ * Network operator name in long/short alphanumeric format and numeric id will be null if
+ * apps holding neither {@link android.Manifest.permission#ACCESS_FINE_LOCATION} nor
+ * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}.
*
* @see ServiceState#STATE_EMERGENCY_ONLY
* @see ServiceState#STATE_IN_SERVICE