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

Commit a4ff671d authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6758226 from 0c941bce to rvc-qpr1-release

Change-Id: Id9f0e8accc9cc31458fcd705449c5422fbf06813
parents f1e76c65 0c941bce
Loading
Loading
Loading
Loading
+114 −98
Original line number Diff line number Diff line
@@ -118,6 +118,8 @@ public class ImsSmsDispatcher extends SMSDispatcher {
        @Override
        public void onSendSmsResult(int token, int messageRef, @SendStatusResult int status,
                int reason, int networkReasonCode) {
            final long identity = Binder.clearCallingIdentity();
            try {
                logd("onSendSmsResult token=" + token + " messageRef=" + messageRef
                        + " status=" + status + " reason=" + reason + " networkReasonCode="
                        + networkReasonCode);
@@ -152,11 +154,16 @@ public class ImsSmsDispatcher extends SMSDispatcher {
                        break;
                    default:
                }
            } finally {
                Binder.restoreCallingIdentity(identity);
            }
        }

        @Override
        public void onSmsStatusReportReceived(int token, String format, byte[] pdu)
                throws RemoteException {
            final long identity = Binder.clearCallingIdentity();
            try {
                logd("Status report received.");
                android.telephony.SmsMessage message =
                        android.telephony.SmsMessage.createFromPdu(pdu, format);
@@ -195,10 +202,15 @@ public class ImsSmsDispatcher extends SMSDispatcher {
                if (result.second) {
                    mTrackers.remove(key);
                }
            } finally {
                Binder.restoreCallingIdentity(identity);
            }
        }

        @Override
        public void onSmsReceived(int token, String format, byte[] pdu) {
            final long identity = Binder.clearCallingIdentity();
            try {
                logd("SMS received.");
                android.telephony.SmsMessage message =
                        android.telephony.SmsMessage.createFromPdu(pdu, format);
@@ -213,7 +225,8 @@ public class ImsSmsDispatcher extends SMSDispatcher {
                            mappedResult = ImsSmsImplBase.DELIVER_STATUS_ERROR_NO_MEMORY;
                            break;
                        case Intents.RESULT_SMS_UNSUPPORTED:
                        mappedResult = ImsSmsImplBase.DELIVER_STATUS_ERROR_REQUEST_NOT_SUPPORTED;
                            mappedResult =
                                    ImsSmsImplBase.DELIVER_STATUS_ERROR_REQUEST_NOT_SUPPORTED;
                            break;
                        default:
                            mappedResult = ImsSmsImplBase.DELIVER_STATUS_ERROR_GENERIC;
@@ -231,6 +244,9 @@ public class ImsSmsDispatcher extends SMSDispatcher {
                        loge("Failed to acknowledgeSms(). Error: " + e.getMessage());
                    }
                }, true);
            } finally {
                Binder.restoreCallingIdentity(identity);
            }
        }
    };