Loading core/java/android/telephony/TelephonyCallback.java +52 −3 Original line number Original line Diff line number Diff line Loading @@ -691,6 +691,11 @@ public class TelephonyCallback { * {@link TelephonyManager#createForSubscriptionId(int)}, then the callback applies to the * {@link TelephonyManager#createForSubscriptionId(int)}, then the callback applies to the * subscription ID. Otherwise, this callback applies to * subscription ID. Otherwise, this callback applies to * {@link SubscriptionManager#getDefaultSubscriptionId()}. * {@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) @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) void onMessageWaitingIndicatorChanged(boolean mwi); void onMessageWaitingIndicatorChanged(boolean mwi); Loading @@ -710,6 +715,11 @@ public class TelephonyCallback { * {@link TelephonyManager#createForSubscriptionId(int)}, then the callback applies to the * {@link TelephonyManager#createForSubscriptionId(int)}, then the callback applies to the * subscription ID. Otherwise, this callback applies to * subscription ID. Otherwise, this callback applies to * {@link SubscriptionManager#getDefaultSubscriptionId()}. * {@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) @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) void onCallForwardingIndicatorChanged(boolean cfi); void onCallForwardingIndicatorChanged(boolean cfi); Loading Loading @@ -868,6 +878,10 @@ public class TelephonyCallback { * subscription ID. Otherwise, this callback applies to * subscription ID. Otherwise, this callback applies to * {@link SubscriptionManager#getDefaultSubscriptionId()}. * {@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} * @param callState {@link PreciseCallState} */ */ @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE) @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE) Loading Loading @@ -910,6 +924,10 @@ public class TelephonyCallback { * subscription ID. Otherwise, this callback applies to * subscription ID. Otherwise, this callback applies to * {@link SubscriptionManager#getDefaultSubscriptionId()}. * {@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. * @param imsReasonInfo {@link ImsReasonInfo} contains details on why IMS call failed. */ */ @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE) @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE) Loading @@ -932,9 +950,9 @@ public class TelephonyCallback { * subscription ID. Otherwise, this callback applies to * subscription ID. Otherwise, this callback applies to * {@link SubscriptionManager#getDefaultSubscriptionId()}. * {@link SubscriptionManager#getDefaultSubscriptionId()}. * * * <p>Requires permission {@link android.Manifest.permission#READ_PRECISE_PHONE_STATE} * The calling app should have carrier privileges * or the calling app has carrier privileges * (see {@link TelephonyManager#hasCarrierPrivileges}) if it does not have the * (see {@link TelephonyManager#hasCarrierPrivileges}). * {@link android.Manifest.permission#READ_PRECISE_PHONE_STATE}. * * * @param dataConnectionState {@link PreciseDataConnectionState} * @param dataConnectionState {@link PreciseDataConnectionState} */ */ Loading Loading @@ -1063,6 +1081,10 @@ public class TelephonyCallback { * given subscription ID. Otherwise, this callback applies to * given subscription ID. Otherwise, this callback applies to * {@link SubscriptionManager#getDefaultSubscriptionId()}. * {@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 * @param emergencyNumberList Map associating all active subscriptions on the device with * the list of emergency numbers originating from that * the list of emergency numbers originating from that * subscription. * subscription. Loading Loading @@ -1157,6 +1179,11 @@ public class TelephonyCallback { * For example, it could be the current active opportunistic subscription * For example, it could be the current active opportunistic subscription * in use, or the subscription user selected as default data subscription in * in use, or the subscription user selected as default data subscription in * DSDS mode. * 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) @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) void onActiveDataSubscriptionIdChanged(int subId); void onActiveDataSubscriptionIdChanged(int subId); Loading Loading @@ -1225,6 +1252,11 @@ public class TelephonyCallback { * <p>Because registration failures are ephemeral, this callback is not sticky. * <p>Because registration failures are ephemeral, this callback is not sticky. * Registrants will not receive the most recent past value when registering. * 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 * @param cellIdentity the CellIdentity, which must include the globally unique * identifier * identifier * for the cell (for example, all components of the CGI or ECGI). * for the cell (for example, all components of the CGI or ECGI). Loading Loading @@ -1308,6 +1340,10 @@ public class TelephonyCallback { * subscription ID. Otherwise, this callback applies to * subscription ID. Otherwise, this callback applies to * {@link SubscriptionManager#getDefaultSubscriptionId()}. * {@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 * @param callAttributes the call attributes */ */ @RequiresPermission(Manifest.permission.READ_PRECISE_PHONE_STATE) @RequiresPermission(Manifest.permission.READ_PRECISE_PHONE_STATE) Loading @@ -1324,6 +1360,11 @@ public class TelephonyCallback { * <p>Barring info is provided for all services applicable to the current camped/registered * <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. * 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. * @param barringInfo for all services on the current cell. * @see android.telephony.BarringInfo * @see android.telephony.BarringInfo */ */ Loading @@ -1341,6 +1382,10 @@ public class TelephonyCallback { /** /** * Callback invoked when the current physical channel configuration has changed * 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 * @param configs List of the current {@link PhysicalChannelConfig}s */ */ @RequiresPermission(Manifest.permission.READ_PRECISE_PHONE_STATE) @RequiresPermission(Manifest.permission.READ_PRECISE_PHONE_STATE) Loading @@ -1357,6 +1402,10 @@ public class TelephonyCallback { /** /** * Callback invoked when the data enabled changes. * 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 enabled {@code true} if data is enabled, otherwise disabled. * @param reason Reason for data enabled/disabled. * @param reason Reason for data enabled/disabled. * See {@link TelephonyManager.DataEnabledReason}. * See {@link TelephonyManager.DataEnabledReason}. Loading Loading
core/java/android/telephony/TelephonyCallback.java +52 −3 Original line number Original line Diff line number Diff line Loading @@ -691,6 +691,11 @@ public class TelephonyCallback { * {@link TelephonyManager#createForSubscriptionId(int)}, then the callback applies to the * {@link TelephonyManager#createForSubscriptionId(int)}, then the callback applies to the * subscription ID. Otherwise, this callback applies to * subscription ID. Otherwise, this callback applies to * {@link SubscriptionManager#getDefaultSubscriptionId()}. * {@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) @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) void onMessageWaitingIndicatorChanged(boolean mwi); void onMessageWaitingIndicatorChanged(boolean mwi); Loading @@ -710,6 +715,11 @@ public class TelephonyCallback { * {@link TelephonyManager#createForSubscriptionId(int)}, then the callback applies to the * {@link TelephonyManager#createForSubscriptionId(int)}, then the callback applies to the * subscription ID. Otherwise, this callback applies to * subscription ID. Otherwise, this callback applies to * {@link SubscriptionManager#getDefaultSubscriptionId()}. * {@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) @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) void onCallForwardingIndicatorChanged(boolean cfi); void onCallForwardingIndicatorChanged(boolean cfi); Loading Loading @@ -868,6 +878,10 @@ public class TelephonyCallback { * subscription ID. Otherwise, this callback applies to * subscription ID. Otherwise, this callback applies to * {@link SubscriptionManager#getDefaultSubscriptionId()}. * {@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} * @param callState {@link PreciseCallState} */ */ @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE) @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE) Loading Loading @@ -910,6 +924,10 @@ public class TelephonyCallback { * subscription ID. Otherwise, this callback applies to * subscription ID. Otherwise, this callback applies to * {@link SubscriptionManager#getDefaultSubscriptionId()}. * {@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. * @param imsReasonInfo {@link ImsReasonInfo} contains details on why IMS call failed. */ */ @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE) @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE) Loading @@ -932,9 +950,9 @@ public class TelephonyCallback { * subscription ID. Otherwise, this callback applies to * subscription ID. Otherwise, this callback applies to * {@link SubscriptionManager#getDefaultSubscriptionId()}. * {@link SubscriptionManager#getDefaultSubscriptionId()}. * * * <p>Requires permission {@link android.Manifest.permission#READ_PRECISE_PHONE_STATE} * The calling app should have carrier privileges * or the calling app has carrier privileges * (see {@link TelephonyManager#hasCarrierPrivileges}) if it does not have the * (see {@link TelephonyManager#hasCarrierPrivileges}). * {@link android.Manifest.permission#READ_PRECISE_PHONE_STATE}. * * * @param dataConnectionState {@link PreciseDataConnectionState} * @param dataConnectionState {@link PreciseDataConnectionState} */ */ Loading Loading @@ -1063,6 +1081,10 @@ public class TelephonyCallback { * given subscription ID. Otherwise, this callback applies to * given subscription ID. Otherwise, this callback applies to * {@link SubscriptionManager#getDefaultSubscriptionId()}. * {@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 * @param emergencyNumberList Map associating all active subscriptions on the device with * the list of emergency numbers originating from that * the list of emergency numbers originating from that * subscription. * subscription. Loading Loading @@ -1157,6 +1179,11 @@ public class TelephonyCallback { * For example, it could be the current active opportunistic subscription * For example, it could be the current active opportunistic subscription * in use, or the subscription user selected as default data subscription in * in use, or the subscription user selected as default data subscription in * DSDS mode. * 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) @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) void onActiveDataSubscriptionIdChanged(int subId); void onActiveDataSubscriptionIdChanged(int subId); Loading Loading @@ -1225,6 +1252,11 @@ public class TelephonyCallback { * <p>Because registration failures are ephemeral, this callback is not sticky. * <p>Because registration failures are ephemeral, this callback is not sticky. * Registrants will not receive the most recent past value when registering. * 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 * @param cellIdentity the CellIdentity, which must include the globally unique * identifier * identifier * for the cell (for example, all components of the CGI or ECGI). * for the cell (for example, all components of the CGI or ECGI). Loading Loading @@ -1308,6 +1340,10 @@ public class TelephonyCallback { * subscription ID. Otherwise, this callback applies to * subscription ID. Otherwise, this callback applies to * {@link SubscriptionManager#getDefaultSubscriptionId()}. * {@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 * @param callAttributes the call attributes */ */ @RequiresPermission(Manifest.permission.READ_PRECISE_PHONE_STATE) @RequiresPermission(Manifest.permission.READ_PRECISE_PHONE_STATE) Loading @@ -1324,6 +1360,11 @@ public class TelephonyCallback { * <p>Barring info is provided for all services applicable to the current camped/registered * <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. * 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. * @param barringInfo for all services on the current cell. * @see android.telephony.BarringInfo * @see android.telephony.BarringInfo */ */ Loading @@ -1341,6 +1382,10 @@ public class TelephonyCallback { /** /** * Callback invoked when the current physical channel configuration has changed * 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 * @param configs List of the current {@link PhysicalChannelConfig}s */ */ @RequiresPermission(Manifest.permission.READ_PRECISE_PHONE_STATE) @RequiresPermission(Manifest.permission.READ_PRECISE_PHONE_STATE) Loading @@ -1357,6 +1402,10 @@ public class TelephonyCallback { /** /** * Callback invoked when the data enabled changes. * 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 enabled {@code true} if data is enabled, otherwise disabled. * @param reason Reason for data enabled/disabled. * @param reason Reason for data enabled/disabled. * See {@link TelephonyManager.DataEnabledReason}. * See {@link TelephonyManager.DataEnabledReason}. Loading