Update javadoc for TelephonyManager.getNetwork* for CDMA.
These are unreliable for CDMA, so note it in the javadoc. Also update for the corresponding TelephonyProperties.
This commit is contained in:
@@ -322,7 +322,9 @@ public class TelephonyManager {
|
|||||||
/**
|
/**
|
||||||
* Returns the alphabetic name of current registered operator.
|
* Returns the alphabetic name of current registered operator.
|
||||||
* <p>
|
* <p>
|
||||||
* Availability: Only when user is registered to a network
|
* Availability: Only when user is registered to a network. Result may be
|
||||||
|
* unreliable on CDMA networks (use {@link #getPhoneType()} to determine if
|
||||||
|
* on a CDMA network).
|
||||||
*/
|
*/
|
||||||
public String getNetworkOperatorName() {
|
public String getNetworkOperatorName() {
|
||||||
return SystemProperties.get(TelephonyProperties.PROPERTY_OPERATOR_ALPHA);
|
return SystemProperties.get(TelephonyProperties.PROPERTY_OPERATOR_ALPHA);
|
||||||
@@ -331,7 +333,9 @@ public class TelephonyManager {
|
|||||||
/**
|
/**
|
||||||
* Returns the numeric name (MCC+MNC) of current registered operator.
|
* Returns the numeric name (MCC+MNC) of current registered operator.
|
||||||
* <p>
|
* <p>
|
||||||
* Availability: Only when user is registered to a network
|
* Availability: Only when user is registered to a network. Result may be
|
||||||
|
* unreliable on CDMA networks (use {@link #getPhoneType()} to determine if
|
||||||
|
* on a CDMA network).
|
||||||
*/
|
*/
|
||||||
public String getNetworkOperator() {
|
public String getNetworkOperator() {
|
||||||
return SystemProperties.get(TelephonyProperties.PROPERTY_OPERATOR_NUMERIC);
|
return SystemProperties.get(TelephonyProperties.PROPERTY_OPERATOR_NUMERIC);
|
||||||
@@ -341,7 +345,7 @@ public class TelephonyManager {
|
|||||||
* Returns true if the device is considered roaming on the current
|
* Returns true if the device is considered roaming on the current
|
||||||
* network, for GSM purposes.
|
* network, for GSM purposes.
|
||||||
* <p>
|
* <p>
|
||||||
* Availability: Only when user registered to a network
|
* Availability: Only when user registered to a network.
|
||||||
*/
|
*/
|
||||||
public boolean isNetworkRoaming() {
|
public boolean isNetworkRoaming() {
|
||||||
return "true".equals(SystemProperties.get(TelephonyProperties.PROPERTY_OPERATOR_ISROAMING));
|
return "true".equals(SystemProperties.get(TelephonyProperties.PROPERTY_OPERATOR_ISROAMING));
|
||||||
@@ -351,7 +355,9 @@ public class TelephonyManager {
|
|||||||
* Returns the ISO country code equivilent of the current registered
|
* Returns the ISO country code equivilent of the current registered
|
||||||
* operator's MCC (Mobile Country Code).
|
* operator's MCC (Mobile Country Code).
|
||||||
* <p>
|
* <p>
|
||||||
* Availability: Only when user is registered to a network
|
* Availability: Only when user is registered to a network. Result may be
|
||||||
|
* unreliable on CDMA networks (use {@link #getPhoneType()} to determine if
|
||||||
|
* on a CDMA network).
|
||||||
*/
|
*/
|
||||||
public String getNetworkCountryIso() {
|
public String getNetworkCountryIso() {
|
||||||
return SystemProperties.get(TelephonyProperties.PROPERTY_OPERATOR_ISO_COUNTRY);
|
return SystemProperties.get(TelephonyProperties.PROPERTY_OPERATOR_ISO_COUNTRY);
|
||||||
|
|||||||
@@ -40,14 +40,16 @@ public interface TelephonyProperties
|
|||||||
|
|
||||||
//****** Current Network
|
//****** Current Network
|
||||||
|
|
||||||
/** Alpha name of current registered operator.
|
/** Alpha name of current registered operator.<p>
|
||||||
* Availability: when registered to a network
|
* Availability: when registered to a network. Result may be unreliable on
|
||||||
|
* CDMA networks.
|
||||||
*/
|
*/
|
||||||
static final String PROPERTY_OPERATOR_ALPHA = "gsm.operator.alpha";
|
static final String PROPERTY_OPERATOR_ALPHA = "gsm.operator.alpha";
|
||||||
//TODO: most of these proprieties are generic, substitute gsm. with phone. bug 1856959
|
//TODO: most of these proprieties are generic, substitute gsm. with phone. bug 1856959
|
||||||
|
|
||||||
/** Numeric name (MCC+MNC) of current registered operator.
|
/** Numeric name (MCC+MNC) of current registered operator.<p>
|
||||||
* Availability: when registered to a network
|
* Availability: when registered to a network. Result may be unreliable on
|
||||||
|
* CDMA networks.
|
||||||
*/
|
*/
|
||||||
static final String PROPERTY_OPERATOR_NUMERIC = "gsm.operator.numeric";
|
static final String PROPERTY_OPERATOR_NUMERIC = "gsm.operator.numeric";
|
||||||
|
|
||||||
@@ -64,8 +66,9 @@ public interface TelephonyProperties
|
|||||||
static final String PROPERTY_OPERATOR_ISROAMING = "gsm.operator.isroaming";
|
static final String PROPERTY_OPERATOR_ISROAMING = "gsm.operator.isroaming";
|
||||||
|
|
||||||
/** The ISO country code equivalent of the current registered operator's
|
/** The ISO country code equivalent of the current registered operator's
|
||||||
* MCC (Mobile Country Code)
|
* MCC (Mobile Country Code)<p>
|
||||||
* Availability: when registered to a network
|
* Availability: when registered to a network. Result may be unreliable on
|
||||||
|
* CDMA networks.
|
||||||
*/
|
*/
|
||||||
static final String PROPERTY_OPERATOR_ISO_COUNTRY = "gsm.operator.iso-country";
|
static final String PROPERTY_OPERATOR_ISO_COUNTRY = "gsm.operator.iso-country";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user