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

Commit ac13fd6a authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes If304eff5,I7b56c2d2

* changes:
  TelephonyDisplayInfo use PS WWAN NRI for data network type
  NR SA only allow NR Advanced override
parents f8a6c926 b3a6ddf2
Loading
Loading
Loading
Loading
+8 −11
Original line number Diff line number Diff line
@@ -20,7 +20,9 @@ import android.annotation.NonNull;
import android.os.Handler;
import android.os.Registrant;
import android.os.RegistrantList;
import android.telephony.AccessNetworkConstants;
import android.telephony.AnomalyReporter;
import android.telephony.NetworkRegistrationInfo;
import android.telephony.TelephonyDisplayInfo;
import android.telephony.TelephonyManager;
import android.util.IndentingPrintWriter;
@@ -88,8 +90,11 @@ public class DisplayInfoController extends Handler {
     * NetworkTypeController.
     */
    public void updateTelephonyDisplayInfo() {
        TelephonyDisplayInfo newDisplayInfo = new TelephonyDisplayInfo(
                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();
        TelephonyDisplayInfo newDisplayInfo = new TelephonyDisplayInfo(dataNetworkType,
                mNetworkTypeController.getOverrideNetworkType());
        if (!newDisplayInfo.equals(mTelephonyDisplayInfo)) {
            logl("TelephonyDisplayInfo changed from " + mTelephonyDisplayInfo + " to "
@@ -101,14 +106,6 @@ public class DisplayInfoController extends Handler {
        }
    }

    /**
     * @return True if either the primary or secondary 5G hysteresis timer is active,
     * and false if neither are.
     */
    public boolean is5GHysteresisActive() {
        return mNetworkTypeController.is5GHysteresisActive();
    }

    /**
     * Validate the display info and trigger anomaly report if needed.
     *
@@ -136,7 +133,7 @@ public class DisplayInfoController extends Handler {
            }
        } catch (InvalidArgumentException e) {
            logel(e.getMessage());
            AnomalyReporter.reportAnomaly(UUID.fromString("3aa92a2c-94ed-46a0-a744-d6b1dfec2a54"),
            AnomalyReporter.reportAnomaly(UUID.fromString("3aa92a2c-94ed-46a0-a744-d6b1dfec2a55"),
                    e.getMessage());
        }
    }
+4 −2
Original line number Diff line number Diff line
@@ -459,8 +459,10 @@ public class NetworkTypeController extends StateMachine {
        }
        // Icon display keys in order of priority
        List<String> keys = new ArrayList<>();
        if (isNrSa && isNrAdvanced()) {
        if (isNrSa) {
            if (isNrAdvanced()) {
                keys.add(STATE_CONNECTED_NR_ADVANCED);
            }
        } else {
            switch (mPhone.getServiceState().getNrState()) {
                case NetworkRegistrationInfo.NR_STATE_CONNECTED: