Merge change Ie7105dae into eclair

* changes:
  Handle bad SIM message
This commit is contained in:
Android (Google) Code Review
2009-10-22 18:37:51 -04:00
2 changed files with 4 additions and 2 deletions

View File

@@ -360,7 +360,9 @@ public final class SmsManager {
// List contains all records, including "free" records (null)
if (data != null) {
SmsMessage sms = SmsMessage.createFromEfRecord(i+1, data.getBytes());
messages.add(sms);
if (sms != null) {
messages.add(sms);
}
}
}
}

View File

@@ -218,7 +218,7 @@ public class SmsMessage {
index, data);
}
return new SmsMessage(wrappedMessage);
return wrappedMessage != null ? new SmsMessage(wrappedMessage) : null;
}
/**