Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 64cf0289 authored by Taesu Lee's avatar Taesu Lee
Browse files

Handle 3GPP2 SMS report for sent 3GPP SMS



It allows to process 3GPP2 SMS report for previously sent 3GPP SMS.
Some carriers require that devices receive 3GPP2 SMS also even if IMS
SMS format is 3GPP.

Bug: 174287385
Test: manual

Signed-off-by: default avatarTaesu Lee <taesu82.lee@samsung.com>
Change-Id: Iaf2fabc3f1937bbbfc921ce3fd2b52cf2e4359c5
parent 84307b8d
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -812,8 +812,19 @@ public class SmsDispatchersController extends Handler {
            com.android.internal.telephony.cdma.SmsMessage sms =
                    com.android.internal.telephony.cdma.SmsMessage.createFromPdu(pdu);
            if (sms != null) {
                boolean foundIn3GPPMap = false;
                messageRef = sms.mMessageRef;
                tracker = mDeliveryPendingMapFor3GPP2.get(messageRef);
                if (tracker == null) {
                    // A tracker for this 3GPP2 report may be in the 3GPP map instead if the
                    // previously submitted SMS was 3GPP format.
                    // (i.e. Some carriers require that devices receive 3GPP2 SMS also even if IMS
                    // SMS format is 3GGP.)
                    tracker = mDeliveryPendingMapFor3GPP.get(messageRef);
                    if (tracker != null) {
                        foundIn3GPPMap = true;
                    }
                }
                if (tracker != null) {
                    // The status is composed of an error class (bits 25-24) and a status code
                    // (bits 23-16).
@@ -826,8 +837,12 @@ public class SmsDispatchersController extends Handler {
                                        ? Sms.STATUS_COMPLETE
                                        : Sms.STATUS_FAILED);
                        // No longer need to be kept.
                        if (foundIn3GPPMap) {
                            mDeliveryPendingMapFor3GPP.remove(messageRef);
                        } else {
                            mDeliveryPendingMapFor3GPP2.remove(messageRef);
                        }
                    }
                    handled = triggerDeliveryIntent(tracker, format, pdu);
                }
            }