Merge "Add 5G rat type"

This commit is contained in:
Pengquan Meng
2018-12-10 22:00:35 +00:00
committed by Gerrit Code Review
6 changed files with 26 additions and 3 deletions

View File

@@ -43086,6 +43086,7 @@ package android.telephony {
field public static final int NETWORK_TYPE_IDEN = 11; // 0xb
field public static final int NETWORK_TYPE_IWLAN = 18; // 0x12
field public static final int NETWORK_TYPE_LTE = 13; // 0xd
field public static final int NETWORK_TYPE_NR = 20; // 0x14
field public static final int NETWORK_TYPE_TD_SCDMA = 17; // 0x11
field public static final int NETWORK_TYPE_UMTS = 3; // 0x3
field public static final int NETWORK_TYPE_UNKNOWN = 0; // 0x0

View File

@@ -5439,6 +5439,7 @@ package android.telephony {
field public static final int NETWORK_TYPE_BITMASK_HSUPA = 512; // 0x200
field public static final int NETWORK_TYPE_BITMASK_LTE = 8192; // 0x2000
field public static final int NETWORK_TYPE_BITMASK_LTE_CA = 524288; // 0x80000
field public static final int NETWORK_TYPE_BITMASK_NR = 1048576; // 0x100000
field public static final int NETWORK_TYPE_BITMASK_TD_SCDMA = 131072; // 0x20000
field public static final int NETWORK_TYPE_BITMASK_UMTS = 8; // 0x8
field public static final int NETWORK_TYPE_BITMASK_UNKNOWN = 1; // 0x1

View File

@@ -51,6 +51,7 @@ enum NetworkTypeEnum {
NETWORK_TYPE_TD_SCDMA = 17;
NETWORK_TYPE_IWLAN = 18;
NETWORK_TYPE_LTE_CA = 19;
NETWORK_TYPE_NR = 20;
}
// Signal strength levels, primarily used by android/telephony/SignalStrength.java.

View File

@@ -460,6 +460,9 @@ public class RadioAccessFamily implements Parcelable {
if ((raf & (1 << ServiceState.RIL_RADIO_TECHNOLOGY_LTE_CA)) != 0) {
networkTypeRaf |= TelephonyManager.NETWORK_TYPE_BITMASK_LTE_CA;
}
if ((raf & (1 << ServiceState.RIL_RADIO_TECHNOLOGY_NR)) != 0) {
networkTypeRaf |= TelephonyManager.NETWORK_TYPE_BITMASK_NR;
}
return (networkTypeRaf == 0) ? TelephonyManager.NETWORK_TYPE_UNKNOWN : networkTypeRaf;
}

View File

@@ -223,9 +223,15 @@ public class ServiceState implements Parcelable {
public static final int RIL_RADIO_TECHNOLOGY_LTE_CA = 19;
/**
* Number of radio technologies for GSM, UMTS and CDMA.
* NR(New Radio) 5G.
* @hide
*/
private static final int NEXT_RIL_RADIO_TECHNOLOGY = 20;
public static final int RIL_RADIO_TECHNOLOGY_NR = 20;
/**
* The number of the radio technologies.
*/
private static final int NEXT_RIL_RADIO_TECHNOLOGY = 21;
/** @hide */
public static final int RIL_RADIO_CDMA_TECHNOLOGY_BITMASK =

View File

@@ -2218,9 +2218,11 @@ public class TelephonyManager {
/** Current network is LTE_CA {@hide} */
@UnsupportedAppUsage
public static final int NETWORK_TYPE_LTE_CA = TelephonyProtoEnums.NETWORK_TYPE_LTE_CA; // = 19.
/** Current network is NR(New Radio) 5G. */
public static final int NETWORK_TYPE_NR = TelephonyProtoEnums.NETWORK_TYPE_NR; // 20.
/** Max network type number. Update as new types are added. Don't add negative types. {@hide} */
public static final int MAX_NETWORK_TYPE = NETWORK_TYPE_LTE_CA;
public static final int MAX_NETWORK_TYPE = NETWORK_TYPE_NR;
/** @hide */
@IntDef({
@@ -2244,6 +2246,7 @@ public class TelephonyManager {
NETWORK_TYPE_TD_SCDMA,
NETWORK_TYPE_IWLAN,
NETWORK_TYPE_LTE_CA,
NETWORK_TYPE_NR,
})
@Retention(RetentionPolicy.SOURCE)
public @interface NetworkType{}
@@ -9272,6 +9275,7 @@ public class TelephonyManager {
NETWORK_TYPE_BITMASK_TD_SCDMA,
NETWORK_TYPE_BITMASK_LTE,
NETWORK_TYPE_BITMASK_LTE_CA,
NETWORK_TYPE_BITMASK_NR,
})
public @interface NetworkTypeBitMask {}
@@ -9387,6 +9391,13 @@ public class TelephonyManager {
@SystemApi
public static final int NETWORK_TYPE_BITMASK_LTE_CA = (1 << NETWORK_TYPE_LTE_CA);
/**
* network type bitmask indicating the support of radio tech NR(New Radio) 5G.
* @hide
*/
@SystemApi
public static final int NETWORK_TYPE_BITMASK_NR = (1 << NETWORK_TYPE_NR);
/**
* @return Modem supported radio access family bitmask
*