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

Commit 062000ea authored by Sarah Chin's avatar Sarah Chin Committed by Gerrit Code Review
Browse files

Merge "Query radio capabilities on carrier config changed"

parents 14beebbd 62ca5909
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2773,6 +2773,8 @@ public class GsmCdmaPhone extends Phone {
                break;

            case EVENT_CARRIER_CONFIG_CHANGED:
                // Obtain new radio capabilities from the modem, since some are SIM-dependent
                mCi.getRadioCapability(obtainMessage(EVENT_GET_RADIO_CAPABILITY));
                // Only check for the voice radio tech if it not going to be updated by the voice
                // registration changes.
                if (!mContext.getResources().getBoolean(
+11 −0
Original line number Diff line number Diff line
@@ -1375,4 +1375,15 @@ public class GsmCdmaPhoneTest extends TelephonyTest {

        replaceInstance(Phone.class, "mImsPhone", mPhoneUT, mImsPhone);
    }

    @Test
    public void testEventCarrierConfigChanged() {
        mPhoneUT.mCi = mMockCi;
        mPhoneUT.sendMessage(mPhoneUT.obtainMessage(Phone.EVENT_CARRIER_CONFIG_CHANGED));
        processAllMessages();

        ArgumentCaptor<Message> captor = ArgumentCaptor.forClass(Message.class);
        verify(mMockCi).getRadioCapability(captor.capture());
        assertEquals(captor.getValue().what, Phone.EVENT_GET_RADIO_CAPABILITY);
    }
}