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

Commit 5eccbce3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Respond with STATUS_REPORT_STATUS_OK for IMS SMS reports" am:...

Merge "Respond with STATUS_REPORT_STATUS_OK for IMS SMS reports" am: f798f8e7 am: efe90de5 am: aba6c848

Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/1517999

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic59309cdd1f1b7d29f36a1108c0b6e0df2bd60d2
parents a3ace2e0 aba6c848
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -203,17 +203,12 @@ public class ImsSmsDispatcher extends SMSDispatcher {
                    throw new RemoteException(
                            "Status report received with a PDU that could not be parsed.");
                }
                int messageRef = message.mWrappedSmsMessage.mMessageRef;
                boolean handled = mSmsDispatchersController.handleSmsStatusReport(format, pdu);
                if (!handled) {
                    loge("Can not handle the status report for messageRef " + messageRef);
                }
                mSmsDispatchersController.handleSmsStatusReport(format, pdu);
                try {
                    getImsManager().acknowledgeSmsReport(
                            token,
                            messageRef,
                            handled ? ImsSmsImplBase.STATUS_REPORT_STATUS_OK
                                    : ImsSmsImplBase.STATUS_REPORT_STATUS_ERROR);
                            message.mWrappedSmsMessage.mMessageRef,
                            ImsSmsImplBase.STATUS_REPORT_STATUS_OK);
                } catch (ImsException e) {
                    loge("Failed to acknowledgeSmsReport(). Error: " + e.getMessage());
                }
+5 −3
Original line number Diff line number Diff line
@@ -801,9 +801,8 @@ public class SmsDispatchersController extends Handler {
     *
     * @param format the format.
     * @param pdu the pdu of the report.
     * @return true if the report is handled successfully, false Otherwise.
     */
    public boolean handleSmsStatusReport(String format, byte[] pdu) {
    public void handleSmsStatusReport(String format, byte[] pdu) {
        int messageRef;
        SMSDispatcher.SmsTracker tracker;
        boolean handled = false;
@@ -848,7 +847,10 @@ public class SmsDispatchersController extends Handler {
                }
            }
        }
        return handled;

        if (!handled) {
            Rlog.e(TAG, "handleSmsStatusReport: can not handle the status report!");
        }
    }

    private boolean triggerDeliveryIntent(SMSDispatcher.SmsTracker tracker, String format,
+0 −2
Original line number Diff line number Diff line
@@ -180,8 +180,6 @@ public class ImsSmsDispatcherTest extends TelephonyTest {
        pdu[2] = (byte) messageRef;

        when(mPhone.getPhoneType()).thenReturn(PhoneConstants.PHONE_TYPE_GSM);
        when(mSmsDispatchersController.handleSmsStatusReport(eq(SmsMessage.FORMAT_3GPP), eq(pdu)))
                .thenReturn(true);

        // Receive the status report
        mImsSmsDispatcher