mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-02 17:31:58 +00:00
CDMA MO SMS follow on DC feature
Add new API in @1.5 IRadio and IRadioResponse interfaces to send MO CDMA SMS with expectMore option Test: make Bug: 72613248 Change-Id: I9aec3a58b531c17ec55db290d0e82bc7d34afa84
This commit is contained in:
@@ -675,9 +675,9 @@ def77c7db95d374f11a111bfc4ed60f92451303642a43276c4e291988fcee625 android.hardwar
|
||||
# BEGIN Radio HAL Merge Conflict Avoidance Buffer - STOPSHIP if present
|
||||
##
|
||||
430f8449ddb24c02284da561bfd24bb5a2a226d9ed2aec38e876e323e2b7eeee android.hardware.radio@1.5::types
|
||||
c68f5bd87f747f8e7968ff66ecc548b2d26f8e186b7bb805c11d6c883a838fc6 android.hardware.radio@1.5::IRadio
|
||||
26216f3566aff76d8a29ee95f74bcb099a05f65ead8d6d4fadafee6967889b93 android.hardware.radio@1.5::IRadio
|
||||
e96ae1c3a9c0689002ec2318e9c587f4f607c16a75a3cd38788b77eb91072021 android.hardware.radio@1.5::IRadioIndication
|
||||
9e962eff568dc8c712d83846f8c27460de5005ed9b836d3e08390e8aa56b5a46 android.hardware.radio@1.5::IRadioResponse
|
||||
1a3324125cae8f4ca9984225d2f14bafeb835b8d9a1717fc9ed794de701f197c android.hardware.radio@1.5::IRadioResponse
|
||||
2fd107f3de1b7e36825e241a88dfae8edf3a77c166cb746f00ddf6440ab78db1 android.hardware.radio.config@1.3::types
|
||||
a2977755bc5f1ef47f04b7f2400632efda6218e1515dba847da487145cfabc4f android.hardware.radio.config@1.3::IRadioConfig
|
||||
742360c775313438b0f82256eac62fb5bbc76a6ae6f388573f3aa142fb2c1eea android.hardware.radio.config@1.3::IRadioConfigIndication
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
|
||||
package android.hardware.radio@1.5;
|
||||
|
||||
import @1.0::CdmaSmsMessage;
|
||||
import @1.2::DataRequestReason;
|
||||
import @1.4::IRadio;
|
||||
import @1.4::DataProfileInfo;
|
||||
import @1.4::IRadio;
|
||||
import @1.5::AccessNetwork;
|
||||
import @1.5::BarringInfo;
|
||||
import @1.5::DataProfileInfo;
|
||||
@@ -282,4 +283,15 @@ interface IRadio extends @1.4::IRadio {
|
||||
*/
|
||||
oneway setNetworkSelectionModeManual_1_5(int32_t serial, string operatorNumeric,
|
||||
RadioAccessNetworks ran);
|
||||
|
||||
/**
|
||||
* Send an SMS message. Identical to sendCdmaSms,
|
||||
* except that more messages are expected to be sent soon.
|
||||
*
|
||||
* @param serial Serial number of request.
|
||||
* @param sms Cdma Sms to be sent described by CdmaSmsMessage in types.hal
|
||||
*
|
||||
* Response callback is IRadioResponse.sendCdmaSMSExpectMoreResponse()
|
||||
*/
|
||||
oneway sendCdmaSmsExpectMore(int32_t serial, CdmaSmsMessage sms);
|
||||
};
|
||||
|
||||
@@ -17,11 +17,12 @@
|
||||
package android.hardware.radio@1.5;
|
||||
|
||||
import @1.0::RadioResponseInfo;
|
||||
import @1.0::SendSmsResult;
|
||||
import @1.4::IRadioResponse;
|
||||
import @1.5::BarringInfo;
|
||||
import @1.5::CellInfo;
|
||||
import @1.5::SetupDataCallResult;
|
||||
import @1.5::RegStateResult;
|
||||
import @1.5::SetupDataCallResult;
|
||||
|
||||
/**
|
||||
* Interface declaring response functions to solicited radio requests.
|
||||
@@ -236,4 +237,35 @@ interface IRadioResponse extends @1.4::IRadioResponse {
|
||||
* no retries needed, such as illegal SIM or ME.
|
||||
*/
|
||||
oneway setNetworkSelectionModeManualResponse_1_5(RadioResponseInfo info);
|
||||
|
||||
/**
|
||||
* @param info Response info struct containing response type, serial no. and error
|
||||
* @param sms Response to sms sent as defined by SendSmsResult in types.hal
|
||||
*
|
||||
* Valid errors returned:
|
||||
* RadioError:NONE
|
||||
* RadioError:RADIO_NOT_AVAILABLE
|
||||
* RadioError:SMS_SEND_FAIL_RETRY
|
||||
* RadioError:NETWORK_REJECT
|
||||
* RadioError:INVALID_STATE
|
||||
* RadioError:INVALID_ARGUMENTS
|
||||
* RadioError:NO_MEMORY
|
||||
* RadioError:REQUEST_RATE_LIMITED
|
||||
* RadioError:INVALID_SMS_FORMAT
|
||||
* RadioError:SYSTEM_ERR
|
||||
* RadioError:FDN_CHECK_FAILURE
|
||||
* RadioError:ENCODING_ERR
|
||||
* RadioError:INVALID_SMSC_ADDRESS
|
||||
* RadioError:MODEM_ERR
|
||||
* RadioError:NETWORK_ERR
|
||||
* RadioError:INTERNAL_ERR
|
||||
* RadioError:REQUEST_NOT_SUPPORTED
|
||||
* RadioError:INVALID_MODEM_STATE
|
||||
* RadioError:NETWORK_NOT_READY
|
||||
* RadioError:OPERATION_NOT_ALLOWED
|
||||
* RadioError:NO_RESOURCES
|
||||
* RadioError:CANCELLED
|
||||
* RadioError:SIM_ABSENT
|
||||
*/
|
||||
oneway sendCdmaSmsExpectMoreResponse(RadioResponseInfo info, SendSmsResult sms);
|
||||
};
|
||||
|
||||
@@ -1022,3 +1022,47 @@ TEST_F(RadioHidlTest_v1_5, setNetworkSelectionModeManual_1_5) {
|
||||
CHECK_GENERAL_ERROR));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Test IRadio.sendCdmaSmsExpectMore() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest_v1_5, sendCdmaSmsExpectMore) {
|
||||
serial = GetRandomSerialNumber();
|
||||
|
||||
// Create a CdmaSmsAddress
|
||||
CdmaSmsAddress cdmaSmsAddress;
|
||||
cdmaSmsAddress.digitMode = CdmaSmsDigitMode::FOUR_BIT;
|
||||
cdmaSmsAddress.numberMode = CdmaSmsNumberMode::NOT_DATA_NETWORK;
|
||||
cdmaSmsAddress.numberType = CdmaSmsNumberType::UNKNOWN;
|
||||
cdmaSmsAddress.numberPlan = CdmaSmsNumberPlan::UNKNOWN;
|
||||
cdmaSmsAddress.digits = (std::vector<uint8_t>){11, 1, 6, 5, 10, 7, 7, 2, 10, 3, 10, 3};
|
||||
|
||||
// Create a CdmaSmsSubAddress
|
||||
CdmaSmsSubaddress cdmaSmsSubaddress;
|
||||
cdmaSmsSubaddress.subaddressType = CdmaSmsSubaddressType::NSAP;
|
||||
cdmaSmsSubaddress.odd = false;
|
||||
cdmaSmsSubaddress.digits = (std::vector<uint8_t>){};
|
||||
|
||||
// Create a CdmaSmsMessage
|
||||
android::hardware::radio::V1_0::CdmaSmsMessage cdmaSmsMessage;
|
||||
cdmaSmsMessage.teleserviceId = 4098;
|
||||
cdmaSmsMessage.isServicePresent = false;
|
||||
cdmaSmsMessage.serviceCategory = 0;
|
||||
cdmaSmsMessage.address = cdmaSmsAddress;
|
||||
cdmaSmsMessage.subAddress = cdmaSmsSubaddress;
|
||||
cdmaSmsMessage.bearerData =
|
||||
(std::vector<uint8_t>){15, 0, 3, 32, 3, 16, 1, 8, 16, 53, 76, 68, 6, 51, 106, 0};
|
||||
|
||||
radio_v1_5->sendCdmaSmsExpectMore(serial, cdmaSmsMessage);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_5->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp_v1_5->rspInfo.serial);
|
||||
|
||||
if (cardStatus.base.base.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckAnyOfErrors(
|
||||
radioRsp_v1_5->rspInfo.error,
|
||||
{RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::SIM_ABSENT},
|
||||
CHECK_GENERAL_ERROR));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -573,6 +573,9 @@ class RadioResponse_v1_5 : public ::android::hardware::radio::V1_5::IRadioRespon
|
||||
cellInfo);
|
||||
|
||||
Return<void> setNetworkSelectionModeManualResponse_1_5(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> sendCdmaSmsExpectMoreResponse(const RadioResponseInfo& info,
|
||||
const SendSmsResult& sms);
|
||||
};
|
||||
|
||||
/* Callback class for radio indication */
|
||||
|
||||
@@ -999,3 +999,8 @@ Return<void> RadioResponse_v1_5::setNetworkSelectionModeManualResponse_1_5(
|
||||
parent_v1_5.notify(info.serial);
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse_v1_5::sendCdmaSmsExpectMoreResponse(const RadioResponseInfo& /*info*/,
|
||||
const SendSmsResult& /*sms*/) {
|
||||
return Void();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user