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

Commit 141102a4 authored by Amit Mahajan's avatar Amit Mahajan Committed by android-build-merger
Browse files

Merge "Trigger pollState() on carrier config changed for GSM as well." am: 61f96a7e

am: 2fea71e2

Change-Id: I9f12217e22d051040428cab5f8478a81d968d1dc
parents e1b7dd88 2fea71e2
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