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

Commit bc9f255f authored by Sarah Chin's avatar Sarah Chin Committed by Automerger Merge Worker
Browse files

Merge "Query radio capabilities on carrier config changed" am: 062000ea

Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/1480310

Change-Id: I07bda8b9e3c8895a540ad153a4f19bee8314cf5e
parents 85fa2e57 062000ea
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);
    }
}