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

Commit ad2d0217 authored by Mohamed Abdalkader's avatar Mohamed Abdalkader
Browse files

Fix bug in handling sendSmsResult for SMS over IMS

We used to check reason instead of status.

Test: Manual
Bug: 73838993
Change-Id: I170984bcaa5b5f225cbea930f5eddf705b9f8aeb
parent bc0269bd
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -105,12 +105,14 @@ public class ImsSmsDispatcher extends SMSDispatcher {
        @Override
        public void onSendSmsResult(int token, int messageRef, @SendStatusResult int status,
                int reason) throws RemoteException {
            Rlog.d(TAG, "onSendSmsResult token=" + token + " messageRef=" + messageRef
                    + " status=" + status + " reason=" + reason);
            SmsTracker tracker = mTrackers.get(token);
            if (tracker == null) {
                throw new IllegalArgumentException("Invalid token.");
            }
            tracker.mMessageRef = messageRef;
            switch(reason) {
            switch(status) {
                case ImsSmsImplBase.SEND_STATUS_OK:
                    tracker.onSent(mContext);
                    break;