summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2021-10-18 17:47:42 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2021-10-18 17:47:42 +0000
commit210da8ceef5bb8ab69b80ce35644666957b151ca (patch)
tree43475747ca6f852e877692e141dc9f3d48858dd6
parent106fa79debe8d679b194057eb16ad0b18ecd7821 (diff)
parent9b66398997f8799b7d732d436608ed928c2dcbca (diff)
Merge "[Telephony] Add more javadoc for carrier privileges"
-rw-r--r--core/java/android/telephony/TelephonyCallback.java55
1 files changed, 52 insertions, 3 deletions
diff --git a/core/java/android/telephony/TelephonyCallback.java b/core/java/android/telephony/TelephonyCallback.java
index dd4de0a81392..3028a6d8f97a 100644
--- a/core/java/android/telephony/TelephonyCallback.java
+++ b/core/java/android/telephony/TelephonyCallback.java
@@ -691,6 +691,11 @@ public class TelephonyCallback {
* {@link TelephonyManager#createForSubscriptionId(int)}, then the callback applies to the
* subscription ID. Otherwise, this callback applies to
* {@link SubscriptionManager#getDefaultSubscriptionId()}.
+ *
+ * The calling app should have carrier privileges
+ * (see {@link TelephonyManager#hasCarrierPrivileges}) if it does not have the
+ * {@link android.Manifest.permission#READ_PHONE_STATE}.
+ *
*/
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
void onMessageWaitingIndicatorChanged(boolean mwi);
@@ -710,6 +715,11 @@ public class TelephonyCallback {
* {@link TelephonyManager#createForSubscriptionId(int)}, then the callback applies to the
* subscription ID. Otherwise, this callback applies to
* {@link SubscriptionManager#getDefaultSubscriptionId()}.
+ *
+ * The calling app should have carrier privileges
+ * (see {@link TelephonyManager#hasCarrierPrivileges}) if it does not have the
+ * {@link android.Manifest.permission#READ_PHONE_STATE}.
+ *
*/
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
void onCallForwardingIndicatorChanged(boolean cfi);
@@ -868,6 +878,10 @@ public class TelephonyCallback {
* subscription ID. Otherwise, this callback applies to
* {@link SubscriptionManager#getDefaultSubscriptionId()}.
*
+ * The calling app should have carrier privileges
+ * (see {@link TelephonyManager#hasCarrierPrivileges}) if it does not have the
+ * {@link android.Manifest.permission#READ_PRECISE_PHONE_STATE}.
+ *
* @param callState {@link PreciseCallState}
*/
@RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE)
@@ -910,6 +924,10 @@ public class TelephonyCallback {
* subscription ID. Otherwise, this callback applies to
* {@link SubscriptionManager#getDefaultSubscriptionId()}.
*
+ * The calling app should have carrier privileges
+ * (see {@link TelephonyManager#hasCarrierPrivileges}) if it does not have the
+ * {@link android.Manifest.permission#READ_PRECISE_PHONE_STATE}.
+ *
* @param imsReasonInfo {@link ImsReasonInfo} contains details on why IMS call failed.
*/
@RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE)
@@ -932,9 +950,9 @@ public class TelephonyCallback {
* subscription ID. Otherwise, this callback applies to
* {@link SubscriptionManager#getDefaultSubscriptionId()}.
*
- * <p>Requires permission {@link android.Manifest.permission#READ_PRECISE_PHONE_STATE}
- * or the calling app has carrier privileges
- * (see {@link TelephonyManager#hasCarrierPrivileges}).
+ * The calling app should have carrier privileges
+ * (see {@link TelephonyManager#hasCarrierPrivileges}) if it does not have the
+ * {@link android.Manifest.permission#READ_PRECISE_PHONE_STATE}.
*
* @param dataConnectionState {@link PreciseDataConnectionState}
*/
@@ -1063,6 +1081,10 @@ public class TelephonyCallback {
* given subscription ID. Otherwise, this callback applies to
* {@link SubscriptionManager#getDefaultSubscriptionId()}.
*
+ * The calling app should have carrier privileges
+ * (see {@link TelephonyManager#hasCarrierPrivileges}) if it does not have the
+ * {@link android.Manifest.permission#READ_PHONE_STATE}.
+ *
* @param emergencyNumberList Map associating all active subscriptions on the device with
* the list of emergency numbers originating from that
* subscription.
@@ -1157,6 +1179,11 @@ public class TelephonyCallback {
* For example, it could be the current active opportunistic subscription
* in use, or the subscription user selected as default data subscription in
* DSDS mode.
+ *
+ * The calling app should have carrier privileges
+ * (see {@link TelephonyManager#hasCarrierPrivileges}) if it does not have the
+ * {@link android.Manifest.permission#READ_PHONE_STATE}.
+ *
*/
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
void onActiveDataSubscriptionIdChanged(int subId);
@@ -1225,6 +1252,11 @@ public class TelephonyCallback {
* <p>Because registration failures are ephemeral, this callback is not sticky.
* Registrants will not receive the most recent past value when registering.
*
+ * The calling app should have carrier privileges
+ * (see {@link TelephonyManager#hasCarrierPrivileges}) if it does not have the
+ * {@link android.Manifest.permission#READ_PRECISE_PHONE_STATE} and
+ * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
+ *
* @param cellIdentity the CellIdentity, which must include the globally unique
* identifier
* for the cell (for example, all components of the CGI or ECGI).
@@ -1308,6 +1340,10 @@ public class TelephonyCallback {
* subscription ID. Otherwise, this callback applies to
* {@link SubscriptionManager#getDefaultSubscriptionId()}.
*
+ * The calling app should have carrier privileges
+ * (see {@link TelephonyManager#hasCarrierPrivileges}) if it does not have the
+ * {@link android.Manifest.permission#READ_PRECISE_PHONE_STATE}.
+ *
* @param callAttributes the call attributes
*/
@RequiresPermission(Manifest.permission.READ_PRECISE_PHONE_STATE)
@@ -1324,6 +1360,11 @@ public class TelephonyCallback {
* <p>Barring info is provided for all services applicable to the current camped/registered
* cell, for the registered PLMN and current access class/access category.
*
+ * The calling app should have carrier privileges
+ * (see {@link TelephonyManager#hasCarrierPrivileges}) if it does not have the
+ * {@link android.Manifest.permission#READ_PRECISE_PHONE_STATE} and
+ * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
+ *
* @param barringInfo for all services on the current cell.
* @see android.telephony.BarringInfo
*/
@@ -1341,6 +1382,10 @@ public class TelephonyCallback {
/**
* Callback invoked when the current physical channel configuration has changed
*
+ * The calling app should have carrier privileges
+ * (see {@link TelephonyManager#hasCarrierPrivileges}) if it does not have the
+ * {@link android.Manifest.permission#READ_PRECISE_PHONE_STATE}.
+ *
* @param configs List of the current {@link PhysicalChannelConfig}s
*/
@RequiresPermission(Manifest.permission.READ_PRECISE_PHONE_STATE)
@@ -1357,6 +1402,10 @@ public class TelephonyCallback {
/**
* Callback invoked when the data enabled changes.
*
+ * The calling app should have carrier privileges
+ * (see {@link TelephonyManager#hasCarrierPrivileges}) if it does not have the
+ * {@link android.Manifest.permission#READ_PRECISE_PHONE_STATE}.
+ *
* @param enabled {@code true} if data is enabled, otherwise disabled.
* @param reason Reason for data enabled/disabled.
* See {@link TelephonyManager.DataEnabledReason}.