diff options
| author | Treehugger Robot <treehugger-gerrit@google.com> | 2021-10-18 18:44:25 +0000 |
|---|---|---|
| committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-10-18 18:44:25 +0000 |
| commit | 8a19d66f6b91d084606b0592857cc0e47c472abb (patch) | |
| tree | 946aff386fb96467d90cda99a8b76176e103d79e /core/java | |
| parent | 6f519663adae5b17d89d00bb013858ff1e3583a8 (diff) | |
| parent | 58337991f21a5e6778340aa30c841221608ba94f (diff) | |
Merge "[Telephony] Add more javadoc for carrier privileges" am: 210da8ceef am: 4b3059129b am: 58337991f2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1860618
Change-Id: I6d13a651c30c693ebbbb4c97fe3f341253c8e22b
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/telephony/TelephonyCallback.java | 55 |
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}. |
