Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad189b5e authored by Sarah Chin's avatar Sarah Chin Committed by Gerrit Code Review
Browse files

Merge "Add NR to ServiceState#isLte and rename to isPsOnlyTech"

parents b1147076 29e0ec7e
Loading
Loading
Loading
Loading
+8 −7
Original line number Original line Diff line number Diff line
@@ -16,8 +16,6 @@


package android.telephony;
package android.telephony;


import com.android.telephony.Rlog;

import android.annotation.IntDef;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.Nullable;
@@ -36,6 +34,8 @@ import android.telephony.NetworkRegistrationInfo.Domain;
import android.telephony.NetworkRegistrationInfo.NRState;
import android.telephony.NetworkRegistrationInfo.NRState;
import android.text.TextUtils;
import android.text.TextUtils;


import com.android.telephony.Rlog;

import java.lang.annotation.Retention;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.ArrayList;
@@ -584,8 +584,8 @@ public class ServiceState implements Parcelable {
     */
     */
    @DuplexMode
    @DuplexMode
    public int getDuplexMode() {
    public int getDuplexMode() {
        // only support LTE duplex mode
        // support LTE/NR duplex mode
        if (!isLte(getRilDataRadioTechnology())) {
        if (!isPsOnlyTech(getRilDataRadioTechnology())) {
            return DUPLEX_MODE_UNKNOWN;
            return DUPLEX_MODE_UNKNOWN;
        }
        }


@@ -1718,9 +1718,10 @@ public class ServiceState implements Parcelable {
    }
    }


    /** @hide */
    /** @hide */
    public static boolean isLte(int radioTechnology) {
    public static boolean isPsOnlyTech(int radioTechnology) {
        return radioTechnology == RIL_RADIO_TECHNOLOGY_LTE ||
        return radioTechnology == RIL_RADIO_TECHNOLOGY_LTE
                radioTechnology == RIL_RADIO_TECHNOLOGY_LTE_CA;
                || radioTechnology == RIL_RADIO_TECHNOLOGY_LTE_CA
                || radioTechnology == RIL_RADIO_TECHNOLOGY_NR;
    }
    }


    /** @hide */
    /** @hide */