summaryrefslogtreecommitdiffstats
path: root/src/com/android/messaging/util/DebugUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/messaging/util/DebugUtils.java')
-rw-r--r--src/com/android/messaging/util/DebugUtils.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/com/android/messaging/util/DebugUtils.java b/src/com/android/messaging/util/DebugUtils.java
index 1362f83..0d689fe 100644
--- a/src/com/android/messaging/util/DebugUtils.java
+++ b/src/com/android/messaging/util/DebugUtils.java
@@ -291,9 +291,10 @@ public class DebugUtils {
dis = new DataInputStream(fis);
// SMS dump
+ String format = null;
final int chars = dis.readInt();
if (chars > 0) {
- final String format = dis.readUTF();
+ format = dis.readUTF();
}
final int count = dis.readInt();
final SmsMessage[] messagesTemp = new SmsMessage[count];
@@ -301,7 +302,11 @@ public class DebugUtils {
final int length = dis.readInt();
final byte[] pdu = new byte[length];
dis.read(pdu, 0, length);
- messagesTemp[i] = SmsMessage.createFromPdu(pdu);
+ if (format == null) {
+ messagesTemp[i] = SmsMessage.createFromPdu(pdu);
+ } else {
+ messagesTemp[i] = SmsMessage.createFromPdu(pdu, format);
+ }
}
messages = messagesTemp;
} catch (final FileNotFoundException e) {