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

Commit f798f8e7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Respond with STATUS_REPORT_STATUS_OK for IMS SMS reports"

parents d77c2b83 2852360d
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -195,17 +195,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
@@ -789,9 +789,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;
@@ -836,7 +835,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