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

Commit 7e6adb33 authored by Sarah Chin's avatar Sarah Chin Committed by Android (Google) Code Review
Browse files

Merge changes from topic "cdma-expectmore"

* changes:
  Patch to update QC CDMA MO SMS change
  CDMA MO SMS follow on DC feature
parents 31ce9dc4 7e3fe33c
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1186,6 +1186,13 @@ public interface CommandsInterface {
     */
    void sendCdmaSms(byte[] pdu, Message response);

    /**
     * Identical to sendCdmaSms, except that more messages are expected to be sent soon
     * @param pdu is CDMA-SMS in internal pseudo-PDU format
     * @param response response sent when operation completed
     */
    void sendCdmaSMSExpectMore(byte[] pdu, Message response);

    /**
     * send SMS over IMS with 3GPP/GSM SMS format
     * @param smscPDU is smsc address in PDU form GSM BCD format prefixed
+32 −0
Original line number Diff line number Diff line
@@ -3274,6 +3274,36 @@ public class RIL extends BaseCommands implements CommandsInterface {
        }
    }

    @Override
    public void sendCdmaSMSExpectMore(byte[] pdu, Message result) {
        if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_1_5)) {
            IRadio radioProxy = getRadioProxy(result);
            // IRadio V1.5
            android.hardware.radio.V1_5.IRadio radioProxy15 =
                    (android.hardware.radio.V1_5.IRadio) radioProxy;
            if (radioProxy15 != null) {
                RILRequest rr = obtainRequest(RIL_REQUEST_CDMA_SEND_SMS_EXPECT_MORE, result,
                        mRILDefaultWorkSource);

                // Do not log function arg for privacy
                if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));

                CdmaSmsMessage msg = new CdmaSmsMessage();
                constructCdmaSendSmsRilRequest(msg, pdu);

                try {
                    radioProxy15.sendCdmaSmsExpectMore(rr.mSerial, msg);
                    mMetrics.writeRilSendSms(mPhoneId, rr.mSerial, SmsSession.Event.Tech.SMS_CDMA,
                            SmsSession.Event.Format.SMS_FORMAT_3GPP2);
                } catch (RemoteException | RuntimeException e) {
                    handleRadioProxyExceptionForRR(rr, "sendCdmaSMSExpectMore", e);
                }
            }
        } else {
            sendCdmaSms(pdu, result);
        }
    }

    @Override
    public void sendCdmaSms(byte[] pdu, Message result) {
        IRadio radioProxy = getRadioProxy(result);
@@ -5978,6 +6008,8 @@ public class RIL extends BaseCommands implements CommandsInterface {
                return "RIL_REQUEST_GET_UICC_APPLICATIONS_ENABLEMENT";
            case RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS:
                return "RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS";
            case RIL_REQUEST_CDMA_SEND_SMS_EXPECT_MORE:
                return "RIL_REQUEST_CDMA_SEND_SMS_EXPECT_MORE";
            default: return "<unknown request>";
        }
    }
+9 −0
Original line number Diff line number Diff line
@@ -918,6 +918,15 @@ public class RadioResponse extends IRadioResponse.Stub {
        responseSms(responseInfo, sms);
    }

    /**
     *
     * @param responseInfo Response info struct containing response type, serial no. and error
     * @param sms Sms result struct as defined by SendSmsResult in types.hal
     */
    public void sendCdmaSMSExpectMoreResponse(RadioResponseInfo responseInfo, SendSmsResult sms) {
        responseSms(responseInfo, sms);
    }

    /**
     * @param responseInfo Response info struct containing response type, serial no. and error
     */
+5 −1
Original line number Diff line number Diff line
@@ -164,7 +164,11 @@ public class CdmaSMSDispatcher extends SMSDispatcher {
        //   SMS over IMS is being handled by the ImsSmsDispatcher implementation and has indicated
        //   that the message should fall back to sending over CS.
        if (0 == tracker.mImsRetry && !isIms() || imsSmsDisabled || tracker.mUsesImsServiceForIms) {
            if (tracker.mRetryCount == 0 && tracker.mExpectMore) {
                mCi.sendCdmaSMSExpectMore(pdu, reply);
            } else {
                mCi.sendCdmaSms(pdu, reply);
            }
        } else {
            mCi.sendImsCdmaSms(pdu, tracker.mImsRetry, tracker.mMessageRef, reply);
            // increment it here, so in case of SMS_FAIL_RETRY over IMS
+4 −0
Original line number Diff line number Diff line
@@ -240,6 +240,10 @@ class ImsPhoneCommandInterface extends BaseCommands implements CommandsInterface
    public void sendCdmaSms(byte[] pdu, Message result) {
    }

    @Override
    public void sendCdmaSMSExpectMore(byte[] pdu, Message result) {
    }

    @Override
    public void sendImsGsmSms (String smscPDU, String pdu,
            int retry, int messageRef, Message response) {
Loading