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

Commit 97f4e579 authored by Hui Wang's avatar Hui Wang
Browse files

isRcsVolteSingleRegistrationCapable need check provisioning status.

Bug: 181986114
Test: atest TeleServiceTests:RcsProvisioningMonitorTest
Test: atest FrameworksTelephonyTests:com.telephony.ims.RcsConfigTest
Test: atest CtsTelephonyTestCases:android.telephony.ims.cts.ImsServiceTest
Change-Id: I3b97030d1d35dce2d9e1205c632e2ab94edae084
parent dc929cf3
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -144,6 +144,19 @@ public final class RcsConfigTest {
        assertTrue(config.equals(config2));
    }

    @Test
    @SmallTest
    public void testIsRcsVolteSingleRegistrationSupported() {
        String[] vals = new String[]{"0", "1", "false", "true"};
        boolean[] expectedRes = new boolean[]{false, true, false, true};
        for (int i = 0; i < vals.length; i++) {
            String xml = "<RCSConfig>\n" + "\t<rcsVolteSingleRegistration>" + vals[i]
                    + "</rcsVolteSingleRegistration>\n" + "</RCSConfig>\n";
            RcsConfig config = new RcsConfig(xml.getBytes());
            assertEquals(config.isRcsVolteSingleRegistrationSupported(), expectedRes[i]);
        }
    }

    private void createFakeSimInfo() {
        ContentValues contentValues = new ContentValues();
        final String fakeIccId = "fakeleIccId";