Use correct format info for SMS
Use correct format to - Parse SMS delivery report. - Dump/Load SMS to/from the dump file. TODO: Update message text state during composing. Test: Manual Change-Id: I7e53bed86130484a634c9305b276e2586db31796 Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user