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

Commit 2ba7c983 authored by Brad Ebinger's avatar Brad Ebinger Committed by Gerrit Code Review
Browse files

Merge "SMS: Add UT case for getting recipient address of SubmitPdu"

parents 32d54dc2 b97addd5
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -47,6 +47,14 @@ public class GsmSmsTest extends AndroidTestCase {
        assertEquals("*#abc#*51", sms.getOriginatingAddress());
    }

    @SmallTest
    public void testRecipientAddress() throws Exception {
        String pdu = "0891683108200505F011000D91683196032930F000000006C8329BFD0E01";
        SmsMessage sms = SmsMessage.createFromPdu(HexDump.hexStringToByteArray(pdu));
        assertEquals("+8613800250500", sms.getServiceCenterAddress());
        assertEquals("+8613693092030", sms.getRecipientAddress());
    }

    @SmallTest
    public void testUdh() throws Exception {
        String pdu = "07914140279510F6440A8111110301003BF56080207130138A8C0B05040B8423F"
+8 −0
Original line number Diff line number Diff line
@@ -114,6 +114,14 @@ public class CdmaSmsTest extends AndroidTestCase {
        assertEquals(CdmaSmsAddress.parse("f\u0080oo bar"), null);
    }

    @SmallTest
    public void testRecipientAddress() throws Exception {
        String pdu = "011a0000001002080d0003100160010610262d5ab500040401448888";
        SmsMessage sms = SmsMessage.createFromEfRecord(0,
                HexDump.hexStringToByteArray(pdu));
        assertEquals("12222", sms.getRecipientAddress());
    }

    @SmallTest
    public void testUserData7bitGsm() throws Exception {
        String pdu = "00031040900112488ea794e074d69e1b7392c270326cde9e98";