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

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

Merge "Trigger pollState() on carrier config changed for GSM as well."

parents ddc08749 e058dbf4
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -2338,9 +2338,7 @@ public class GsmCdmaPhone extends Phone {

                // Load the ERI based on carrier config. Carrier might have their specific ERI.
                prepareEri();
                if (!isPhoneTypeGsm()) {
                mSST.pollState();
                }

                break;

+6 −1
Original line number Diff line number Diff line
@@ -149,14 +149,19 @@ public class GsmCdmaPhoneTest extends TelephonyTest {
    @Test
    @SmallTest
    public void testHandleActionCarrierConfigChanged() {
        Intent intent = new Intent(CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED);
        mContext.sendBroadcast(intent);
        waitForMs(50);
        verify(mSST, times(1)).pollState();

        // set voice radio tech in RIL to 1xRTT. ACTION_CARRIER_CONFIG_CHANGED should trigger a
        // query and change phone type
        mSimulatedCommands.setVoiceRadioTech(ServiceState.RIL_RADIO_TECHNOLOGY_1xRTT);
        assertTrue(mPhoneUT.isPhoneTypeGsm());
        Intent intent = new Intent(CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED);
        mContext.sendBroadcast(intent);
        waitForMs(50);
        assertTrue(mPhoneUT.isPhoneTypeCdmaLte());
        verify(mSST, times(2)).pollState();
    }

    @Test