summaryrefslogtreecommitdiffstats
path: root/telephony/java
diff options
context:
space:
mode:
authorTammo Spalink <tammo@google.com>2009-04-15 18:50:38 +0800
committerTammo Spalink <tammo@google.com>2009-04-15 18:50:38 +0800
commite87e9506ba130c89a2b76f8ad4677d01d1918dc0 (patch)
tree42de7416696a41eb0b0acb3dbdf8c757c0a8e9ba /telephony/java
parent967f7c169c0ff8723a72fce7073f591dcfab018d (diff)
downloadframeworks_base-e87e9506ba130c89a2b76f8ad4677d01d1918dc0.zip
frameworks_base-e87e9506ba130c89a2b76f8ad4677d01d1918dc0.tar.gz
frameworks_base-e87e9506ba130c89a2b76f8ad4677d01d1918dc0.tar.bz2
eliminate seemingly pointless conversion to and then from hex string
Diffstat (limited to 'telephony/java')
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/SIMRecords.java25
1 files changed, 6 insertions, 19 deletions
diff --git a/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java b/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java
index 09a17f5..f9015d9 100644
--- a/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java
+++ b/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java
@@ -1099,14 +1099,9 @@ public final class SIMRecords extends IccRecords {
// Note: Data may include trailing FF's. That's OK; message
// should still parse correctly.
- byte[] nba = new byte[n - 1];
- System.arraycopy(ba, 1, nba, 0, n - 1);
-
- String pdu = IccUtils.bytesToHexString(nba);
- // XXX first line is bogus
- SmsMessage message = SmsMessage.newFromCMT(
- new String[] { "", pdu });
-
+ byte[] pdu = new byte[n - 1];
+ System.arraycopy(ba, 1, pdu, 0, n - 1);
+ SmsMessage message = SmsMessage.createFromPdu(pdu);
((GSMPhone) phone).mSMS.dispatchMessage(message);
}
@@ -1130,14 +1125,9 @@ public final class SIMRecords extends IccRecords {
// Note: Data may include trailing FF's. That's OK; message
// should still parse correctly.
- byte[] nba = new byte[n - 1];
- System.arraycopy(ba, 1, nba, 0, n - 1);
-
- String pdu = IccUtils.bytesToHexString(nba);
- // XXX first line is bogus
- SmsMessage message = SmsMessage.newFromCMT(
- new String[] { "", pdu });
-
+ byte[] pdu = new byte[n - 1];
+ System.arraycopy(ba, 1, pdu, 0, n - 1);
+ SmsMessage message = SmsMessage.createFromPdu(pdu);
((GSMPhone) phone).mSMS.dispatchMessage(message);
@@ -1499,6 +1489,3 @@ public final class SIMRecords extends IccRecords {
}
}
-
-
-