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

Commit efe90de5 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: f798f8e7

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia4b419cc954aaf03a7492e225e7bd9e5fc42aba0
parents 17c973f4 f798f8e7
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
@@ -803,9 +803,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;
@@ -850,7 +849,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