summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xapi/current.txt1
-rw-r--r--api/system-current.txt1
-rw-r--r--core/proto/android/telephony/enums.proto1
-rw-r--r--telephony/java/android/telephony/RadioAccessFamily.java3
-rw-r--r--telephony/java/android/telephony/ServiceState.java10
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java13
6 files changed, 26 insertions, 3 deletions
diff --git a/api/current.txt b/api/current.txt
index 0eb6985de2d9..4e4d823d2f4e 100755
--- a/api/current.txt
+++ b/api/current.txt
@@ -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
diff --git a/api/system-current.txt b/api/system-current.txt
index 4aaed7a83ffb..1e5594ce02c4 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -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
diff --git a/core/proto/android/telephony/enums.proto b/core/proto/android/telephony/enums.proto
index fba2e51937b3..477716982008 100644
--- a/core/proto/android/telephony/enums.proto
+++ b/core/proto/android/telephony/enums.proto
@@ -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.
diff --git a/telephony/java/android/telephony/RadioAccessFamily.java b/telephony/java/android/telephony/RadioAccessFamily.java
index da3acc2eedfe..448207424d59 100644
--- a/telephony/java/android/telephony/RadioAccessFamily.java
+++ b/telephony/java/android/telephony/RadioAccessFamily.java
@@ -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;
}
diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java
index 777d219449a2..13fbeaaa02b7 100644
--- a/telephony/java/android/telephony/ServiceState.java
+++ b/telephony/java/android/telephony/ServiceState.java
@@ -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
+ */
+ public static final int RIL_RADIO_TECHNOLOGY_NR = 20;
+
+ /**
+ * The number of the radio technologies.
*/
- private static final int NEXT_RIL_RADIO_TECHNOLOGY = 20;
+ private static final int NEXT_RIL_RADIO_TECHNOLOGY = 21;
/** @hide */
public static final int RIL_RADIO_CDMA_TECHNOLOGY_BITMASK =
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 585c0e40d478..a976fe6ef2fe 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -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 {}
@@ -9388,6 +9392,13 @@ public class TelephonyManager {
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
*
* <p>Requires permission: {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE} or