Loading telephony/java/android/telephony/PhoneNumberUtils.java +2 −1 Original line number Diff line number Diff line Loading @@ -689,7 +689,8 @@ public class PhoneNumberUtils return ""; } if ((bytes[offset] & 0xff) == TOA_International) { //Only TON field should be taken in concideration if ((bytes[offset] & 0xf0) == (TOA_International & 0xf0)) { prependPlus = true; } Loading tests/CoreTests/com/android/internal/telephony/PhoneNumberUtilsTest.java +10 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,16 @@ public class PhoneNumberUtilsTest extends TestCase { assertEquals("17005550020", PhoneNumberUtils.calledPartyBCDToString(b, 0, 7)); b[0] = (byte) 0x80; b[1] = (byte) 0x71; b[2] = (byte) 0x00; b[3] = (byte) 0x55; b[4] = (byte) 0x05; b[5] = (byte) 0x20; b[6] = (byte) 0xF0; assertEquals("17005550020", PhoneNumberUtils.calledPartyBCDToString(b, 0, 7)); b[0] = (byte) 0x90; b[1] = (byte) 0x71; b[2] = (byte) 0x00; b[3] = (byte) 0x55; b[4] = (byte) 0x05; b[5] = (byte) 0x20; b[6] = (byte) 0xF0; assertEquals("+17005550020", PhoneNumberUtils.calledPartyBCDToString(b, 0, 7)); b[0] = (byte) 0x91; b[1] = (byte) 0x71; b[2] = (byte) 0x00; b[3] = (byte) 0x55; b[4] = (byte) 0x05; b[5] = (byte) 0x20; b[6] = (byte) 0xF0; assertEquals("+17005550020", Loading Loading
telephony/java/android/telephony/PhoneNumberUtils.java +2 −1 Original line number Diff line number Diff line Loading @@ -689,7 +689,8 @@ public class PhoneNumberUtils return ""; } if ((bytes[offset] & 0xff) == TOA_International) { //Only TON field should be taken in concideration if ((bytes[offset] & 0xf0) == (TOA_International & 0xf0)) { prependPlus = true; } Loading
tests/CoreTests/com/android/internal/telephony/PhoneNumberUtilsTest.java +10 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,16 @@ public class PhoneNumberUtilsTest extends TestCase { assertEquals("17005550020", PhoneNumberUtils.calledPartyBCDToString(b, 0, 7)); b[0] = (byte) 0x80; b[1] = (byte) 0x71; b[2] = (byte) 0x00; b[3] = (byte) 0x55; b[4] = (byte) 0x05; b[5] = (byte) 0x20; b[6] = (byte) 0xF0; assertEquals("17005550020", PhoneNumberUtils.calledPartyBCDToString(b, 0, 7)); b[0] = (byte) 0x90; b[1] = (byte) 0x71; b[2] = (byte) 0x00; b[3] = (byte) 0x55; b[4] = (byte) 0x05; b[5] = (byte) 0x20; b[6] = (byte) 0xF0; assertEquals("+17005550020", PhoneNumberUtils.calledPartyBCDToString(b, 0, 7)); b[0] = (byte) 0x91; b[1] = (byte) 0x71; b[2] = (byte) 0x00; b[3] = (byte) 0x55; b[4] = (byte) 0x05; b[5] = (byte) 0x20; b[6] = (byte) 0xF0; assertEquals("+17005550020", Loading