summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Sarah Chin <sarahchin@google.com> 2020-01-07 17:45:05 -0800
committer Sarah Chin <sarahchin@google.com> 2020-01-16 22:18:28 +0000
commit29e0ec7ef10f11fecbdd18c7edf0ce68624f0529 (patch)
tree47c39fa21cb7f0cd3030360c12026e0353d9dcd6
parent719211525f5622d21a6fe25b22bddccafe66fa52 (diff)
Add NR to ServiceState#isLte and rename to isPsOnlyTech
Test: atest ServiceStateTest Bug: 129670729 Change-Id: Id058d90bc6c4f35c85bc719740bee41865390eb7 Merged-In: Id058d90bc6c4f35c85bc719740bee41865390eb7
-rw-r--r--telephony/java/android/telephony/ServiceState.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java
index ad8ac76642ae..b8856bc62b70 100644
--- a/telephony/java/android/telephony/ServiceState.java
+++ b/telephony/java/android/telephony/ServiceState.java
@@ -16,8 +16,6 @@
package android.telephony;
-import com.android.telephony.Rlog;
-
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -36,6 +34,8 @@ import android.telephony.NetworkRegistrationInfo.Domain;
import android.telephony.NetworkRegistrationInfo.NRState;
import android.text.TextUtils;
+import com.android.telephony.Rlog;
+
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
@@ -584,8 +584,8 @@ public class ServiceState implements Parcelable {
*/
@DuplexMode
public int getDuplexMode() {
- // only support LTE duplex mode
- if (!isLte(getRilDataRadioTechnology())) {
+ // support LTE/NR duplex mode
+ if (!isPsOnlyTech(getRilDataRadioTechnology())) {
return DUPLEX_MODE_UNKNOWN;
}
@@ -1718,9 +1718,10 @@ public class ServiceState implements Parcelable {
}
/** @hide */
- public static boolean isLte(int radioTechnology) {
- return radioTechnology == RIL_RADIO_TECHNOLOGY_LTE ||
- radioTechnology == RIL_RADIO_TECHNOLOGY_LTE_CA;
+ public static boolean isPsOnlyTech(int radioTechnology) {
+ return radioTechnology == RIL_RADIO_TECHNOLOGY_LTE
+ || radioTechnology == RIL_RADIO_TECHNOLOGY_LTE_CA
+ || radioTechnology == RIL_RADIO_TECHNOLOGY_NR;
}
/** @hide */