|
|
|
|
@@ -322,9 +322,6 @@ public class TelephonyManager {
|
|
|
|
|
* a String.
|
|
|
|
|
*
|
|
|
|
|
* <p class="note">
|
|
|
|
|
* Requires the READ_PHONE_STATE permission.
|
|
|
|
|
*
|
|
|
|
|
* <p class="note">
|
|
|
|
|
* This was a {@link android.content.Context#sendStickyBroadcast sticky}
|
|
|
|
|
* broadcast in version 1.0, but it is no longer sticky.
|
|
|
|
|
* Instead, use {@link #getCallState} to synchronously query the current call state.
|
|
|
|
|
@@ -334,6 +331,7 @@ public class TelephonyManager {
|
|
|
|
|
* @see #getCallState
|
|
|
|
|
*/
|
|
|
|
|
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public static final String ACTION_PHONE_STATE_CHANGED =
|
|
|
|
|
"android.intent.action.PHONE_STATE";
|
|
|
|
|
|
|
|
|
|
@@ -906,10 +904,8 @@ 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}
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getDeviceSoftwareVersion() {
|
|
|
|
|
return getDeviceSoftwareVersion(getSlotIndex());
|
|
|
|
|
}
|
|
|
|
|
@@ -919,12 +915,10 @@ public class TelephonyManager {
|
|
|
|
|
* 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}
|
|
|
|
|
*
|
|
|
|
|
* @param slotIndex of which deviceID is returned
|
|
|
|
|
*/
|
|
|
|
|
/** {@hide} */
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getDeviceSoftwareVersion(int slotIndex) {
|
|
|
|
|
ITelephony telephony = getITelephony();
|
|
|
|
|
if (telephony == null) return null;
|
|
|
|
|
@@ -942,13 +936,11 @@ 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}
|
|
|
|
|
*
|
|
|
|
|
* @deprecated Use (@link getImei} which returns IMEI for GSM or (@link getMeid} which returns
|
|
|
|
|
* MEID for CDMA.
|
|
|
|
|
*/
|
|
|
|
|
@Deprecated
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getDeviceId() {
|
|
|
|
|
try {
|
|
|
|
|
ITelephony telephony = getITelephony();
|
|
|
|
|
@@ -966,15 +958,13 @@ 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}
|
|
|
|
|
*
|
|
|
|
|
* @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
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getDeviceId(int slotIndex) {
|
|
|
|
|
// FIXME this assumes phoneId == slotIndex
|
|
|
|
|
try {
|
|
|
|
|
@@ -992,10 +982,8 @@ 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}
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getImei() {
|
|
|
|
|
return getImei(getSlotIndex());
|
|
|
|
|
}
|
|
|
|
|
@@ -1004,11 +992,9 @@ 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}
|
|
|
|
|
*
|
|
|
|
|
* @param slotIndex of which IMEI is returned
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getImei(int slotIndex) {
|
|
|
|
|
ITelephony telephony = getITelephony();
|
|
|
|
|
if (telephony == null) return null;
|
|
|
|
|
@@ -1024,10 +1010,8 @@ 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}
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getMeid() {
|
|
|
|
|
return getMeid(getSlotIndex());
|
|
|
|
|
}
|
|
|
|
|
@@ -1035,11 +1019,9 @@ 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}
|
|
|
|
|
*
|
|
|
|
|
* @param slotIndex of which MEID is returned
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getMeid(int slotIndex) {
|
|
|
|
|
ITelephony telephony = getITelephony();
|
|
|
|
|
if (telephony == null) return null;
|
|
|
|
|
@@ -1095,13 +1077,13 @@ public class TelephonyManager {
|
|
|
|
|
*<p>
|
|
|
|
|
* @return Current location of the device or null if not available.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#ACCESS_COARSE_LOCATION ACCESS_COARSE_LOCATION} or
|
|
|
|
|
* {@link android.Manifest.permission#ACCESS_COARSE_LOCATION ACCESS_FINE_LOCATION}.
|
|
|
|
|
*
|
|
|
|
|
* @deprecated use {@link #getAllCellInfo} instead, which returns a superset of this API.
|
|
|
|
|
*/
|
|
|
|
|
@Deprecated
|
|
|
|
|
@RequiresPermission(anyOf = {
|
|
|
|
|
android.Manifest.permission.ACCESS_COARSE_LOCATION,
|
|
|
|
|
android.Manifest.permission.ACCESS_FINE_LOCATION
|
|
|
|
|
})
|
|
|
|
|
public CellLocation getCellLocation() {
|
|
|
|
|
try {
|
|
|
|
|
ITelephony telephony = getITelephony();
|
|
|
|
|
@@ -1133,11 +1115,9 @@ public class TelephonyManager {
|
|
|
|
|
* Enables location update notifications. {@link PhoneStateListener#onCellLocationChanged
|
|
|
|
|
* PhoneStateListener.onCellLocationChanged} will be called on location updates.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission: {@link android.Manifest.permission#CONTROL_LOCATION_UPDATES
|
|
|
|
|
* CONTROL_LOCATION_UPDATES}
|
|
|
|
|
*
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.CONTROL_LOCATION_UPDATES)
|
|
|
|
|
public void enableLocationUpdates() {
|
|
|
|
|
enableLocationUpdates(getSubId());
|
|
|
|
|
}
|
|
|
|
|
@@ -1147,12 +1127,10 @@ public class TelephonyManager {
|
|
|
|
|
* {@link PhoneStateListener#onCellLocationChanged
|
|
|
|
|
* PhoneStateListener.onCellLocationChanged} will be called on location updates.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission: {@link android.Manifest.permission#CONTROL_LOCATION_UPDATES
|
|
|
|
|
* CONTROL_LOCATION_UPDATES}
|
|
|
|
|
*
|
|
|
|
|
* @param subId for which the location updates are enabled
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.CONTROL_LOCATION_UPDATES)
|
|
|
|
|
public void enableLocationUpdates(int subId) {
|
|
|
|
|
try {
|
|
|
|
|
ITelephony telephony = getITelephony();
|
|
|
|
|
@@ -1167,11 +1145,9 @@ public class TelephonyManager {
|
|
|
|
|
* Disables location update notifications. {@link PhoneStateListener#onCellLocationChanged
|
|
|
|
|
* PhoneStateListener.onCellLocationChanged} will be called on location updates.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission: {@link android.Manifest.permission#CONTROL_LOCATION_UPDATES
|
|
|
|
|
* CONTROL_LOCATION_UPDATES}
|
|
|
|
|
*
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.CONTROL_LOCATION_UPDATES)
|
|
|
|
|
public void disableLocationUpdates() {
|
|
|
|
|
disableLocationUpdates(getSubId());
|
|
|
|
|
}
|
|
|
|
|
@@ -1190,15 +1166,13 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Returns the neighboring cell information of the device.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}
|
|
|
|
|
*
|
|
|
|
|
* @return List of NeighboringCellInfo or null if info unavailable.
|
|
|
|
|
*
|
|
|
|
|
* @deprecated Use {@link #getAllCellInfo} which returns a superset of the information
|
|
|
|
|
* from NeighboringCellInfo.
|
|
|
|
|
*/
|
|
|
|
|
@Deprecated
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.ACCESS_COARSE_LOCATION)
|
|
|
|
|
public List<NeighboringCellInfo> getNeighboringCellInfo() {
|
|
|
|
|
try {
|
|
|
|
|
ITelephony telephony = getITelephony();
|
|
|
|
|
@@ -1554,14 +1528,12 @@ public class TelephonyManager {
|
|
|
|
|
* invalid subscription ID is pinned to the TelephonyManager, the returned config will contain
|
|
|
|
|
* default values.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE
|
|
|
|
|
* READ_PHONE_STATE}
|
|
|
|
|
*
|
|
|
|
|
* @see CarrierConfigManager#getConfigForSubId(int)
|
|
|
|
|
* @see #createForSubscriptionId(int)
|
|
|
|
|
* @see #createForPhoneAccountHandle(PhoneAccountHandle)
|
|
|
|
|
*/
|
|
|
|
|
@WorkerThread
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public PersistableBundle getCarrierConfig() {
|
|
|
|
|
CarrierConfigManager carrierConfigManager = mContext
|
|
|
|
|
.getSystemService(CarrierConfigManager.class);
|
|
|
|
|
@@ -1721,11 +1693,9 @@ public class TelephonyManager {
|
|
|
|
|
* @see #NETWORK_TYPE_EHRPD
|
|
|
|
|
* @see #NETWORK_TYPE_HSPAP
|
|
|
|
|
*
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public int getNetworkType(int subId) {
|
|
|
|
|
try {
|
|
|
|
|
ITelephony telephony = getITelephony();
|
|
|
|
|
@@ -1751,10 +1721,6 @@ 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}
|
|
|
|
|
*
|
|
|
|
|
* @return the network type
|
|
|
|
|
*
|
|
|
|
|
* @see #NETWORK_TYPE_UNKNOWN
|
|
|
|
|
@@ -1774,6 +1740,7 @@ public class TelephonyManager {
|
|
|
|
|
* @see #NETWORK_TYPE_EHRPD
|
|
|
|
|
* @see #NETWORK_TYPE_HSPAP
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public int getDataNetworkType() {
|
|
|
|
|
return getDataNetworkType(getSubId(SubscriptionManager.getDefaultDataSubscriptionId()));
|
|
|
|
|
}
|
|
|
|
|
@@ -1784,12 +1751,9 @@ public class TelephonyManager {
|
|
|
|
|
* @return the network type
|
|
|
|
|
*
|
|
|
|
|
* @param subId for which network type is returned
|
|
|
|
|
*
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public int getDataNetworkType(int subId) {
|
|
|
|
|
try{
|
|
|
|
|
ITelephony telephony = getITelephony();
|
|
|
|
|
@@ -1810,23 +1774,17 @@ public class TelephonyManager {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the NETWORK_TYPE_xxxx for voice
|
|
|
|
|
*
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public int getVoiceNetworkType() {
|
|
|
|
|
return getVoiceNetworkType(getSubId());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the NETWORK_TYPE_xxxx for voice for a subId
|
|
|
|
|
*
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public int getVoiceNetworkType(int subId) {
|
|
|
|
|
try{
|
|
|
|
|
ITelephony telephony = getITelephony();
|
|
|
|
|
@@ -2228,10 +2186,8 @@ 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}
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getSimSerialNumber() {
|
|
|
|
|
return getSimSerialNumber(getSubId());
|
|
|
|
|
}
|
|
|
|
|
@@ -2241,10 +2197,9 @@ public class TelephonyManager {
|
|
|
|
|
* unavailable.
|
|
|
|
|
* <p>
|
|
|
|
|
* @param subId for which Sim Serial number is returned
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getSimSerialNumber(int subId) {
|
|
|
|
|
try {
|
|
|
|
|
IPhoneSubInfo info = getSubscriberInfo();
|
|
|
|
|
@@ -2267,12 +2222,9 @@ public class TelephonyManager {
|
|
|
|
|
* @return {@link PhoneConstants#LTE_ON_CDMA_UNKNOWN}, {@link PhoneConstants#LTE_ON_CDMA_FALSE}
|
|
|
|
|
* or {@link PhoneConstants#LTE_ON_CDMA_TRUE}
|
|
|
|
|
*
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
*
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public int getLteOnCdmaMode() {
|
|
|
|
|
return getLteOnCdmaMode(getSubId());
|
|
|
|
|
}
|
|
|
|
|
@@ -2285,12 +2237,9 @@ public class TelephonyManager {
|
|
|
|
|
* @param subId for which radio is LTE on CDMA is returned
|
|
|
|
|
* @return {@link PhoneConstants#LTE_ON_CDMA_UNKNOWN}, {@link PhoneConstants#LTE_ON_CDMA_FALSE}
|
|
|
|
|
* or {@link PhoneConstants#LTE_ON_CDMA_TRUE}
|
|
|
|
|
*
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public int getLteOnCdmaMode(int subId) {
|
|
|
|
|
try {
|
|
|
|
|
ITelephony telephony = getITelephony();
|
|
|
|
|
@@ -2315,10 +2264,8 @@ 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}
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getSubscriberId() {
|
|
|
|
|
return getSubscriberId(getSubId());
|
|
|
|
|
}
|
|
|
|
|
@@ -2327,13 +2274,11 @@ public class TelephonyManager {
|
|
|
|
|
* Returns the unique subscriber ID, for example, the IMSI for a GSM phone
|
|
|
|
|
* for a subscription.
|
|
|
|
|
* Return null if it is unavailable.
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
*
|
|
|
|
|
* @param subId whose subscriber id is returned
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getSubscriberId(int subId) {
|
|
|
|
|
try {
|
|
|
|
|
IPhoneSubInfo info = getSubscriberInfo();
|
|
|
|
|
@@ -2351,10 +2296,8 @@ 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}
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getGroupIdLevel1() {
|
|
|
|
|
try {
|
|
|
|
|
IPhoneSubInfo info = getSubscriberInfo();
|
|
|
|
|
@@ -2372,13 +2315,11 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Returns the Group Identifier Level1 for a GSM phone for a particular subscription.
|
|
|
|
|
* Return null if it is unavailable.
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
*
|
|
|
|
|
* @param subId whose subscriber id is returned
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getGroupIdLevel1(int subId) {
|
|
|
|
|
try {
|
|
|
|
|
IPhoneSubInfo info = getSubscriberInfo();
|
|
|
|
|
@@ -2397,15 +2338,13 @@ 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>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* OR
|
|
|
|
|
* {@link android.Manifest.permission#READ_SMS}
|
|
|
|
|
* OR
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_NUMBERS}
|
|
|
|
|
* <p>
|
|
|
|
|
* The default SMS app can also use this.
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(anyOf = {
|
|
|
|
|
android.Manifest.permission.READ_PHONE_STATE,
|
|
|
|
|
android.Manifest.permission.READ_SMS,
|
|
|
|
|
android.Manifest.permission.READ_PHONE_NUMBERS
|
|
|
|
|
})
|
|
|
|
|
public String getLine1Number() {
|
|
|
|
|
return getLine1Number(getSubId());
|
|
|
|
|
}
|
|
|
|
|
@@ -2414,18 +2353,16 @@ public class TelephonyManager {
|
|
|
|
|
* Returns the phone number string for line 1, for example, the MSISDN
|
|
|
|
|
* for a GSM phone for a particular subscription. Return null if it is unavailable.
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* OR
|
|
|
|
|
* {@link android.Manifest.permission#READ_SMS}
|
|
|
|
|
* OR
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_NUMBERS}
|
|
|
|
|
* <p>
|
|
|
|
|
* The default SMS app can also use this.
|
|
|
|
|
*
|
|
|
|
|
* @param subId whose phone number for line 1 is returned
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(anyOf = {
|
|
|
|
|
android.Manifest.permission.READ_PHONE_STATE,
|
|
|
|
|
android.Manifest.permission.READ_SMS,
|
|
|
|
|
android.Manifest.permission.READ_PHONE_NUMBERS
|
|
|
|
|
})
|
|
|
|
|
public String getLine1Number(int subId) {
|
|
|
|
|
String number = null;
|
|
|
|
|
try {
|
|
|
|
|
@@ -2497,12 +2434,10 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Returns the alphabetic identifier associated with the line 1 number.
|
|
|
|
|
* Return null if it is unavailable.
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* @hide
|
|
|
|
|
* nobody seems to call this.
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getLine1AlphaTag() {
|
|
|
|
|
return getLine1AlphaTag(getSubId());
|
|
|
|
|
}
|
|
|
|
|
@@ -2511,13 +2446,11 @@ public class TelephonyManager {
|
|
|
|
|
* Returns the alphabetic identifier associated with the line 1 number
|
|
|
|
|
* for a subscription.
|
|
|
|
|
* Return null if it is unavailable.
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* @param subId whose alphabetic identifier associated with line 1 is returned
|
|
|
|
|
* nobody seems to call this.
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getLine1AlphaTag(int subId) {
|
|
|
|
|
String alphaTag = null;
|
|
|
|
|
try {
|
|
|
|
|
@@ -2566,12 +2499,10 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Returns the MSISDN string.
|
|
|
|
|
* for a GSM phone. Return null if it is unavailable.
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
*
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getMsisdn() {
|
|
|
|
|
return getMsisdn(getSubId());
|
|
|
|
|
}
|
|
|
|
|
@@ -2579,13 +2510,11 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Returns the MSISDN string.
|
|
|
|
|
* for a GSM phone. Return null if it is unavailable.
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
*
|
|
|
|
|
* @param subId for which msisdn is returned
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getMsisdn(int subId) {
|
|
|
|
|
try {
|
|
|
|
|
IPhoneSubInfo info = getSubscriberInfo();
|
|
|
|
|
@@ -2602,10 +2531,8 @@ 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}
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getVoiceMailNumber() {
|
|
|
|
|
return getVoiceMailNumber(getSubId());
|
|
|
|
|
}
|
|
|
|
|
@@ -2613,12 +2540,10 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Returns the voice mail number for a subscription.
|
|
|
|
|
* Return null if it is unavailable.
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* @param subId whose voice mail number is returned
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getVoiceMailNumber(int subId) {
|
|
|
|
|
try {
|
|
|
|
|
IPhoneSubInfo info = getSubscriberInfo();
|
|
|
|
|
@@ -2635,25 +2560,21 @@ public class TelephonyManager {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the complete voice mail number. Return null if it is unavailable.
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#CALL_PRIVILEGED CALL_PRIVILEGED}
|
|
|
|
|
*
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.CALL_PRIVILEGED)
|
|
|
|
|
public String getCompleteVoiceMailNumber() {
|
|
|
|
|
return getCompleteVoiceMailNumber(getSubId());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the complete voice mail number. Return null if it is unavailable.
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#CALL_PRIVILEGED CALL_PRIVILEGED}
|
|
|
|
|
*
|
|
|
|
|
* @param subId
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.CALL_PRIVILEGED)
|
|
|
|
|
public String getCompleteVoiceMailNumber(int subId) {
|
|
|
|
|
try {
|
|
|
|
|
IPhoneSubInfo info = getSubscriberInfo();
|
|
|
|
|
@@ -2724,9 +2645,6 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Returns whether the visual voicemail client is enabled.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
*
|
|
|
|
|
* @param phoneAccountHandle the phone account to check for.
|
|
|
|
|
* @return {@code true} when the visual voicemail client is enabled for this client
|
|
|
|
|
* @hide
|
|
|
|
|
@@ -2734,6 +2652,7 @@ public class TelephonyManager {
|
|
|
|
|
* be implemented instead.
|
|
|
|
|
*/
|
|
|
|
|
@SystemApi
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public boolean isVisualVoicemailEnabled(PhoneAccountHandle phoneAccountHandle){
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
@@ -2744,14 +2663,12 @@ 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}
|
|
|
|
|
*
|
|
|
|
|
* @see #createForSubscriptionId(int)
|
|
|
|
|
* @see #createForPhoneAccountHandle(PhoneAccountHandle)
|
|
|
|
|
* @see VisualVoicemailService
|
|
|
|
|
*/
|
|
|
|
|
@Nullable
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getVisualVoicemailPackageName() {
|
|
|
|
|
try {
|
|
|
|
|
ITelephony telephony = getITelephony();
|
|
|
|
|
@@ -2863,9 +2780,6 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Send a visual voicemail SMS. The IPC caller must be the current default dialer.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#SEND_SMS SEND_SMS}
|
|
|
|
|
*
|
|
|
|
|
* @param phoneAccountHandle The account to send the SMS with.
|
|
|
|
|
* @param number The destination number.
|
|
|
|
|
* @param port The destination port for data SMS, or 0 for text SMS.
|
|
|
|
|
@@ -2877,6 +2791,7 @@ public class TelephonyManager {
|
|
|
|
|
*
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.SEND_SMS)
|
|
|
|
|
public void sendVisualVoicemailSmsForSubscriber(int subId, String number, int port,
|
|
|
|
|
String text, PendingIntent sentIntent) {
|
|
|
|
|
try {
|
|
|
|
|
@@ -2981,9 +2896,6 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Returns the voice activation state for the given subscriber.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE}
|
|
|
|
|
*
|
|
|
|
|
* @param subId The subscription id.
|
|
|
|
|
*
|
|
|
|
|
* @return voiceActivationState for the given subscriber
|
|
|
|
|
@@ -2993,6 +2905,7 @@ public class TelephonyManager {
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_DEACTIVATED
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public int getVoiceActivationState(int subId) {
|
|
|
|
|
try {
|
|
|
|
|
ITelephony telephony = getITelephony();
|
|
|
|
|
@@ -3007,9 +2920,6 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Returns the data activation state for the given subscriber.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE}
|
|
|
|
|
*
|
|
|
|
|
* @param subId The subscription id.
|
|
|
|
|
*
|
|
|
|
|
* @return dataActivationState for the given subscriber
|
|
|
|
|
@@ -3020,6 +2930,7 @@ public class TelephonyManager {
|
|
|
|
|
* @see #SIM_ACTIVATION_STATE_RESTRICTED
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public int getDataActivationState(int subId) {
|
|
|
|
|
try {
|
|
|
|
|
ITelephony telephony = getITelephony();
|
|
|
|
|
@@ -3034,23 +2945,19 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Returns the voice mail count. Return 0 if unavailable, -1 if there are unread voice messages
|
|
|
|
|
* but the count is unknown.
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public int getVoiceMessageCount() {
|
|
|
|
|
return getVoiceMessageCount(getSubId());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the voice mail count for a subscription. Return 0 if unavailable.
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* @param subId whose voice message count is returned
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public int getVoiceMessageCount(int subId) {
|
|
|
|
|
try {
|
|
|
|
|
ITelephony telephony = getITelephony();
|
|
|
|
|
@@ -3068,10 +2975,8 @@ 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}
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getVoiceMailAlphaTag() {
|
|
|
|
|
return getVoiceMailAlphaTag(getSubId());
|
|
|
|
|
}
|
|
|
|
|
@@ -3079,13 +2984,11 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Retrieves the alphabetic identifier associated with the voice
|
|
|
|
|
* mail number for a subscription.
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* @param subId whose alphabetic identifier associated with the
|
|
|
|
|
* voice mail number is returned
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getVoiceMailAlphaTag(int subId) {
|
|
|
|
|
try {
|
|
|
|
|
IPhoneSubInfo info = getSubscriberInfo();
|
|
|
|
|
@@ -3396,23 +3299,18 @@ public class TelephonyManager {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the CDMA ERI icon index to display
|
|
|
|
|
*
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public int getCdmaEriIconIndex() {
|
|
|
|
|
return getCdmaEriIconIndex(getSubId());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the CDMA ERI icon index to display for a subscription
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public int getCdmaEriIconIndex(int subId) {
|
|
|
|
|
try {
|
|
|
|
|
ITelephony telephony = getITelephony();
|
|
|
|
|
@@ -3432,11 +3330,9 @@ public class TelephonyManager {
|
|
|
|
|
* 0 - ON
|
|
|
|
|
* 1 - FLASHING
|
|
|
|
|
*
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public int getCdmaEriIconMode() {
|
|
|
|
|
return getCdmaEriIconMode(getSubId());
|
|
|
|
|
}
|
|
|
|
|
@@ -3446,11 +3342,9 @@ public class TelephonyManager {
|
|
|
|
|
* 0 - ON
|
|
|
|
|
* 1 - FLASHING
|
|
|
|
|
*
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public int getCdmaEriIconMode(int subId) {
|
|
|
|
|
try {
|
|
|
|
|
ITelephony telephony = getITelephony();
|
|
|
|
|
@@ -3468,11 +3362,9 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Returns the CDMA ERI text,
|
|
|
|
|
*
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getCdmaEriText() {
|
|
|
|
|
return getCdmaEriText(getSubId());
|
|
|
|
|
}
|
|
|
|
|
@@ -3480,11 +3372,9 @@ public class TelephonyManager {
|
|
|
|
|
/**
|
|
|
|
|
* Returns the CDMA ERI text, of a subscription
|
|
|
|
|
*
|
|
|
|
|
* <p>
|
|
|
|
|
* Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String getCdmaEriText(int subId) {
|
|
|
|
|
try {
|
|
|
|
|
ITelephony telephony = getITelephony();
|
|
|
|
|
@@ -3567,13 +3457,10 @@ public class TelephonyManager {
|
|
|
|
|
* android.telephony.TelephonyManager#getCellLocation getCellLocation()}
|
|
|
|
|
* instead.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires permission:
|
|
|
|
|
* {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}
|
|
|
|
|
*
|
|
|
|
|
* @return List of {@link android.telephony.CellInfo}; null if cell
|
|
|
|
|
* information is unavailable.
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.ACCESS_COARSE_LOCATION)
|
|
|
|
|
public List<CellInfo> getAllCellInfo() {
|
|
|
|
|
try {
|
|
|
|
|
ITelephony telephony = getITelephony();
|
|
|
|
|
@@ -4427,11 +4314,9 @@ public class TelephonyManager {
|
|
|
|
|
* Returns an array of Forbidden PLMNs from the USIM App
|
|
|
|
|
* Returns null if the query fails.
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires that the caller has READ_PHONE_STATE
|
|
|
|
|
*
|
|
|
|
|
* @return an array of forbidden PLMNs or null if not available
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String[] getForbiddenPlmns() {
|
|
|
|
|
return getForbiddenPlmns(getSubId(), APPTYPE_USIM);
|
|
|
|
|
}
|
|
|
|
|
@@ -4440,14 +4325,12 @@ public class TelephonyManager {
|
|
|
|
|
* Returns an array of Forbidden PLMNs from the specified SIM App
|
|
|
|
|
* Returns null if the query fails.
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires that the calling app has READ_PHONE_STATE
|
|
|
|
|
*
|
|
|
|
|
* @param subId subscription ID used for authentication
|
|
|
|
|
* @param appType the icc application type, like {@link #APPTYPE_USIM}
|
|
|
|
|
* @return fplmns an array of forbidden PLMNs
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public String[] getForbiddenPlmns(int subId, int appType) {
|
|
|
|
|
try {
|
|
|
|
|
ITelephony telephony = getITelephony();
|
|
|
|
|
@@ -6123,10 +6006,8 @@ public class TelephonyManager {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the current {@link ServiceState} information.
|
|
|
|
|
*
|
|
|
|
|
* <p>Requires Permission:
|
|
|
|
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
|
|
|
|
public ServiceState getServiceState() {
|
|
|
|
|
return getServiceStateForSubscriber(getSubId());
|
|
|
|
|
}
|
|
|
|
|
|