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

Commit e227b2b5 authored by Sarah Chin's avatar Sarah Chin Committed by Automerger Merge Worker
Browse files

Merge "Fix NR display logic for non-LTE RATs" am: 6db57f5c

Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/1569263

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id4d5a455878885c6ca961b80e754cc43c47ef263
parents af3cac08 6db57f5c
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -352,11 +352,16 @@ public class NetworkTypeController extends StateMachine {

    private @Annotation.OverrideNetworkType int getCurrentOverrideNetworkType() {
        int displayNetworkType = TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NONE;
        int dataNetworkType = mPhone.getServiceState().getDataNetworkType();
        NetworkRegistrationInfo nri =  mPhone.getServiceState().getNetworkRegistrationInfo(
                NetworkRegistrationInfo.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
        int dataNetworkType = nri == null ? TelephonyManager.NETWORK_TYPE_UNKNOWN
                : nri.getAccessNetworkTechnology();
        boolean nrNsa = isLte(dataNetworkType)
                && mPhone.getServiceState().getNrState() != NetworkRegistrationInfo.NR_STATE_NONE;
        boolean nrSa = dataNetworkType == TelephonyManager.NETWORK_TYPE_NR;

        // NR display is not accurate when physical channel config notifications are off
        if (mIsPhysicalChannelConfigOn
                && (mPhone.getServiceState().getNrState() != NetworkRegistrationInfo.NR_STATE_NONE
                || dataNetworkType == TelephonyManager.NETWORK_TYPE_NR)) {
        if (mIsPhysicalChannelConfigOn && (nrNsa || nrSa)) {
            // Process NR display network type
            displayNetworkType = getNrDisplayType();
            if (displayNetworkType == TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NONE) {