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

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

Merge "Fix Issue Where SignalStrengthGsm is null" am: 4069daa9

am: abcf563e

Change-Id: I8a5a1a1d7b1880f0424a0bf6aafcb50459c22c57
parents 430b5f6d abcf563e
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