Fix handling format based on API level accordingly.
Use SmsMessage#createFromPdu(pdu, format) at least on M and replace SmsMessage#FORMAT_3GPP2 with "3gpp2". - SmsMessage#createFromPdu(pdu, format) is added in API level 23. - SmsMessage#FORMAT_3GPP2 is added in API level 28. Test: Manual Signed-off-by: Taesu Lee <taesu82.lee@samsung.com> Change-Id: Icab2c6c3c86ee8b6597881bfac6066fed60db4d2
This commit is contained in:
@@ -87,7 +87,7 @@ public class SendStatusReceiver extends BroadcastReceiver {
|
||||
final String format = intent.getStringExtra("format");
|
||||
status = smsMessage.getStatus();
|
||||
// Simple matching up CDMA status with GSM status.
|
||||
if (SmsMessage.FORMAT_3GPP2.equals(format)) {
|
||||
if ("3gpp2".equals(format)) {
|
||||
final int errorClass = (status >> 24) & 0x03;
|
||||
final int statusCode = (status >> 16) & 0x3f;
|
||||
switch (errorClass) {
|
||||
|
||||
Reference in New Issue
Block a user