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

Commit abcf563e authored by Nathan Harold's avatar Nathan Harold Committed by android-build-merger
Browse files

Merge "Fix Issue Where SignalStrengthGsm is null"

am: 4069daa9

Change-Id: I06a50099b362b01a4c43dabca658cd1b1f17e973
parents 21325766 4069daa9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5870,7 +5870,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
@@ -1865,6 +1865,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