Merge "Add support for NETWORK_TYPE_GSM"
This commit is contained in:
@@ -797,6 +797,8 @@ public class ServiceState implements Parcelable {
|
|||||||
return TelephonyManager.NETWORK_TYPE_LTE;
|
return TelephonyManager.NETWORK_TYPE_LTE;
|
||||||
case ServiceState.RIL_RADIO_TECHNOLOGY_HSPAP:
|
case ServiceState.RIL_RADIO_TECHNOLOGY_HSPAP:
|
||||||
return TelephonyManager.NETWORK_TYPE_HSPAP;
|
return TelephonyManager.NETWORK_TYPE_HSPAP;
|
||||||
|
case ServiceState.RIL_RADIO_TECHNOLOGY_GSM:
|
||||||
|
return TelephonyManager.NETWORK_TYPE_GSM;
|
||||||
default:
|
default:
|
||||||
return TelephonyManager.NETWORK_TYPE_UNKNOWN;
|
return TelephonyManager.NETWORK_TYPE_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -872,6 +872,8 @@ public class TelephonyManager {
|
|||||||
public static final int NETWORK_TYPE_EHRPD = 14;
|
public static final int NETWORK_TYPE_EHRPD = 14;
|
||||||
/** Current network is HSPA+ */
|
/** Current network is HSPA+ */
|
||||||
public static final int NETWORK_TYPE_HSPAP = 15;
|
public static final int NETWORK_TYPE_HSPAP = 15;
|
||||||
|
/** Current network is GSM {@hide} */
|
||||||
|
public static final int NETWORK_TYPE_GSM = 16;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the NETWORK_TYPE_xxxx for current data connection.
|
* @return the NETWORK_TYPE_xxxx for current data connection.
|
||||||
@@ -963,6 +965,7 @@ public class TelephonyManager {
|
|||||||
public static int getNetworkClass(int networkType) {
|
public static int getNetworkClass(int networkType) {
|
||||||
switch (networkType) {
|
switch (networkType) {
|
||||||
case NETWORK_TYPE_GPRS:
|
case NETWORK_TYPE_GPRS:
|
||||||
|
case NETWORK_TYPE_GSM:
|
||||||
case NETWORK_TYPE_EDGE:
|
case NETWORK_TYPE_EDGE:
|
||||||
case NETWORK_TYPE_CDMA:
|
case NETWORK_TYPE_CDMA:
|
||||||
case NETWORK_TYPE_1xRTT:
|
case NETWORK_TYPE_1xRTT:
|
||||||
@@ -1029,6 +1032,8 @@ public class TelephonyManager {
|
|||||||
return "iDEN";
|
return "iDEN";
|
||||||
case NETWORK_TYPE_HSPAP:
|
case NETWORK_TYPE_HSPAP:
|
||||||
return "HSPA+";
|
return "HSPA+";
|
||||||
|
case NETWORK_TYPE_GSM:
|
||||||
|
return "GSM";
|
||||||
default:
|
default:
|
||||||
return "UNKNOWN";
|
return "UNKNOWN";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user