属性值
与运营商名称有关的系统属性值。
Note:在CDMA网络下,属性值可能是不可靠的。
分类 | String | TelephonyProperties | 功能说明 |
---|---|---|---|
Current Network | PROPERTY_OPERATOR_ALPHA | gsm.operator.alpha | 当前注册网络运营商名称 |
PROPERTY_OPERATOR_NUMERIC | gsm.operator.numeric | 当前注册的MCC+MNC | |
PROPERTY_OPERATOR_ISROAMING | gsm.operator.isroaming | 是否在GSM漫游 | |
PROPERTY_OPERATOR_ISO_COUNTRY | gsm.operator.iso-country | MCC驻网归属地 | |
SIM Card | PROPERTY_ICC_OPERATOR_NUMERIC | gsm.sim.operator.numeric | 实体卡信息MCCMNC |
PROPERTY_ICC_OPERATOR_ALPHA | gsm.sim.operator.alpha | sim ready之后加载的实体卡本身运营商名称Service Provider Name | |
PROPERTY_ICC_OPERATOR_ISO_COUNTRY | gsm.sim.operator.iso-country | 实体卡本身MCC归属地,即 SIM provider |
源码
TelephonyProperties 接口
package com.android.internal.telephony;
import android.compat.annotation.UnsupportedAppUsage;
/**
* Contains a list of string constants used to get or set telephone properties
* in the system. You can use {@link android.os.SystemProperties os.SystemProperties}
* to get and set these values.
* @hide
*/
public interface TelephonyProperties {
//****** Baseband and Radio Interface version
//TODO T: property strings do not have to be gsm specific
// change gsm.*operator.*" properties to "operator.*" properties
//但是发现现在系统内还是沿用gsm.xxx的属性
//****** Current Network 当前注册网络信息
/** Alpha name of current registered operator.<p> 注册网络运营商名称
* Availability: when registered to a network. Result may be unreliable on
* CDMA networks.
*/
static final String PROPERTY_OPERATOR_ALPHA = "gsm.operator.alpha";
//TODO: most of these properties are generic, substitute gsm. with phone. bug 1856959
/** Numeric name (MCC+MNC) of current registered operator.<p> 驻网MCCMNC
* Availability: when registered to a network. Result may be unreliable on
* CDMA networks.
*/
static final String PROPERTY_OPERATOR_NUMERIC = "gsm.operator.numeric";
/** 'true' if the device is considered roaming on this network for GSM
* purposes.
* Availability: when registered to a network 是否GSM漫游
*/
static final String PROPERTY_OPERATOR_ISROAMING = "gsm.operator.isroaming";
/** The ISO country code equivalent of the current registered operator's
* MCC (Mobile Country Code)<p>
* Availability: when registered to a network. Result may be unreliable on
* CDMA networks. 网络归属地
*/
static final String PROPERTY_OPERATOR_ISO_COUNTRY = "gsm.operator.iso-country";
//****** SIM Card
/**
* One of <code>"UNKNOWN"</code> <code>"ABSENT"</code> <code>"PIN_REQUIRED"</code>
* <code>"PUK_REQUIRED"</code> <code>"NETWORK_LOCKED"</code> or <code>"READY"</code>
*/
static String PROPERTY_SIM_STATE = "gsm.sim.state";
/** The MCC+MNC (mobile country code+mobile network code) of the
* provider of the SIM. 5 or 6 decimal digits.
* Availability: SIM state must be "READY"
*/
@UnsupportedAppUsage
static String PROPERTY_ICC_OPERATOR_NUMERIC = "gsm.sim.operator.numeric";
/** PROPERTY_ICC_OPERATOR_ALPHA is also known as the SPN, or Service Provider Name.