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

Commit 5ba661c1 authored by Nathan Harold's avatar Nathan Harold Committed by Android (Google) Code Review
Browse files

Merge "Fix Issue Where SignalStrengthGsm is null" into qt-r1-dev

parents b3cd271b fc92e59c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5900,7 +5900,7 @@ public class RIL extends BaseCommands implements CommandsInterface {
        List<CellSignalStrengthGsm> gsmList = signalStrength.getCellSignalStrengths(
                CellSignalStrengthGsm.class);
        // If GSM is not the primary type, then bail out; no fixup needed.
        if (gsmList == null || gsmList.get(0) == null || !gsmList.get(0).isValid()) {
        if (gsmList.isEmpty() || !gsmList.get(0).isValid()) {
            return signalStrength;
        }

+11 −0
Original line number Diff line number Diff line
@@ -1924,6 +1924,17 @@ public class RILTest extends TelephonyTest {
                .when(mServiceState).getRilVoiceRadioTechnology();
        result = mRILUnderTest.fixupSignalStrength10(gsmSignalStrength);
        assertEquals(result, gsmSignalStrength);

        // Check that non-GSM non-WCDMA signal strengths are also passed through.
        SignalStrength lteSignalStrength = new SignalStrength(
                new CellSignalStrengthCdma(), new CellSignalStrengthGsm(),
                new CellSignalStrengthWcdma(), new CellSignalStrengthTdscdma(),
                new CellSignalStrengthLte(CellInfo.UNAVAILABLE,
                        -120, -10, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE,
                        CellInfo.UNAVAILABLE), new CellSignalStrengthNr());
        SignalStrength lteResult = mRILUnderTest.fixupSignalStrength10(lteSignalStrength);

        assertEquals(lteResult, lteSignalStrength);
    }

    @Test