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

Commit ad9b7091 authored by Sarah Chin's avatar Sarah Chin
Browse files

Consider preferred network type for 5G icon

Don't show 5G icon if NR not included in preferred network type bitmask

Test: atest NetworkTypeControllerTest
Bug: 155496097
Change-Id: I8867561e550c987cc4c43d6e1bd8c14f0118e946
parent b56c191e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -351,6 +351,11 @@ public class NetworkTypeController extends StateMachine {
    }

    private @Annotation.OverrideNetworkType int getNrDisplayType() {
        // Don't show 5G icon if preferred network type does not include 5G
        if ((mTelephonyManager.getPreferredNetworkTypeBitmask()
                & TelephonyManager.NETWORK_TYPE_BITMASK_NR) == 0) {
            return TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NONE;
        }
        // Icon display keys in order of priority
        List<String> keys = new ArrayList<>();
        // TODO: Update for NR SA
+2 −0
Original line number Diff line number Diff line
@@ -89,6 +89,8 @@ public class NetworkTypeControllerTest extends TelephonyTest {

        replaceInstance(Handler.class, "mLooper", mDisplayInfoController, Looper.myLooper());
        mNetworkTypeController = new NetworkTypeController(mPhone, mDisplayInfoController);
        doReturn(TelephonyManager.NETWORK_TYPE_BITMASK_NR)
                .when(mTelephonyManager).getPreferredNetworkTypeBitmask();
    }

    @After