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

Commit 7988f178 authored by Hyunho's avatar Hyunho
Browse files

Create a SipDetails file and set it as a variable in ImsRegistrationAttributes

In order to more quickly debug issues during the registration, the caller should have access to specific SIP signaling information.
To access SIP information, create a class including SIP information and set it as a variable in the class related to IMS registration.

Bug: b/238192631
Test: atest ImsRegistrationTests
Change-Id: Ic41fe4f88bbbd8d4502516551663763de8a743dc
parent 3065e6b6
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -165,6 +165,21 @@ public class ImsRegistrationTests {
                eq(SUGGESTED_ACTION_TRIGGER_PLMN_BLOCK), eq(REGISTRATION_TECH_LTE));
    }

    @SmallTest
    @Test
    public void testRegistrationCallbackOnDeregisteredWithRegistrationAttributes()
            throws RemoteException {
        ImsReasonInfo info = new ImsReasonInfo();
        SipDetails details = new SipDetails.Builder(SipDetails.METHOD_REGISTER)
                .setCSeq(1).setSipResponseCode(200, "OK")
                .setSipResponseReasonHeader(10, "reasonText")
                .setCallId("testCallId").build();

        mRegistration.onDeregistered(info, details);

        verify(mCallback).onDeregisteredWithDetails(eq(info), anyInt(), anyInt(), eq(details));
    }

    @SmallTest
    @Test
    public void testRegistrationCallbackOnTechChangeFailed() throws RemoteException {