summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2019-10-09 00:15:10 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-10-09 00:15:10 +0000
commitc60e032391c329b981ede8165333880ec16ec8d6 (patch)
tree2d20f386b35930746b12ba1749892705973ee54e
parentdd78b67df8a6ff9f29b0bb8e338e4fa7421314c7 (diff)
parent06b97e2a3801ae0913eb0fc894e4b67b822b0fb4 (diff)
Merge "Add NETWORK_TYPE_NR to Telephony framework" into qt-qpr1-dev
-rw-r--r--telephony/java/android/telephony/ServiceState.java9
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java4
2 files changed, 12 insertions, 1 deletions
diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java
index 2651346ad393..2ea9688f9b4f 100644
--- a/telephony/java/android/telephony/ServiceState.java
+++ b/telephony/java/android/telephony/ServiceState.java
@@ -986,6 +986,9 @@ public class ServiceState implements Parcelable {
case RIL_RADIO_TECHNOLOGY_LTE_CA:
rtString = "LTE_CA";
break;
+ case RIL_RADIO_TECHNOLOGY_NR:
+ rtString = "LTE_NR";
+ break;
default:
rtString = "Unexpected";
Rlog.w(LOG_TAG, "Unexpected radioTechnology=" + rt);
@@ -1552,6 +1555,7 @@ public class ServiceState implements Parcelable {
return AccessNetworkType.CDMA2000;
case RIL_RADIO_TECHNOLOGY_LTE:
case RIL_RADIO_TECHNOLOGY_LTE_CA:
+ case RIL_RADIO_TECHNOLOGY_NR:
return AccessNetworkType.EUTRAN;
case RIL_RADIO_TECHNOLOGY_IWLAN:
return AccessNetworkType.IWLAN;
@@ -1600,6 +1604,8 @@ public class ServiceState implements Parcelable {
return ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN;
case TelephonyManager.NETWORK_TYPE_LTE_CA:
return ServiceState.RIL_RADIO_TECHNOLOGY_LTE_CA;
+ case TelephonyManager.NETWORK_TYPE_NR:
+ return ServiceState.RIL_RADIO_TECHNOLOGY_NR;
default:
return ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN;
}
@@ -1690,7 +1696,8 @@ public class ServiceState implements Parcelable {
|| radioTechnology == RIL_RADIO_TECHNOLOGY_GSM
|| radioTechnology == RIL_RADIO_TECHNOLOGY_TD_SCDMA
|| radioTechnology == RIL_RADIO_TECHNOLOGY_IWLAN
- || radioTechnology == RIL_RADIO_TECHNOLOGY_LTE_CA;
+ || radioTechnology == RIL_RADIO_TECHNOLOGY_LTE_CA
+ || radioTechnology == RIL_RADIO_TECHNOLOGY_NR;
}
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 248415bba75b..b37acf3143cb 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -2716,6 +2716,8 @@ public class TelephonyManager {
/** Class of broadly defined "4G" networks. {@hide} */
@UnsupportedAppUsage
public static final int NETWORK_CLASS_4_G = 3;
+ /** Class of broadly defined "5G" networks. {@hide} */
+ public static final int NETWORK_CLASS_5_G = 4;
/**
* Return general class of network type, such as "3G" or "4G". In cases
@@ -2748,6 +2750,8 @@ public class TelephonyManager {
case NETWORK_TYPE_IWLAN:
case NETWORK_TYPE_LTE_CA:
return NETWORK_CLASS_4_G;
+ case NETWORK_TYPE_NR:
+ return NETWORK_CLASS_5_G;
default:
return NETWORK_CLASS_UNKNOWN;
}