|
|
|
|
@@ -23,6 +23,7 @@ import android.annotation.Nullable;
|
|
|
|
|
import android.annotation.RequiresPermission;
|
|
|
|
|
import android.annotation.SdkConstant;
|
|
|
|
|
import android.annotation.SdkConstant.SdkConstantType;
|
|
|
|
|
import android.annotation.SuppressAutoDoc;
|
|
|
|
|
import android.annotation.SuppressLint;
|
|
|
|
|
import android.annotation.SystemApi;
|
|
|
|
|
import android.annotation.SystemService;
|
|
|
|
|
@@ -53,7 +54,6 @@ import android.telephony.ims.aidl.IImsConfig;
|
|
|
|
|
import android.telephony.ims.aidl.IImsMmTelFeature;
|
|
|
|
|
import android.telephony.ims.aidl.IImsRcsFeature;
|
|
|
|
|
import android.telephony.ims.aidl.IImsRegistration;
|
|
|
|
|
import android.telephony.ims.feature.ImsFeature;
|
|
|
|
|
import android.telephony.ims.stub.ImsRegistrationImplBase;
|
|
|
|
|
import android.util.Log;
|
|
|
|
|
|
|
|
|
|
@@ -1114,7 +1114,11 @@ public class TelephonyManager {
|
|
|
|
|
* Returns the software version number for the device, for example,
|
|
|
|
|
* the IMEI/SV for GSM phones. Return null if the software version is
|
|
|
|
|
* not available.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*/
|
|
|
|
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getDeviceSoftwareVersion() {
|
|
|
|
|
return getDeviceSoftwareVersion(getSlotIndex());
|
|
|
|
|
@@ -1146,10 +1150,14 @@ public class TelephonyManager {
|
|
|
|
|
* Returns the unique device ID, for example, the IMEI for GSM and the MEID
|
|
|
|
|
* or ESN for CDMA phones. Return null if device ID is not available.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @deprecated Use (@link getImei} which returns IMEI for GSM or (@link getMeid} which returns
|
|
|
|
|
* MEID for CDMA.
|
|
|
|
|
*/
|
|
|
|
|
@Deprecated
|
|
|
|
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getDeviceId() {
|
|
|
|
|
try {
|
|
|
|
|
@@ -1168,12 +1176,16 @@ public class TelephonyManager {
|
|
|
|
|
* Returns the unique device ID of a subscription, for example, the IMEI for
|
|
|
|
|
* GSM and the MEID for CDMA phones. Return null if device ID is not available.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param slotIndex of which deviceID is returned
|
|
|
|
|
*
|
|
|
|
|
* @deprecated Use (@link getImei} which returns IMEI for GSM or (@link getMeid} which returns
|
|
|
|
|
* MEID for CDMA.
|
|
|
|
|
*/
|
|
|
|
|
@Deprecated
|
|
|
|
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getDeviceId(int slotIndex) {
|
|
|
|
|
// FIXME this assumes phoneId == slotIndex
|
|
|
|
|
@@ -1192,7 +1204,11 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Returns the IMEI (International Mobile Equipment Identity). Return null if IMEI is not
|
|
|
|
|
* available.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*/
|
|
|
|
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getImei() {
|
|
|
|
|
return getImei(getSlotIndex());
|
|
|
|
|
@@ -1202,8 +1218,12 @@ public class TelephonyManager {
|
|
|
|
|
* Returns the IMEI (International Mobile Equipment Identity). Return null if IMEI is not
|
|
|
|
|
* available.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param slotIndex of which IMEI is returned
|
|
|
|
|
*/
|
|
|
|
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getImei(int slotIndex) {
|
|
|
|
|
ITelephony telephony = getITelephony();
|
|
|
|
|
@@ -1220,7 +1240,11 @@ public class TelephonyManager {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the MEID (Mobile Equipment Identifier). Return null if MEID is not available.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*/
|
|
|
|
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getMeid() {
|
|
|
|
|
return getMeid(getSlotIndex());
|
|
|
|
|
@@ -1229,8 +1253,12 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Returns the MEID (Mobile Equipment Identifier). Return null if MEID is not available.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param slotIndex of which MEID is returned
|
|
|
|
|
*/
|
|
|
|
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getMeid(int slotIndex) {
|
|
|
|
|
ITelephony telephony = getITelephony();
|
|
|
|
|
@@ -1247,10 +1275,11 @@ public class TelephonyManager {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the Network Access Identifier (NAI). Return null if NAI is not available.
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*/
|
|
|
|
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getNai() {
|
|
|
|
|
return getNaiBySubscriberId(getSubId());
|
|
|
|
|
@@ -1751,6 +1780,7 @@ public class TelephonyManager {
|
|
|
|
|
* @see #createForSubscriptionId(int)
|
|
|
|
|
* @see #createForPhoneAccountHandle(PhoneAccountHandle)
|
|
|
|
|
*/
|
|
|
|
|
// TODO(b/73136824, b/70041899): Permit carrier-privileged callers as well.
|
|
|
|
|
@WorkerThread
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public PersistableBundle getCarrierConfig() {
|
|
|
|
|
@@ -1949,6 +1979,9 @@ public class TelephonyManager {
|
|
|
|
|
* If this object has been created with {@link #createForSubscriptionId}, applies to the given
|
|
|
|
|
* subId. Otherwise, applies to {@link SubscriptionManager#getDefaultDataSubscriptionId()}
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @return the network type
|
|
|
|
|
*
|
|
|
|
|
* @see #NETWORK_TYPE_UNKNOWN
|
|
|
|
|
@@ -1968,6 +2001,7 @@ public class TelephonyManager {
|
|
|
|
|
* @see #NETWORK_TYPE_EHRPD
|
|
|
|
|
* @see #NETWORK_TYPE_HSPAP
|
|
|
|
|
*/
|
|
|
|
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public int getDataNetworkType() {
|
|
|
|
|
return getDataNetworkType(getSubId(SubscriptionManager.getDefaultDataSubscriptionId()));
|
|
|
|
|
@@ -2002,7 +2036,11 @@ public class TelephonyManager {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the NETWORK_TYPE_xxxx for voice
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*/
|
|
|
|
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public int getVoiceNetworkType() {
|
|
|
|
|
return getVoiceNetworkType(getSubId());
|
|
|
|
|
@@ -2588,7 +2626,11 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Returns the serial number of the SIM, if applicable. Return null if it is
|
|
|
|
|
* unavailable.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*/
|
|
|
|
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getSimSerialNumber() {
|
|
|
|
|
return getSimSerialNumber(getSubId());
|
|
|
|
|
@@ -2713,7 +2755,11 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Returns the unique subscriber ID, for example, the IMSI for a GSM phone.
|
|
|
|
|
* Return null if it is unavailable.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*/
|
|
|
|
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getSubscriberId() {
|
|
|
|
|
return getSubscriberId(getSubId());
|
|
|
|
|
@@ -2881,7 +2927,11 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Returns the Group Identifier Level1 for a GSM phone.
|
|
|
|
|
* Return null if it is unavailable.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*/
|
|
|
|
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getGroupIdLevel1() {
|
|
|
|
|
try {
|
|
|
|
|
@@ -2922,9 +2972,15 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Returns the phone number string for line 1, for example, the MSISDN
|
|
|
|
|
* for a GSM phone. Return null if it is unavailable.
|
|
|
|
|
* <p>
|
|
|
|
|
* The default SMS app can also use this.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE},
|
|
|
|
|
* {@link android.Manifest.permission#READ_SMS READ_SMS},
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_NUMBERS READ_PHONE_NUMBERS},
|
|
|
|
|
* that the caller is the default SMS app,
|
|
|
|
|
* or that the caller has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*/
|
|
|
|
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges or default SMS app
|
|
|
|
|
@RequiresPermission(anyOf = {
|
|
|
|
|
android.Manifest.permission.READ_PHONE_STATE,
|
|
|
|
|
android.Manifest.permission.READ_SMS,
|
|
|
|
|
@@ -2979,8 +3035,7 @@ public class TelephonyManager {
|
|
|
|
|
* change the actual MSISDN/MDN. To unset alphatag or number, pass in a null
|
|
|
|
|
* value.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires that the calling app has carrier privileges.
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
* <p>Requires that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param alphaTag alpha-tagging of the dailing nubmer
|
|
|
|
|
* @param number The dialing number
|
|
|
|
|
@@ -2996,8 +3051,7 @@ public class TelephonyManager {
|
|
|
|
|
* change the actual MSISDN/MDN. To unset alphatag or number, pass in a null
|
|
|
|
|
* value.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires that the calling app has carrier privileges.
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
* <p>Requires that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param subId the subscriber that the alphatag and dialing number belongs to.
|
|
|
|
|
* @param alphaTag alpha-tagging of the dailing nubmer
|
|
|
|
|
@@ -3116,7 +3170,11 @@ public class TelephonyManager {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the voice mail number. Return null if it is unavailable.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*/
|
|
|
|
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getVoiceMailNumber() {
|
|
|
|
|
return getVoiceMailNumber(getSubId());
|
|
|
|
|
@@ -3177,8 +3235,7 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Sets the voice mail number.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires that the calling app has carrier privileges.
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
* <p>Requires that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param alphaTag The alpha tag to display.
|
|
|
|
|
* @param number The voicemail number.
|
|
|
|
|
@@ -3190,8 +3247,7 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Sets the voicemail number for the given subscriber.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires that the calling app has carrier privileges.
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
* <p>Requires that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param subId The subscription id.
|
|
|
|
|
* @param alphaTag The alpha tag to display.
|
|
|
|
|
@@ -3212,9 +3268,9 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Enables or disables the visual voicemail client for a phone account.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires that the calling app is the default dialer, or has carrier privileges, or
|
|
|
|
|
* has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
* <p>Requires that the calling app is the default dialer, or has carrier privileges (see
|
|
|
|
|
* {@link #hasCarrierPrivileges}), or has permission
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
|
|
|
|
|
*
|
|
|
|
|
* @param phoneAccountHandle the phone account to change the client state
|
|
|
|
|
* @param enabled the new state of the client
|
|
|
|
|
@@ -3277,11 +3333,15 @@ public class TelephonyManager {
|
|
|
|
|
* to the TelephonyManager. Returns {@code null} when there is no package responsible for
|
|
|
|
|
* processing visual voicemail for the subscription.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @see #createForSubscriptionId(int)
|
|
|
|
|
* @see #createForPhoneAccountHandle(PhoneAccountHandle)
|
|
|
|
|
* @see VisualVoicemailService
|
|
|
|
|
*/
|
|
|
|
|
@Nullable
|
|
|
|
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getVisualVoicemailPackageName() {
|
|
|
|
|
try {
|
|
|
|
|
@@ -3524,15 +3584,14 @@ public class TelephonyManager {
|
|
|
|
|
* Sets the voice activation state
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges.
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the
|
|
|
|
|
* calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param activationState The voice activation state
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_UNKNOWN
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_ACTIVATING
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_ACTIVATED
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_DEACTIVATED
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@SystemApi
|
|
|
|
|
@@ -3545,8 +3604,8 @@ public class TelephonyManager {
|
|
|
|
|
* Sets the voice activation state for the given subscriber.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges.
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the
|
|
|
|
|
* calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param subId The subscription id.
|
|
|
|
|
* @param activationState The voice activation state of the given subscriber.
|
|
|
|
|
@@ -3554,7 +3613,6 @@ public class TelephonyManager {
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_ACTIVATING
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_ACTIVATED
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_DEACTIVATED
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
|
|
|
|
|
@@ -3572,8 +3630,8 @@ public class TelephonyManager {
|
|
|
|
|
* Sets the data activation state
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges.
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the
|
|
|
|
|
* calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param activationState The data activation state
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_UNKNOWN
|
|
|
|
|
@@ -3581,7 +3639,6 @@ public class TelephonyManager {
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_ACTIVATED
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_DEACTIVATED
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_RESTRICTED
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@SystemApi
|
|
|
|
|
@@ -3594,8 +3651,8 @@ public class TelephonyManager {
|
|
|
|
|
* Sets the data activation state for the given subscriber.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges.
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the
|
|
|
|
|
* calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param subId The subscription id.
|
|
|
|
|
* @param activationState The data activation state of the given subscriber.
|
|
|
|
|
@@ -3604,7 +3661,6 @@ public class TelephonyManager {
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_ACTIVATED
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_DEACTIVATED
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_RESTRICTED
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
|
|
|
|
|
@@ -3622,15 +3678,14 @@ public class TelephonyManager {
|
|
|
|
|
* Returns the voice activation state
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE READ_PRIVILEGED_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges.
|
|
|
|
|
* {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE READ_PRIVILEGED_PHONE_STATE}
|
|
|
|
|
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @return voiceActivationState
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_UNKNOWN
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_ACTIVATING
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_ACTIVATED
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_DEACTIVATED
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@SystemApi
|
|
|
|
|
@@ -3643,8 +3698,8 @@ public class TelephonyManager {
|
|
|
|
|
* Returns the voice activation state for the given subscriber.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE READ_PRIVILEGED_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges.
|
|
|
|
|
* {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE READ_PRIVILEGED_PHONE_STATE}
|
|
|
|
|
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param subId The subscription id.
|
|
|
|
|
*
|
|
|
|
|
@@ -3653,7 +3708,6 @@ public class TelephonyManager {
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_ACTIVATING
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_ACTIVATED
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_DEACTIVATED
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
|
|
|
|
|
@@ -3672,8 +3726,8 @@ public class TelephonyManager {
|
|
|
|
|
* Returns the data activation state
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE READ_PRIVILEGED_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges.
|
|
|
|
|
* {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE READ_PRIVILEGED_PHONE_STATE}
|
|
|
|
|
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @return dataActivationState for the given subscriber
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_UNKNOWN
|
|
|
|
|
@@ -3681,7 +3735,6 @@ public class TelephonyManager {
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_ACTIVATED
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_DEACTIVATED
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_RESTRICTED
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@SystemApi
|
|
|
|
|
@@ -3694,8 +3747,8 @@ public class TelephonyManager {
|
|
|
|
|
* Returns the data activation state for the given subscriber.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE READ_PRIVILEGED_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges.
|
|
|
|
|
* {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE READ_PRIVILEGED_PHONE_STATE}
|
|
|
|
|
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param subId The subscription id.
|
|
|
|
|
*
|
|
|
|
|
@@ -3705,7 +3758,6 @@ public class TelephonyManager {
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_ACTIVATED
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_DEACTIVATED
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_RESTRICTED
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
|
|
|
|
|
@@ -3753,7 +3805,11 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Retrieves the alphabetic identifier associated with the voice
|
|
|
|
|
* mail number.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*/
|
|
|
|
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getVoiceMailAlphaTag() {
|
|
|
|
|
return getVoiceMailAlphaTag(getSubId());
|
|
|
|
|
@@ -3782,9 +3838,8 @@ public class TelephonyManager {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Send the special dialer code. The IPC caller must be the current default dialer or has
|
|
|
|
|
* carrier privileges.
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
* Send the special dialer code. The IPC caller must be the current default dialer or have
|
|
|
|
|
* carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param inputCode The special dialer code to send
|
|
|
|
|
*
|
|
|
|
|
@@ -4312,8 +4367,8 @@ public class TelephonyManager {
|
|
|
|
|
* Input parameters equivalent to TS 27.007 AT+CCHO command.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param AID Application id. See ETSI 102.221 and 101.220.
|
|
|
|
|
* @return an IccOpenLogicalChannelResponse object.
|
|
|
|
|
@@ -4330,8 +4385,8 @@ public class TelephonyManager {
|
|
|
|
|
* Input parameters equivalent to TS 27.007 AT+CCHO command.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param AID Application id. See ETSI 102.221 and 101.220.
|
|
|
|
|
* @param p2 P2 parameter (described in ISO 7816-4).
|
|
|
|
|
@@ -4347,8 +4402,8 @@ public class TelephonyManager {
|
|
|
|
|
* Input parameters equivalent to TS 27.007 AT+CCHO command.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param subId The subscription to use.
|
|
|
|
|
* @param AID Application id. See ETSI 102.221 and 101.220.
|
|
|
|
|
@@ -4373,8 +4428,8 @@ public class TelephonyManager {
|
|
|
|
|
* Input parameters equivalent to TS 27.007 AT+CCHC command.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param channel is the channel id to be closed as retruned by a successful
|
|
|
|
|
* iccOpenLogicalChannel.
|
|
|
|
|
@@ -4390,8 +4445,8 @@ public class TelephonyManager {
|
|
|
|
|
* Input parameters equivalent to TS 27.007 AT+CCHC command.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param subId The subscription to use.
|
|
|
|
|
* @param channel is the channel id to be closed as retruned by a successful
|
|
|
|
|
@@ -4416,8 +4471,8 @@ public class TelephonyManager {
|
|
|
|
|
* Input parameters equivalent to TS 27.007 AT+CGLA command.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param channel is the channel id to be closed as returned by a successful
|
|
|
|
|
* iccOpenLogicalChannel.
|
|
|
|
|
@@ -4443,8 +4498,8 @@ public class TelephonyManager {
|
|
|
|
|
* Input parameters equivalent to TS 27.007 AT+CGLA command.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param subId The subscription to use.
|
|
|
|
|
* @param channel is the channel id to be closed as returned by a successful
|
|
|
|
|
@@ -4479,8 +4534,8 @@ public class TelephonyManager {
|
|
|
|
|
* Input parameters equivalent to TS 27.007 AT+CSIM command.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param cla Class of the APDU command.
|
|
|
|
|
* @param instruction Instruction of the APDU command.
|
|
|
|
|
@@ -4504,8 +4559,8 @@ public class TelephonyManager {
|
|
|
|
|
* Input parameters equivalent to TS 27.007 AT+CSIM command.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param subId The subscription to use.
|
|
|
|
|
* @param cla Class of the APDU command.
|
|
|
|
|
@@ -4536,8 +4591,8 @@ public class TelephonyManager {
|
|
|
|
|
* Returns the response APDU for a command APDU sent through SIM_IO.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param fileID
|
|
|
|
|
* @param command
|
|
|
|
|
@@ -4556,8 +4611,8 @@ public class TelephonyManager {
|
|
|
|
|
* Returns the response APDU for a command APDU sent through SIM_IO.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param subId The subscription to use.
|
|
|
|
|
* @param fileID
|
|
|
|
|
@@ -4585,8 +4640,8 @@ public class TelephonyManager {
|
|
|
|
|
* Send ENVELOPE to the SIM and return the response.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param content String containing SAT/USAT response in hexadecimal
|
|
|
|
|
* format starting with command tag. See TS 102 223 for
|
|
|
|
|
@@ -4603,8 +4658,8 @@ public class TelephonyManager {
|
|
|
|
|
* Send ENVELOPE to the SIM and return the response.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param subId The subscription to use.
|
|
|
|
|
* @param content String containing SAT/USAT response in hexadecimal
|
|
|
|
|
@@ -4629,10 +4684,10 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Read one of the NV items defined in com.android.internal.telephony.RadioNVItems.
|
|
|
|
|
* Used for device configuration by some CDMA operators.
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param itemID the ID of the item to read.
|
|
|
|
|
* @return the NV item as a String, or null on any failure.
|
|
|
|
|
@@ -4655,10 +4710,10 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Write one of the NV items defined in com.android.internal.telephony.RadioNVItems.
|
|
|
|
|
* Used for device configuration by some CDMA operators.
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param itemID the ID of the item to read.
|
|
|
|
|
* @param itemValue the value to write, as a String.
|
|
|
|
|
@@ -4682,10 +4737,10 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
|
|
|
|
|
* Used for device configuration by some CDMA operators.
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param preferredRoamingList byte array containing the new PRL.
|
|
|
|
|
* @return true on success; false on any failure.
|
|
|
|
|
@@ -4709,10 +4764,10 @@ public class TelephonyManager {
|
|
|
|
|
* Perform the specified type of NV config reset. The radio will be taken offline
|
|
|
|
|
* and the device must be rebooted after the operation. Used for device
|
|
|
|
|
* configuration by some CDMA operators.
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param resetType reset type: 1: reload NV reset, 2: erase NV reset, 3: factory NV reset
|
|
|
|
|
* @return true on success; false on any failure.
|
|
|
|
|
@@ -5060,8 +5115,8 @@ public class TelephonyManager {
|
|
|
|
|
* Returns the response of authentication for the default subscription.
|
|
|
|
|
* Returns null if the authentication hasn't been successful
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires that the calling app has carrier privileges or READ_PRIVILEGED_PHONE_STATE
|
|
|
|
|
* permission.
|
|
|
|
|
* <p>Requires Permission: READ_PRIVILEGED_PHONE_STATE or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param appType the icc application type, like {@link #APPTYPE_USIM}
|
|
|
|
|
* @param authType the authentication type, {@link #AUTHTYPE_EAP_AKA} or
|
|
|
|
|
@@ -5069,9 +5124,10 @@ public class TelephonyManager {
|
|
|
|
|
* @param data authentication challenge data, base64 encoded.
|
|
|
|
|
* See 3GPP TS 31.102 7.1.2 for more details.
|
|
|
|
|
* @return the response of authentication, or null if not available
|
|
|
|
|
*
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
*/
|
|
|
|
|
// TODO(b/73660190): This should probably require MODIFY_PHONE_STATE, not
|
|
|
|
|
// READ_PRIVILEGED_PHONE_STATE. It certainly shouldn't reference the permission in Javadoc since
|
|
|
|
|
// it's not public API.
|
|
|
|
|
public String getIccAuthentication(int appType, int authType, String data) {
|
|
|
|
|
return getIccAuthentication(getSubId(), appType, authType, data);
|
|
|
|
|
}
|
|
|
|
|
@@ -5080,7 +5136,7 @@ public class TelephonyManager {
|
|
|
|
|
* Returns the response of USIM Authentication for specified subId.
|
|
|
|
|
* Returns null if the authentication hasn't been successful
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires that the calling app has carrier privileges.
|
|
|
|
|
* <p>Requires that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param subId subscription ID used for authentication
|
|
|
|
|
* @param appType the icc application type, like {@link #APPTYPE_USIM}
|
|
|
|
|
@@ -5089,8 +5145,6 @@ public class TelephonyManager {
|
|
|
|
|
* @param data authentication challenge data, base64 encoded.
|
|
|
|
|
* See 3GPP TS 31.102 7.1.2 for more details.
|
|
|
|
|
* @return the response of authentication, or null if not available
|
|
|
|
|
*
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
public String getIccAuthentication(int subId, int appType, int authType, String data) {
|
|
|
|
|
@@ -5111,8 +5165,12 @@ public class TelephonyManager {
|
|
|
|
|
* Returns an array of Forbidden PLMNs from the USIM App
|
|
|
|
|
* Returns null if the query fails.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @return an array of forbidden PLMNs or null if not available
|
|
|
|
|
*/
|
|
|
|
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String[] getForbiddenPlmns() {
|
|
|
|
|
return getForbiddenPlmns(getSubId(), APPTYPE_USIM);
|
|
|
|
|
@@ -5318,10 +5376,10 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Get the preferred network type.
|
|
|
|
|
* Used for device configuration by some CDMA operators.
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @return the preferred network type, defined in RILConstants.java.
|
|
|
|
|
* @hide
|
|
|
|
|
@@ -5341,11 +5399,12 @@ public class TelephonyManager {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets the network selection mode to automatic.
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*/
|
|
|
|
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
|
|
|
|
|
public void setNetworkSelectionModeAutomatic() {
|
|
|
|
|
try {
|
|
|
|
|
@@ -5361,15 +5420,14 @@ public class TelephonyManager {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Perform a radio scan and return the list of avialble networks.
|
|
|
|
|
* Perform a radio scan and return the list of available networks.
|
|
|
|
|
*
|
|
|
|
|
* The return value is a list of the OperatorInfo of the networks found. Note that this
|
|
|
|
|
* scan can take a long time (sometimes minutes) to happen.
|
|
|
|
|
*
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @hide
|
|
|
|
|
* TODO: Add an overload that takes no args.
|
|
|
|
|
@@ -5393,17 +5451,16 @@ public class TelephonyManager {
|
|
|
|
|
* This method is asynchronous, so the network scan results will be returned by callback.
|
|
|
|
|
* The returned NetworkScan will contain a callback method which can be used to stop the scan.
|
|
|
|
|
*
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges.
|
|
|
|
|
* @see #hasCarrierPrivileges()
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param request Contains all the RAT with bands/channels that need to be scanned.
|
|
|
|
|
* @param executor The executor through which the callback should be invoked.
|
|
|
|
|
* @param callback Returns network scan results or errors.
|
|
|
|
|
* @return A NetworkScan obj which contains a callback which can be used to stop the scan.
|
|
|
|
|
*/
|
|
|
|
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
|
|
|
|
|
public NetworkScan requestNetworkScan(
|
|
|
|
|
NetworkScanRequest request, Executor executor,
|
|
|
|
|
@@ -5431,10 +5488,9 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Ask the radio to connect to the input network and change selection mode to manual.
|
|
|
|
|
*
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param operatorNumeric the PLMN ID of the network to select.
|
|
|
|
|
* @param persistSelection whether the selection will persist until reboot. If true, only allows
|
|
|
|
|
@@ -5442,6 +5498,7 @@ public class TelephonyManager {
|
|
|
|
|
* normal network selection next time.
|
|
|
|
|
* @return true on success; false on any failure.
|
|
|
|
|
*/
|
|
|
|
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
|
|
|
|
|
public boolean setNetworkSelectionModeManual(String operatorNumeric, boolean persistSelection) {
|
|
|
|
|
try {
|
|
|
|
|
@@ -5461,10 +5518,10 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Set the preferred network type.
|
|
|
|
|
* Used for device configuration by some CDMA operators.
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
|
|
|
|
|
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param subId the id of the subscription to set the preferred network type for.
|
|
|
|
|
* @param networkType the preferred network type, defined in RILConstants.java.
|
|
|
|
|
@@ -5488,9 +5545,7 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Set the preferred network type to global mode which includes LTE, CDMA, EvDo and GSM/WCDMA.
|
|
|
|
|
*
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires that the calling app has carrier privileges.
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
* <p>Requires that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @return true on success; false on any failure.
|
|
|
|
|
*/
|
|
|
|
|
@@ -5501,9 +5556,7 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Set the preferred network type to global mode which includes LTE, CDMA, EvDo and GSM/WCDMA.
|
|
|
|
|
*
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires that the calling app has carrier privileges.
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
* <p>Requires that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @return true on success; false on any failure.
|
|
|
|
|
* @hide
|
|
|
|
|
@@ -5593,8 +5646,7 @@ public class TelephonyManager {
|
|
|
|
|
* brand value input. To unset the value, the same function should be
|
|
|
|
|
* called with a null brand value.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires that the calling app has carrier privileges.
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
* <p>Requires that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param brand The brand name to display/set.
|
|
|
|
|
* @return true if the operation was executed correctly.
|
|
|
|
|
@@ -5611,8 +5663,7 @@ public class TelephonyManager {
|
|
|
|
|
* brand value input. To unset the value, the same function should be
|
|
|
|
|
* called with a null brand value.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires that the calling app has carrier privileges.
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
* <p>Requires that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param subId The subscription to use.
|
|
|
|
|
* @param brand The brand name to display/set.
|
|
|
|
|
@@ -6266,15 +6317,15 @@ public class TelephonyManager {
|
|
|
|
|
* subId. Otherwise, applies to {@link SubscriptionManager#getDefaultDataSubscriptionId()}
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the
|
|
|
|
|
* calling app has carrier privileges.
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* @param enable Whether to enable mobile data.
|
|
|
|
|
*
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
* @deprecated use {@link #setUserMobileDataEnabled(boolean)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@Deprecated
|
|
|
|
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
|
|
|
|
|
public void setDataEnabled(boolean enable) {
|
|
|
|
|
setUserMobileDataEnabled(enable);
|
|
|
|
|
@@ -6311,7 +6362,7 @@ public class TelephonyManager {
|
|
|
|
|
* <p>Requires one of the following permissions:
|
|
|
|
|
* {@link android.Manifest.permission#ACCESS_NETWORK_STATE ACCESS_NETWORK_STATE},
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}, or that the
|
|
|
|
|
* calling app has carrier privileges.
|
|
|
|
|
* calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*
|
|
|
|
|
* <p>Note that this does not take into account any data restrictions that may be present on the
|
|
|
|
|
* calling app. Such restrictions may be inspected with
|
|
|
|
|
@@ -6319,7 +6370,6 @@ public class TelephonyManager {
|
|
|
|
|
*
|
|
|
|
|
* @return true if mobile data is enabled.
|
|
|
|
|
*
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
* @deprecated use {@link #isUserMobileDataEnabled()} instead.
|
|
|
|
|
*/
|
|
|
|
|
@Deprecated
|
|
|
|
|
@@ -7090,7 +7140,11 @@ public class TelephonyManager {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the current {@link ServiceState} information.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
|
|
|
|
*/
|
|
|
|
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public ServiceState getServiceState() {
|
|
|
|
|
return getServiceStateForSubscriber(getSubId());
|
|
|
|
|
@@ -7136,14 +7190,14 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Sets the per-account voicemail ringtone.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires that the calling app is the default dialer, or has carrier privileges, or has
|
|
|
|
|
* permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
|
|
|
|
|
* <p>Requires that the calling app is the default dialer, or has carrier privileges (see
|
|
|
|
|
* {@link #hasCarrierPrivileges}, or has permission
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
|
|
|
|
|
*
|
|
|
|
|
* @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
|
|
|
|
|
* voicemail ringtone.
|
|
|
|
|
* @param uri The URI for the ringtone to play when receiving a voicemail from a specific
|
|
|
|
|
* PhoneAccount.
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
*
|
|
|
|
|
* @deprecated Use {@link android.provider.Settings#ACTION_CHANNEL_NOTIFICATION_SETTINGS}
|
|
|
|
|
* instead.
|
|
|
|
|
@@ -7181,14 +7235,14 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Sets the per-account preference whether vibration is enabled for voicemail notifications.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires that the calling app is the default dialer, or has carrier privileges, or has
|
|
|
|
|
* permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
|
|
|
|
|
* <p>Requires that the calling app is the default dialer, or has carrier privileges (see
|
|
|
|
|
* {@link #hasCarrierPrivileges}, or has permission
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
|
|
|
|
|
*
|
|
|
|
|
* @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
|
|
|
|
|
* voicemail vibration setting.
|
|
|
|
|
* @param enabled Whether to enable or disable vibration for voicemail notifications from a
|
|
|
|
|
* specific PhoneAccount.
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
*
|
|
|
|
|
* @deprecated Use {@link android.provider.Settings#ACTION_CHANNEL_NOTIFICATION_SETTINGS}
|
|
|
|
|
* instead.
|
|
|
|
|
@@ -7611,12 +7665,10 @@ public class TelephonyManager {
|
|
|
|
|
* Otherwise, it applies to {@link SubscriptionManager#getDefaultDataSubscriptionId()}
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the
|
|
|
|
|
* calling app has carrier privileges.
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
|
|
|
|
* app has carrier privileges (see {@link #hasCarrierPrivileges}.
|
|
|
|
|
*
|
|
|
|
|
* @param enable Whether to enable mobile data.
|
|
|
|
|
*
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
|
|
|
|
|
public void setUserMobileDataEnabled(boolean enable) {
|
|
|
|
|
@@ -7634,15 +7686,13 @@ public class TelephonyManager {
|
|
|
|
|
* <p>Requires one of the following permissions:
|
|
|
|
|
* {@link android.Manifest.permission#ACCESS_NETWORK_STATE ACCESS_NETWORK_STATE},
|
|
|
|
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}, or that the
|
|
|
|
|
* calling app has carrier privileges.
|
|
|
|
|
* calling app has carrier privileges (see {@link #hasCarrierPrivileges}.
|
|
|
|
|
*
|
|
|
|
|
* <p>Note that this does not take into account any data restrictions that may be present on the
|
|
|
|
|
* calling app. Such restrictions may be inspected with
|
|
|
|
|
* {@link ConnectivityManager#getRestrictBackgroundStatus}.
|
|
|
|
|
*
|
|
|
|
|
* @return true if mobile data is enabled.
|
|
|
|
|
*
|
|
|
|
|
* @see #hasCarrierPrivileges
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(anyOf = {
|
|
|
|
|
android.Manifest.permission.ACCESS_NETWORK_STATE,
|
|
|
|
|
|