Merge "Generate serial number randomly in VTS unit test"
am: 0c49ae609f
Change-Id: Ie1b1a3bcb2ae5f2412c75f09bdab4c50bc50e715
This commit is contained in:
commit
63724d3555
20 changed files with 2614 additions and 2686 deletions
|
@ -27,7 +27,8 @@ cc_test {
|
|||
"radio_hidl_hal_test.cpp",
|
||||
"radio_hidl_hal_voice.cpp",
|
||||
"radio_response.cpp",
|
||||
"VtsHalRadioV1_0TargetTest.cpp"],
|
||||
"VtsHalRadioV1_0TargetTest.cpp",
|
||||
"vts_test_util.cpp"],
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"liblog",
|
||||
|
@ -51,7 +52,8 @@ cc_test {
|
|||
srcs: ["sap_callback.cpp",
|
||||
"sap_hidl_hal_api.cpp",
|
||||
"sap_hidl_hal_test.cpp",
|
||||
"VtsHalSapV1_0TargetTest.cpp"],
|
||||
"VtsHalSapV1_0TargetTest.cpp",
|
||||
"vts_test_util.cpp"],
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"liblog",
|
||||
|
|
|
@ -20,6 +20,11 @@ int main(int argc, char** argv) {
|
|||
::testing::AddGlobalTestEnvironment(new RadioHidlEnvironment);
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
|
||||
// setup seed for rand function
|
||||
int seedSrand = time(NULL);
|
||||
std::cout << "seed setup for random function (radio):" + std::to_string(seedSrand) << std::endl;
|
||||
srand(seedSrand);
|
||||
|
||||
int status = RUN_ALL_TESTS();
|
||||
LOG(INFO) << "Test result = " << status;
|
||||
|
||||
|
|
|
@ -21,6 +21,11 @@ int main(int argc, char** argv) {
|
|||
::testing::AddGlobalTestEnvironment(new SapHidlEnvironment);
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
|
||||
// setup seed for rand function
|
||||
int seedSrand = time(NULL);
|
||||
std::cout << "seed setup for random function (sap):" + std::to_string(seedSrand) << std::endl;
|
||||
srand(seedSrand);
|
||||
|
||||
int status = RUN_ALL_TESTS();
|
||||
LOG(INFO) << "Test result = " << status;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ using namespace ::android::hardware::radio::V1_0;
|
|||
* Test IRadio.setGsmBroadcastConfig() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setGsmBroadcastConfig) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
// Create GsmBroadcastSmsConfigInfo #1
|
||||
GsmBroadcastSmsConfigInfo gbSmsConfig1;
|
||||
|
@ -64,11 +64,10 @@ TEST_F(RadioHidlTest, setGsmBroadcastConfig) {
|
|||
gbSmsConfig5.toCodeScheme = 255;
|
||||
gbSmsConfig5.selected = true;
|
||||
|
||||
android::hardware::hidl_vec<GsmBroadcastSmsConfigInfo>
|
||||
gsmBroadcastSmsConfigsInfoList = {
|
||||
android::hardware::hidl_vec<GsmBroadcastSmsConfigInfo> gsmBroadcastSmsConfigsInfoList = {
|
||||
gbSmsConfig1, gbSmsConfig2, gbSmsConfig3, gbSmsConfig4, gbSmsConfig5};
|
||||
|
||||
radio->setGsmBroadcastConfig(++serial, gsmBroadcastSmsConfigsInfoList);
|
||||
radio->setGsmBroadcastConfig(serial, gsmBroadcastSmsConfigsInfoList);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -86,17 +85,16 @@ TEST_F(RadioHidlTest, setGsmBroadcastConfig) {
|
|||
* Test IRadio.getGsmBroadcastConfig() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getGsmBroadcastConfig) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getGsmBroadcastConfig(++serial);
|
||||
radio->getGsmBroadcastConfig(serial);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckGeneralError() ||
|
||||
radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
|
||||
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
|
||||
radioRsp->rspInfo.error == RadioError::NONE);
|
||||
}
|
||||
}
|
||||
|
@ -105,17 +103,17 @@ TEST_F(RadioHidlTest, getGsmBroadcastConfig) {
|
|||
* Test IRadio.setCdmaBroadcastConfig() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setCdmaBroadcastConfig) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
CdmaBroadcastSmsConfigInfo cbSmsConfig;
|
||||
cbSmsConfig.serviceCategory = 4096;
|
||||
cbSmsConfig.language = 1;
|
||||
cbSmsConfig.selected = true;
|
||||
|
||||
android::hardware::hidl_vec<CdmaBroadcastSmsConfigInfo>
|
||||
cdmaBroadcastSmsConfigInfoList = {cbSmsConfig};
|
||||
android::hardware::hidl_vec<CdmaBroadcastSmsConfigInfo> cdmaBroadcastSmsConfigInfoList = {
|
||||
cbSmsConfig};
|
||||
|
||||
radio->setCdmaBroadcastConfig(++serial, cdmaBroadcastSmsConfigInfoList);
|
||||
radio->setCdmaBroadcastConfig(serial, cdmaBroadcastSmsConfigInfoList);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -131,9 +129,9 @@ TEST_F(RadioHidlTest, setCdmaBroadcastConfig) {
|
|||
* Test IRadio.getCdmaBroadcastConfig() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getCdmaBroadcastConfig) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getCdmaBroadcastConfig(++serial);
|
||||
radio->getCdmaBroadcastConfig(serial);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -148,10 +146,10 @@ TEST_F(RadioHidlTest, getCdmaBroadcastConfig) {
|
|||
* Test IRadio.setCdmaBroadcastActivation() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setCdmaBroadcastActivation) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
bool activate = false;
|
||||
|
||||
radio->setCdmaBroadcastActivation(++serial, activate);
|
||||
radio->setCdmaBroadcastActivation(serial, activate);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -167,10 +165,10 @@ TEST_F(RadioHidlTest, setCdmaBroadcastActivation) {
|
|||
* Test IRadio.setGsmBroadcastActivation() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setGsmBroadcastActivation) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
bool activate = false;
|
||||
|
||||
radio->setGsmBroadcastActivation(++serial, activate);
|
||||
radio->setGsmBroadcastActivation(serial, activate);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
|
|
@ -22,9 +22,9 @@ using namespace ::android::hardware::radio::V1_0;
|
|||
* Test IRadio.getDataRegistrationState() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getDataRegistrationState) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getDataRegistrationState(++serial);
|
||||
radio->getDataRegistrationState(serial);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -39,7 +39,7 @@ TEST_F(RadioHidlTest, getDataRegistrationState) {
|
|||
* Test IRadio.setupDataCall() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setupDataCall) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
RadioTechnology radioTechnology = RadioTechnology::LTE;
|
||||
|
||||
|
@ -67,8 +67,8 @@ TEST_F(RadioHidlTest, setupDataCall) {
|
|||
bool roamingAllowed = false;
|
||||
bool isRoaming = false;
|
||||
|
||||
radio->setupDataCall(++serial, radioTechnology, dataProfileInfo,
|
||||
modemCognitive, roamingAllowed, isRoaming);
|
||||
radio->setupDataCall(serial, radioTechnology, dataProfileInfo, modemCognitive, roamingAllowed,
|
||||
isRoaming);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -77,10 +77,8 @@ TEST_F(RadioHidlTest, setupDataCall) {
|
|||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
|
||||
radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE ||
|
||||
radioRsp->rspInfo.error ==
|
||||
RadioError::OP_NOT_ALLOWED_BEFORE_REG_TO_NW ||
|
||||
radioRsp->rspInfo.error ==
|
||||
RadioError::OP_NOT_ALLOWED_DURING_VOICE_CALL ||
|
||||
radioRsp->rspInfo.error == RadioError::OP_NOT_ALLOWED_BEFORE_REG_TO_NW ||
|
||||
radioRsp->rspInfo.error == RadioError::OP_NOT_ALLOWED_DURING_VOICE_CALL ||
|
||||
CheckOEMError());
|
||||
}
|
||||
}
|
||||
|
@ -89,11 +87,11 @@ TEST_F(RadioHidlTest, setupDataCall) {
|
|||
* Test IRadio.deactivateDataCall() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, deactivateDataCall) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
int cid = 1;
|
||||
bool reasonRadioShutDown = false;
|
||||
|
||||
radio->deactivateDataCall(++serial, cid, reasonRadioShutDown);
|
||||
radio->deactivateDataCall(serial, cid, reasonRadioShutDown);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -108,9 +106,9 @@ TEST_F(RadioHidlTest, deactivateDataCall) {
|
|||
* Test IRadio.getDataCallList() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getDataCallList) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getDataCallList(++serial);
|
||||
radio->getDataCallList(serial);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -126,7 +124,7 @@ TEST_F(RadioHidlTest, getDataCallList) {
|
|||
* Test IRadio.setInitialAttachApn() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setInitialAttachApn) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
DataProfileInfo dataProfileInfo;
|
||||
memset(&dataProfileInfo, 0, sizeof(dataProfileInfo));
|
||||
|
@ -151,8 +149,7 @@ TEST_F(RadioHidlTest, setInitialAttachApn) {
|
|||
bool modemCognitive = true;
|
||||
bool isRoaming = false;
|
||||
|
||||
radio->setInitialAttachApn(++serial, dataProfileInfo, modemCognitive,
|
||||
isRoaming);
|
||||
radio->setInitialAttachApn(serial, dataProfileInfo, modemCognitive, isRoaming);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -161,8 +158,7 @@ TEST_F(RadioHidlTest, setInitialAttachApn) {
|
|||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
|
||||
radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE ||
|
||||
radioRsp->rspInfo.error ==
|
||||
RadioError::SUBSCRIPTION_NOT_AVAILABLE ||
|
||||
radioRsp->rspInfo.error == RadioError::SUBSCRIPTION_NOT_AVAILABLE ||
|
||||
CheckOEMError());
|
||||
}
|
||||
}
|
||||
|
@ -171,10 +167,10 @@ TEST_F(RadioHidlTest, setInitialAttachApn) {
|
|||
* Test IRadio.setDataAllowed() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setDataAllowed) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
bool allow = true;
|
||||
|
||||
radio->setDataAllowed(++serial, allow);
|
||||
radio->setDataAllowed(serial, allow);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -189,7 +185,7 @@ TEST_F(RadioHidlTest, setDataAllowed) {
|
|||
* Test IRadio.setDataProfile() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setDataProfile) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
// Create a dataProfileInfo
|
||||
DataProfileInfo dataProfileInfo;
|
||||
|
@ -213,12 +209,11 @@ TEST_F(RadioHidlTest, setDataProfile) {
|
|||
dataProfileInfo.mvnoMatchData = hidl_string();
|
||||
|
||||
// Create a dataProfileInfoList
|
||||
android::hardware::hidl_vec<DataProfileInfo> dataProfileInfoList = {
|
||||
dataProfileInfo};
|
||||
android::hardware::hidl_vec<DataProfileInfo> dataProfileInfoList = {dataProfileInfo};
|
||||
|
||||
bool isRoadming = false;
|
||||
|
||||
radio->setDataProfile(++serial, dataProfileInfoList, isRoadming);
|
||||
radio->setDataProfile(serial, dataProfileInfoList, isRoadming);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
|
|
@ -20,12 +20,9 @@
|
|||
* Test IRadio.getIccCardStatus() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getIccCardStatus) {
|
||||
EXPECT_LE(cardStatus.applications.size(),
|
||||
(unsigned int)RadioConst::CARD_MAX_APPS);
|
||||
EXPECT_LT(cardStatus.gsmUmtsSubscriptionAppIndex,
|
||||
(int)RadioConst::CARD_MAX_APPS);
|
||||
EXPECT_LT(cardStatus.cdmaSubscriptionAppIndex,
|
||||
(int)RadioConst::CARD_MAX_APPS);
|
||||
EXPECT_LE(cardStatus.applications.size(), (unsigned int)RadioConst::CARD_MAX_APPS);
|
||||
EXPECT_LT(cardStatus.gsmUmtsSubscriptionAppIndex, (int)RadioConst::CARD_MAX_APPS);
|
||||
EXPECT_LT(cardStatus.cdmaSubscriptionAppIndex, (int)RadioConst::CARD_MAX_APPS);
|
||||
EXPECT_LT(cardStatus.imsSubscriptionAppIndex, (int)RadioConst::CARD_MAX_APPS);
|
||||
}
|
||||
|
||||
|
@ -33,7 +30,7 @@ TEST_F(RadioHidlTest, getIccCardStatus) {
|
|||
* Test IRadio.supplyIccPinForApp() for the response returned
|
||||
*/
|
||||
TEST_F(RadioHidlTest, supplyIccPinForApp) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
// Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and
|
||||
// 3GPP2 apps only
|
||||
|
@ -42,7 +39,7 @@ TEST_F(RadioHidlTest, supplyIccPinForApp) {
|
|||
cardStatus.applications[i].appType == AppType::USIM ||
|
||||
cardStatus.applications[i].appType == AppType::RUIM ||
|
||||
cardStatus.applications[i].appType == AppType::CSIM) {
|
||||
radio->supplyIccPinForApp(++serial, hidl_string("test1"),
|
||||
radio->supplyIccPinForApp(serial, hidl_string("test1"),
|
||||
cardStatus.applications[i].aidPtr);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -56,7 +53,7 @@ TEST_F(RadioHidlTest, supplyIccPinForApp) {
|
|||
* Test IRadio.supplyIccPukForApp() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, supplyIccPukForApp) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
// Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and
|
||||
// 3GPP2 apps only
|
||||
|
@ -65,8 +62,7 @@ TEST_F(RadioHidlTest, supplyIccPukForApp) {
|
|||
cardStatus.applications[i].appType == AppType::USIM ||
|
||||
cardStatus.applications[i].appType == AppType::RUIM ||
|
||||
cardStatus.applications[i].appType == AppType::CSIM) {
|
||||
radio->supplyIccPukForApp(++serial, hidl_string("test1"),
|
||||
hidl_string("test2"),
|
||||
radio->supplyIccPukForApp(serial, hidl_string("test1"), hidl_string("test2"),
|
||||
cardStatus.applications[i].aidPtr);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -80,7 +76,7 @@ TEST_F(RadioHidlTest, supplyIccPukForApp) {
|
|||
* Test IRadio.supplyIccPin2ForApp() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, supplyIccPin2ForApp) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
// Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and
|
||||
// 3GPP2 apps only
|
||||
|
@ -89,7 +85,7 @@ TEST_F(RadioHidlTest, supplyIccPin2ForApp) {
|
|||
cardStatus.applications[i].appType == AppType::USIM ||
|
||||
cardStatus.applications[i].appType == AppType::RUIM ||
|
||||
cardStatus.applications[i].appType == AppType::CSIM) {
|
||||
radio->supplyIccPin2ForApp(++serial, hidl_string("test1"),
|
||||
radio->supplyIccPin2ForApp(serial, hidl_string("test1"),
|
||||
cardStatus.applications[i].aidPtr);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -103,7 +99,7 @@ TEST_F(RadioHidlTest, supplyIccPin2ForApp) {
|
|||
* Test IRadio.supplyIccPuk2ForApp() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, supplyIccPuk2ForApp) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
// Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and
|
||||
// 3GPP2 apps only
|
||||
|
@ -112,8 +108,7 @@ TEST_F(RadioHidlTest, supplyIccPuk2ForApp) {
|
|||
cardStatus.applications[i].appType == AppType::USIM ||
|
||||
cardStatus.applications[i].appType == AppType::RUIM ||
|
||||
cardStatus.applications[i].appType == AppType::CSIM) {
|
||||
radio->supplyIccPuk2ForApp(++serial, hidl_string("test1"),
|
||||
hidl_string("test2"),
|
||||
radio->supplyIccPuk2ForApp(serial, hidl_string("test1"), hidl_string("test2"),
|
||||
cardStatus.applications[i].aidPtr);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -127,7 +122,7 @@ TEST_F(RadioHidlTest, supplyIccPuk2ForApp) {
|
|||
* Test IRadio.changeIccPinForApp() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, changeIccPinForApp) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
// Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and
|
||||
// 3GPP2 apps only
|
||||
|
@ -136,8 +131,7 @@ TEST_F(RadioHidlTest, changeIccPinForApp) {
|
|||
cardStatus.applications[i].appType == AppType::USIM ||
|
||||
cardStatus.applications[i].appType == AppType::RUIM ||
|
||||
cardStatus.applications[i].appType == AppType::CSIM) {
|
||||
radio->changeIccPinForApp(++serial, hidl_string("test1"),
|
||||
hidl_string("test2"),
|
||||
radio->changeIccPinForApp(serial, hidl_string("test1"), hidl_string("test2"),
|
||||
cardStatus.applications[i].aidPtr);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -151,7 +145,7 @@ TEST_F(RadioHidlTest, changeIccPinForApp) {
|
|||
* Test IRadio.changeIccPin2ForApp() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, changeIccPin2ForApp) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
// Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and
|
||||
// 3GPP2 apps only
|
||||
|
@ -160,8 +154,7 @@ TEST_F(RadioHidlTest, changeIccPin2ForApp) {
|
|||
cardStatus.applications[i].appType == AppType::USIM ||
|
||||
cardStatus.applications[i].appType == AppType::RUIM ||
|
||||
cardStatus.applications[i].appType == AppType::CSIM) {
|
||||
radio->changeIccPin2ForApp(++serial, hidl_string("test1"),
|
||||
hidl_string("test2"),
|
||||
radio->changeIccPin2ForApp(serial, hidl_string("test1"), hidl_string("test2"),
|
||||
cardStatus.applications[i].aidPtr);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -175,7 +168,7 @@ TEST_F(RadioHidlTest, changeIccPin2ForApp) {
|
|||
* Test IRadio.getImsiForApp() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getImsiForApp) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
// Check success returned while getting imsi for 3GPP and 3GPP2 apps only
|
||||
for (int i = 0; i < (int)cardStatus.applications.size(); i++) {
|
||||
|
@ -183,7 +176,7 @@ TEST_F(RadioHidlTest, getImsiForApp) {
|
|||
cardStatus.applications[i].appType == AppType::USIM ||
|
||||
cardStatus.applications[i].appType == AppType::RUIM ||
|
||||
cardStatus.applications[i].appType == AppType::CSIM) {
|
||||
radio->getImsiForApp(++serial, cardStatus.applications[i].aidPtr);
|
||||
radio->getImsiForApp(serial, cardStatus.applications[i].aidPtr);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -203,7 +196,7 @@ TEST_F(RadioHidlTest, getImsiForApp) {
|
|||
* Test IRadio.iccIOForApp() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, iccIOForApp) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
for (int i = 0; i < (int)cardStatus.applications.size(); i++) {
|
||||
IccIo iccIo;
|
||||
|
@ -217,7 +210,7 @@ TEST_F(RadioHidlTest, iccIOForApp) {
|
|||
iccIo.pin2 = hidl_string();
|
||||
iccIo.aid = cardStatus.applications[i].aidPtr;
|
||||
|
||||
radio->iccIOForApp(++serial, iccIo);
|
||||
radio->iccIOForApp(serial, iccIo);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -228,7 +221,7 @@ TEST_F(RadioHidlTest, iccIOForApp) {
|
|||
* Test IRadio.iccTransmitApduBasicChannel() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, iccTransmitApduBasicChannel) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
SimApdu msg;
|
||||
memset(&msg, 0, sizeof(msg));
|
||||
msg.data = hidl_string();
|
||||
|
@ -245,11 +238,11 @@ TEST_F(RadioHidlTest, iccTransmitApduBasicChannel) {
|
|||
* Test IRadio.iccOpenLogicalChannel() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, iccOpenLogicalChannel) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
int p2 = 0x04;
|
||||
// Specified in ISO 7816-4 clause 7.1.1 0x04 means that FCP template is requested.
|
||||
for (int i = 0; i < (int)cardStatus.applications.size(); i++) {
|
||||
radio->iccOpenLogicalChannel(++serial, cardStatus.applications[i].aidPtr, p2);
|
||||
radio->iccOpenLogicalChannel(serial, cardStatus.applications[i].aidPtr, p2);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -260,7 +253,7 @@ TEST_F(RadioHidlTest, iccOpenLogicalChannel) {
|
|||
* Test IRadio.iccCloseLogicalChannel() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, iccCloseLogicalChannel) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
// Try closing invalid channel and check INVALID_ARGUMENTS returned as error
|
||||
radio->iccCloseLogicalChannel(serial, 0);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
|
@ -274,14 +267,15 @@ TEST_F(RadioHidlTest, iccCloseLogicalChannel) {
|
|||
* Test IRadio.iccTransmitApduLogicalChannel() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, iccTransmitApduLogicalChannel) {
|
||||
int serial = GetRandomSerialNumber();
|
||||
SimApdu msg;
|
||||
memset(&msg, 0, sizeof(msg));
|
||||
msg.data = hidl_string();
|
||||
|
||||
radio->iccTransmitApduLogicalChannel(1, msg);
|
||||
radio->iccTransmitApduLogicalChannel(serial, msg);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(1, radioRsp->rspInfo.serial);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
||||
// TODO(sanketpadawe): Add test for error code
|
||||
}
|
||||
|
@ -290,12 +284,12 @@ TEST_F(RadioHidlTest, iccTransmitApduLogicalChannel) {
|
|||
* Test IRadio.requestIccSimAuthentication() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, requestIccSimAuthentication) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
// Pass wrong challenge string and check RadioError::INVALID_ARGUMENTS
|
||||
// returned as error.
|
||||
for (int i = 0; i < (int)cardStatus.applications.size(); i++) {
|
||||
radio->requestIccSimAuthentication(++serial, 0, hidl_string("test"),
|
||||
radio->requestIccSimAuthentication(serial, 0, hidl_string("test"),
|
||||
cardStatus.applications[i].aidPtr);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -308,7 +302,7 @@ TEST_F(RadioHidlTest, requestIccSimAuthentication) {
|
|||
* Test IRadio.supplyNetworkDepersonalization() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, supplyNetworkDepersonalization) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->supplyNetworkDepersonalization(serial, hidl_string("test"));
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
|
@ -316,8 +310,13 @@ TEST_F(RadioHidlTest, supplyNetworkDepersonalization) {
|
|||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckGeneralError() ||
|
||||
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
|
||||
radioRsp->rspInfo.error == RadioError::SYSTEM_ERR ||
|
||||
radioRsp->rspInfo.error == RadioError::NO_MEMORY ||
|
||||
radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
|
||||
radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
|
||||
radioRsp->rspInfo.error == RadioError::PASSWORD_INCORRECT);
|
||||
radioRsp->rspInfo.error == RadioError::INVALID_SIM_STATE ||
|
||||
radioRsp->rspInfo.error == RadioError::PASSWORD_INCORRECT ||
|
||||
radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,17 +22,16 @@ using namespace ::android::hardware::radio::V1_0;
|
|||
* Test IRadio.getClir() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getClir) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getClir(++serial);
|
||||
radio->getClir(serial);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckGeneralError() ||
|
||||
radioRsp->rspInfo.error == RadioError::MODEM_ERR);
|
||||
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::MODEM_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,10 +39,10 @@ TEST_F(RadioHidlTest, getClir) {
|
|||
* Test IRadio.setClir() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setClir) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
int32_t status = 1;
|
||||
|
||||
radio->setClir(++serial, status);
|
||||
radio->setClir(serial, status);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -58,14 +57,13 @@ TEST_F(RadioHidlTest, setClir) {
|
|||
* Test IRadio.getFacilityLockForApp() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getFacilityLockForApp) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
std::string facility = "";
|
||||
std::string password = "";
|
||||
int32_t serviceClass = 1;
|
||||
std::string appId = "";
|
||||
|
||||
radio->getFacilityLockForApp(++serial, facility, password, serviceClass,
|
||||
appId);
|
||||
radio->getFacilityLockForApp(serial, facility, password, serviceClass, appId);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -82,15 +80,14 @@ TEST_F(RadioHidlTest, getFacilityLockForApp) {
|
|||
* Test IRadio.setFacilityLockForApp() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setFacilityLockForApp) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
std::string facility = "";
|
||||
bool lockState = false;
|
||||
std::string password = "";
|
||||
int32_t serviceClass = 1;
|
||||
std::string appId = "";
|
||||
|
||||
radio->setFacilityLockForApp(++serial, facility, lockState, password,
|
||||
serviceClass, appId);
|
||||
radio->setFacilityLockForApp(serial, facility, lockState, password, serviceClass, appId);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -107,12 +104,12 @@ TEST_F(RadioHidlTest, setFacilityLockForApp) {
|
|||
* Test IRadio.setBarringPassword() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setBarringPassword) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
std::string facility = "";
|
||||
std::string oldPassword = "";
|
||||
std::string newPassword = "";
|
||||
|
||||
radio->setBarringPassword(++serial, facility, oldPassword, newPassword);
|
||||
radio->setBarringPassword(serial, facility, oldPassword, newPassword);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -131,17 +128,16 @@ TEST_F(RadioHidlTest, setBarringPassword) {
|
|||
* Test IRadio.getClip() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getClip) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getClip(++serial);
|
||||
radio->getClip(serial);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckGeneralError() ||
|
||||
radioRsp->rspInfo.error == RadioError::MODEM_ERR);
|
||||
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::MODEM_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -149,10 +145,10 @@ TEST_F(RadioHidlTest, getClip) {
|
|||
* Test IRadio.setSuppServiceNotifications() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setSuppServiceNotifications) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
bool enable = false;
|
||||
|
||||
radio->setSuppServiceNotifications(++serial, enable);
|
||||
radio->setSuppServiceNotifications(serial, enable);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -167,10 +163,10 @@ TEST_F(RadioHidlTest, setSuppServiceNotifications) {
|
|||
* Test IRadio.requestIsimAuthentication() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, requestIsimAuthentication) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
std::string challenge = "";
|
||||
|
||||
radio->requestIsimAuthentication(++serial, challenge);
|
||||
radio->requestIsimAuthentication(serial, challenge);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -185,9 +181,9 @@ TEST_F(RadioHidlTest, requestIsimAuthentication) {
|
|||
* Test IRadio.getImsRegistrationState() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getImsRegistrationState) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getImsRegistrationState(++serial);
|
||||
radio->getImsRegistrationState(serial);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
|
|
@ -20,9 +20,9 @@
|
|||
* Test IRadio.getSignalStrength() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getSignalStrength) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getSignalStrength(++serial);
|
||||
radio->getSignalStrength(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -36,9 +36,9 @@ TEST_F(RadioHidlTest, getSignalStrength) {
|
|||
* Test IRadio.getVoiceRegistrationState() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getVoiceRegistrationState) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getVoiceRegistrationState(++serial);
|
||||
radio->getVoiceRegistrationState(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -52,9 +52,9 @@ TEST_F(RadioHidlTest, getVoiceRegistrationState) {
|
|||
* Test IRadio.getOperator() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getOperator) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getOperator(++serial);
|
||||
radio->getOperator(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -68,9 +68,9 @@ TEST_F(RadioHidlTest, getOperator) {
|
|||
* Test IRadio.setRadioPower() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setRadioPower) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->setRadioPower(++serial, 0);
|
||||
radio->setRadioPower(serial, 0);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -84,9 +84,9 @@ TEST_F(RadioHidlTest, setRadioPower) {
|
|||
* Test IRadio.getNetworkSelectionMode() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getNetworkSelectionMode) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getNetworkSelectionMode(++serial);
|
||||
radio->getNetworkSelectionMode(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -100,9 +100,9 @@ TEST_F(RadioHidlTest, getNetworkSelectionMode) {
|
|||
* Test IRadio.setNetworkSelectionModeAutomatic() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setNetworkSelectionModeAutomatic) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->setNetworkSelectionModeAutomatic(++serial);
|
||||
radio->setNetworkSelectionModeAutomatic(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -119,9 +119,9 @@ TEST_F(RadioHidlTest, setNetworkSelectionModeAutomatic) {
|
|||
* Test IRadio.setNetworkSelectionModeManual() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setNetworkSelectionModeManual) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->setNetworkSelectionModeManual(++serial, "123456");
|
||||
radio->setNetworkSelectionModeManual(serial, "123456");
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -139,19 +139,20 @@ TEST_F(RadioHidlTest, setNetworkSelectionModeManual) {
|
|||
* Test IRadio.getAvailableNetworks() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getAvailableNetworks) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getAvailableNetworks(++serial);
|
||||
radio->getAvailableNetworks(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
ASSERT_TRUE(radioRsp->rspInfo.type == RadioResponseType::SOLICITED ||
|
||||
radioRsp->rspInfo.type == RadioResponseType::SOLICITED_ACK_EXP);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckGeneralError() ||
|
||||
radioRsp->rspInfo.error == RadioError::NONE ||
|
||||
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE ||
|
||||
radioRsp->rspInfo.error == RadioError::DEVICE_IN_USE ||
|
||||
radioRsp->rspInfo.error == RadioError::CANCELLED ||
|
||||
radioRsp->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED);
|
||||
radioRsp->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED ||
|
||||
radioRsp->rspInfo.error == RadioError::MODEM_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -159,9 +160,9 @@ TEST_F(RadioHidlTest, getAvailableNetworks) {
|
|||
* Test IRadio.getBasebandVersion() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getBasebandVersion) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getBasebandVersion(++serial);
|
||||
radio->getBasebandVersion(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -175,9 +176,9 @@ TEST_F(RadioHidlTest, getBasebandVersion) {
|
|||
* Test IRadio.setBandMode() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setBandMode) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->setBandMode(++serial, RadioBandMode::BAND_MODE_USA);
|
||||
radio->setBandMode(serial, RadioBandMode::BAND_MODE_USA);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -191,9 +192,9 @@ TEST_F(RadioHidlTest, setBandMode) {
|
|||
* Test IRadio.getAvailableBandModes() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getAvailableBandModes) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getAvailableBandModes(++serial);
|
||||
radio->getAvailableBandModes(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -207,9 +208,9 @@ TEST_F(RadioHidlTest, getAvailableBandModes) {
|
|||
* Test IRadio.setPreferredNetworkType() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setPreferredNetworkType) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->setPreferredNetworkType(++serial, PreferredNetworkType::GSM_ONLY);
|
||||
radio->setPreferredNetworkType(serial, PreferredNetworkType::GSM_ONLY);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -223,9 +224,9 @@ TEST_F(RadioHidlTest, setPreferredNetworkType) {
|
|||
* Test IRadio.getPreferredNetworkType() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getPreferredNetworkType) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getPreferredNetworkType(++serial);
|
||||
radio->getPreferredNetworkType(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -239,9 +240,9 @@ TEST_F(RadioHidlTest, getPreferredNetworkType) {
|
|||
* Test IRadio.getNeighboringCids() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getNeighboringCids) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getNeighboringCids(++serial);
|
||||
radio->getNeighboringCids(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -255,9 +256,9 @@ TEST_F(RadioHidlTest, getNeighboringCids) {
|
|||
* Test IRadio.setLocationUpdates() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setLocationUpdates) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->setLocationUpdates(++serial, true);
|
||||
radio->setLocationUpdates(serial, true);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -271,9 +272,9 @@ TEST_F(RadioHidlTest, setLocationUpdates) {
|
|||
* Test IRadio.setCdmaRoamingPreference() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setCdmaRoamingPreference) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->setCdmaRoamingPreference(++serial, CdmaRoamingType::HOME_NETWORK);
|
||||
radio->setCdmaRoamingPreference(serial, CdmaRoamingType::HOME_NETWORK);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -287,16 +288,15 @@ TEST_F(RadioHidlTest, setCdmaRoamingPreference) {
|
|||
* Test IRadio.getCdmaRoamingPreference() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getCdmaRoamingPreference) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getCdmaRoamingPreference(++serial);
|
||||
radio->getCdmaRoamingPreference(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckGeneralError() ||
|
||||
radioRsp->rspInfo.error == RadioError::NONE ||
|
||||
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE ||
|
||||
radioRsp->rspInfo.error == RadioError::MODEM_ERR);
|
||||
}
|
||||
}
|
||||
|
@ -305,9 +305,9 @@ TEST_F(RadioHidlTest, getCdmaRoamingPreference) {
|
|||
* Test IRadio.getTTYMode() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getTTYMode) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getTTYMode(++serial);
|
||||
radio->getTTYMode(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -321,9 +321,9 @@ TEST_F(RadioHidlTest, getTTYMode) {
|
|||
* Test IRadio.setTTYMode() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setTTYMode) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->setTTYMode(++serial, TtyMode::OFF);
|
||||
radio->setTTYMode(serial, TtyMode::OFF);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -337,9 +337,9 @@ TEST_F(RadioHidlTest, setTTYMode) {
|
|||
* Test IRadio.setPreferredVoicePrivacy() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setPreferredVoicePrivacy) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->setPreferredVoicePrivacy(++serial, true);
|
||||
radio->setPreferredVoicePrivacy(serial, true);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -353,9 +353,9 @@ TEST_F(RadioHidlTest, setPreferredVoicePrivacy) {
|
|||
* Test IRadio.getPreferredVoicePrivacy() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getPreferredVoicePrivacy) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getPreferredVoicePrivacy(++serial);
|
||||
radio->getPreferredVoicePrivacy(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -369,9 +369,9 @@ TEST_F(RadioHidlTest, getPreferredVoicePrivacy) {
|
|||
* Test IRadio.getCDMASubscription() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getCDMASubscription) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getCDMASubscription(++serial);
|
||||
radio->getCDMASubscription(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -385,9 +385,9 @@ TEST_F(RadioHidlTest, getCDMASubscription) {
|
|||
* Test IRadio.getDeviceIdentity() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getDeviceIdentity) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getDeviceIdentity(++serial);
|
||||
radio->getDeviceIdentity(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -401,9 +401,9 @@ TEST_F(RadioHidlTest, getDeviceIdentity) {
|
|||
* Test IRadio.exitEmergencyCallbackMode() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, exitEmergencyCallbackMode) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->exitEmergencyCallbackMode(++serial);
|
||||
radio->exitEmergencyCallbackMode(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -417,9 +417,9 @@ TEST_F(RadioHidlTest, exitEmergencyCallbackMode) {
|
|||
* Test IRadio.getCdmaSubscriptionSource() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getCdmaSubscriptionSource) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getCdmaSubscriptionSource(++serial);
|
||||
radio->getCdmaSubscriptionSource(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -433,17 +433,16 @@ TEST_F(RadioHidlTest, getCdmaSubscriptionSource) {
|
|||
* Test IRadio.setCdmaSubscriptionSource() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setCdmaSubscriptionSource) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->setCdmaSubscriptionSource(++serial, CdmaSubscriptionSource::RUIM_SIM);
|
||||
radio->setCdmaSubscriptionSource(serial, CdmaSubscriptionSource::RUIM_SIM);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::SIM_ABSENT ||
|
||||
radioRsp->rspInfo.error ==
|
||||
RadioError::SUBSCRIPTION_NOT_AVAILABLE);
|
||||
radioRsp->rspInfo.error == RadioError::SUBSCRIPTION_NOT_AVAILABLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -451,9 +450,9 @@ TEST_F(RadioHidlTest, setCdmaSubscriptionSource) {
|
|||
* Test IRadio.getVoiceRadioTechnology() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getVoiceRadioTechnology) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getVoiceRadioTechnology(++serial);
|
||||
radio->getVoiceRadioTechnology(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -467,16 +466,15 @@ TEST_F(RadioHidlTest, getVoiceRadioTechnology) {
|
|||
* Test IRadio.getCellInfoList() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getCellInfoList) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getCellInfoList(++serial);
|
||||
radio->getCellInfoList(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckGeneralError() ||
|
||||
radioRsp->rspInfo.error == RadioError::NONE ||
|
||||
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE ||
|
||||
radioRsp->rspInfo.error == RadioError::NO_NETWORK_FOUND);
|
||||
}
|
||||
}
|
||||
|
@ -485,10 +483,10 @@ TEST_F(RadioHidlTest, getCellInfoList) {
|
|||
* Test IRadio.setCellInfoListRate() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setCellInfoListRate) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
// TODO(sanketpadawe): RIL crashes with value of rate = 10
|
||||
radio->setCellInfoListRate(++serial, 10);
|
||||
radio->setCellInfoListRate(serial, 10);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -502,9 +500,9 @@ TEST_F(RadioHidlTest, setCellInfoListRate) {
|
|||
* Test IRadio.nvReadItem() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, nvReadItem) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->nvReadItem(++serial, NvItem::LTE_BAND_ENABLE_25);
|
||||
radio->nvReadItem(serial, NvItem::LTE_BAND_ENABLE_25);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -518,12 +516,12 @@ TEST_F(RadioHidlTest, nvReadItem) {
|
|||
* Test IRadio.nvWriteItem() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, nvWriteItem) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
NvWriteItem item;
|
||||
memset(&item, 0, sizeof(item));
|
||||
item.value = hidl_string();
|
||||
|
||||
radio->nvWriteItem(++serial, item);
|
||||
radio->nvWriteItem(serial, item);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -537,10 +535,10 @@ TEST_F(RadioHidlTest, nvWriteItem) {
|
|||
* Test IRadio.nvWriteCdmaPrl() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, nvWriteCdmaPrl) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
std::vector<uint8_t> prl = {1, 2, 3, 4, 5};
|
||||
|
||||
radio->nvWriteCdmaPrl(++serial, hidl_vec<uint8_t>(prl));
|
||||
radio->nvWriteCdmaPrl(serial, hidl_vec<uint8_t>(prl));
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -554,9 +552,9 @@ TEST_F(RadioHidlTest, nvWriteCdmaPrl) {
|
|||
* Test IRadio.nvResetConfig() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, nvResetConfig) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->nvResetConfig(++serial, ResetNvType::RELOAD);
|
||||
radio->nvResetConfig(++serial, ResetNvType::ERASE);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -570,11 +568,11 @@ TEST_F(RadioHidlTest, nvResetConfig) {
|
|||
* Test IRadio.setUiccSubscription() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setUiccSubscription) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
SelectUiccSub item;
|
||||
memset(&item, 0, sizeof(item));
|
||||
|
||||
radio->setUiccSubscription(++serial, item);
|
||||
radio->setUiccSubscription(serial, item);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -583,8 +581,7 @@ TEST_F(RadioHidlTest, setUiccSubscription) {
|
|||
ASSERT_TRUE(CheckGeneralError() ||
|
||||
radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
|
||||
radioRsp->rspInfo.error == RadioError::NONE ||
|
||||
radioRsp->rspInfo.error ==
|
||||
RadioError::SUBSCRIPTION_NOT_SUPPORTED ||
|
||||
radioRsp->rspInfo.error == RadioError::SUBSCRIPTION_NOT_SUPPORTED ||
|
||||
radioRsp->rspInfo.error == RadioError::MODEM_ERR);
|
||||
}
|
||||
}
|
||||
|
@ -593,9 +590,9 @@ TEST_F(RadioHidlTest, setUiccSubscription) {
|
|||
* Test IRadio.getHardwareConfig() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getHardwareConfig) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getHardwareConfig(++serial);
|
||||
radio->getHardwareConfig(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -609,16 +606,15 @@ TEST_F(RadioHidlTest, getHardwareConfig) {
|
|||
* Test IRadio.requestShutdown() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, requestShutdown) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->requestShutdown(++serial);
|
||||
radio->requestShutdown(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckGeneralError() ||
|
||||
radioRsp->rspInfo.error == RadioError::NONE);
|
||||
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -626,9 +622,9 @@ TEST_F(RadioHidlTest, requestShutdown) {
|
|||
* Test IRadio.getRadioCapability() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getRadioCapability) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getRadioCapability(++serial);
|
||||
radio->getRadioCapability(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -642,12 +638,12 @@ TEST_F(RadioHidlTest, getRadioCapability) {
|
|||
* Test IRadio.setRadioCapability() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setRadioCapability) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
RadioCapability rc;
|
||||
memset(&rc, 0, sizeof(rc));
|
||||
rc.logicalModemUuid = hidl_string();
|
||||
|
||||
radio->setRadioCapability(++serial, rc);
|
||||
radio->setRadioCapability(serial, rc);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -663,9 +659,9 @@ TEST_F(RadioHidlTest, setRadioCapability) {
|
|||
* Test IRadio.startLceService() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, startLceService) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->startLceService(++serial, 5, true);
|
||||
radio->startLceService(serial, 5, true);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -681,9 +677,9 @@ TEST_F(RadioHidlTest, startLceService) {
|
|||
* Test IRadio.stopLceService() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, stopLceService) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->stopLceService(++serial);
|
||||
radio->stopLceService(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -698,16 +694,15 @@ TEST_F(RadioHidlTest, stopLceService) {
|
|||
* Test IRadio.pullLceData() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, pullLceData) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->pullLceData(++serial);
|
||||
radio->pullLceData(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE ||
|
||||
CheckOEMError());
|
||||
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE || CheckOEMError());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -715,9 +710,9 @@ TEST_F(RadioHidlTest, pullLceData) {
|
|||
* Test IRadio.getModemActivityInfo() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getModemActivityInfo) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getModemActivityInfo(++serial);
|
||||
radio->getModemActivityInfo(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -731,7 +726,7 @@ TEST_F(RadioHidlTest, getModemActivityInfo) {
|
|||
* Test IRadio.setAllowedCarriers() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setAllowedCarriers) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
CarrierRestrictions carriers;
|
||||
memset(&carriers, 0, sizeof(carriers));
|
||||
carriers.allowedCarriers.resize(1);
|
||||
|
@ -741,7 +736,21 @@ TEST_F(RadioHidlTest, setAllowedCarriers) {
|
|||
carriers.allowedCarriers[0].matchType = CarrierMatchType::ALL;
|
||||
carriers.allowedCarriers[0].matchData = hidl_string();
|
||||
|
||||
radio->setAllowedCarriers(++serial, false, carriers);
|
||||
radio->setAllowedCarriers(serial, false, carriers);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
|
||||
}
|
||||
|
||||
/* Reset back to no carrier restriction */
|
||||
memset(&carriers, 0, sizeof(carriers));
|
||||
carriers.allowedCarriers.resize(0);
|
||||
carriers.excludedCarriers.resize(0);
|
||||
|
||||
radio->setAllowedCarriers(++serial, true, carriers);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -755,9 +764,9 @@ TEST_F(RadioHidlTest, setAllowedCarriers) {
|
|||
* Test IRadio.getAllowedCarriers() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getAllowedCarriers) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getAllowedCarriers(++serial);
|
||||
radio->getAllowedCarriers(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -771,9 +780,9 @@ TEST_F(RadioHidlTest, getAllowedCarriers) {
|
|||
* Test IRadio.sendDeviceState() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, sendDeviceState) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->sendDeviceState(++serial, DeviceStateType::POWER_SAVE_MODE, true);
|
||||
radio->sendDeviceState(serial, DeviceStateType::POWER_SAVE_MODE, true);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -788,9 +797,9 @@ TEST_F(RadioHidlTest, sendDeviceState) {
|
|||
* Test IRadio.setIndicationFilter() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setIndicationFilter) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->setIndicationFilter(++serial, 1);
|
||||
radio->setIndicationFilter(serial, 1);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
@ -805,9 +814,9 @@ TEST_F(RadioHidlTest, setIndicationFilter) {
|
|||
* Test IRadio.setSimCardPower() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setSimCardPower) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->setSimCardPower(++serial, true);
|
||||
radio->setSimCardPower(serial, true);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
|
|
@ -22,12 +22,12 @@ using namespace ::android::hardware::radio::V1_0;
|
|||
* Test IRadio.sendSms() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, sendSms) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
GsmSmsMessage msg;
|
||||
msg.smscPdu = "";
|
||||
msg.pdu = "01000b916105770203f3000006d4f29c3e9b01";
|
||||
|
||||
radio->sendSms(++serial, msg);
|
||||
radio->sendSms(serial, msg);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -45,12 +45,12 @@ TEST_F(RadioHidlTest, sendSms) {
|
|||
* Test IRadio.sendSMSExpectMore() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, sendSMSExpectMore) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
GsmSmsMessage msg;
|
||||
msg.smscPdu = "";
|
||||
msg.pdu = "01000b916105770203f3000006d4f29c3e9b01";
|
||||
|
||||
radio->sendSMSExpectMore(++serial, msg);
|
||||
radio->sendSMSExpectMore(serial, msg);
|
||||
|
||||
// TODO(shuoq): add more test for this API when inserted sim card is
|
||||
// considered
|
||||
|
@ -70,11 +70,11 @@ TEST_F(RadioHidlTest, sendSMSExpectMore) {
|
|||
* Test IRadio.acknowledgeLastIncomingGsmSms() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, acknowledgeLastIncomingGsmSms) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
bool success = true;
|
||||
|
||||
radio->acknowledgeLastIncomingGsmSms(
|
||||
++serial, success, SmsAcknowledgeFailCause::MEMORY_CAPACITY_EXCEEDED);
|
||||
radio->acknowledgeLastIncomingGsmSms(serial, success,
|
||||
SmsAcknowledgeFailCause::MEMORY_CAPACITY_EXCEEDED);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -91,11 +91,11 @@ TEST_F(RadioHidlTest, acknowledgeLastIncomingGsmSms) {
|
|||
* Test IRadio.acknowledgeIncomingGsmSmsWithPdu() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, acknowledgeIncomingGsmSmsWithPdu) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
bool success = true;
|
||||
std::string ackPdu = "";
|
||||
|
||||
radio->acknowledgeIncomingGsmSmsWithPdu(++serial, success, ackPdu);
|
||||
radio->acknowledgeIncomingGsmSmsWithPdu(serial, success, ackPdu);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -110,7 +110,7 @@ TEST_F(RadioHidlTest, acknowledgeIncomingGsmSmsWithPdu) {
|
|||
* Test IRadio.sendCdmaSms() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, sendCdmaSms) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
// Create a CdmaSmsAddress
|
||||
CdmaSmsAddress cdmaSmsAddress;
|
||||
|
@ -118,8 +118,7 @@ TEST_F(RadioHidlTest, sendCdmaSms) {
|
|||
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};
|
||||
cdmaSmsAddress.digits = (std::vector<uint8_t>){11, 1, 6, 5, 10, 7, 7, 2, 10, 3, 10, 3};
|
||||
|
||||
// Create a CdmaSmsSubAddress
|
||||
CdmaSmsSubaddress cdmaSmsSubaddress;
|
||||
|
@ -134,10 +133,10 @@ TEST_F(RadioHidlTest, sendCdmaSms) {
|
|||
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};
|
||||
cdmaSmsMessage.bearerData =
|
||||
(std::vector<uint8_t>){15, 0, 3, 32, 3, 16, 1, 8, 16, 53, 76, 68, 6, 51, 106, 0};
|
||||
|
||||
radio->sendCdmaSms(++serial, cdmaSmsMessage);
|
||||
radio->sendCdmaSms(serial, cdmaSmsMessage);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -154,14 +153,14 @@ TEST_F(RadioHidlTest, sendCdmaSms) {
|
|||
* Test IRadio.acknowledgeLastIncomingCdmaSms() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, acknowledgeLastIncomingCdmaSms) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
// Create a CdmaSmsAck
|
||||
CdmaSmsAck cdmaSmsAck;
|
||||
cdmaSmsAck.errorClass = CdmaSmsErrorClass::NO_ERROR;
|
||||
cdmaSmsAck.smsCauseCode = 1;
|
||||
|
||||
radio->acknowledgeLastIncomingCdmaSms(++serial, cdmaSmsAck);
|
||||
radio->acknowledgeLastIncomingCdmaSms(serial, cdmaSmsAck);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -178,7 +177,7 @@ TEST_F(RadioHidlTest, acknowledgeLastIncomingCdmaSms) {
|
|||
* Test IRadio.sendImsSms() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, sendImsSms) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
// Create a CdmaSmsAddress
|
||||
CdmaSmsAddress cdmaSmsAddress;
|
||||
|
@ -186,8 +185,7 @@ TEST_F(RadioHidlTest, sendImsSms) {
|
|||
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};
|
||||
cdmaSmsAddress.digits = (std::vector<uint8_t>){11, 1, 6, 5, 10, 7, 7, 2, 10, 3, 10, 3};
|
||||
|
||||
// Create a CdmaSmsSubAddress
|
||||
CdmaSmsSubaddress cdmaSmsSubaddress;
|
||||
|
@ -202,8 +200,8 @@ TEST_F(RadioHidlTest, sendImsSms) {
|
|||
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};
|
||||
cdmaSmsMessage.bearerData =
|
||||
(std::vector<uint8_t>){15, 0, 3, 32, 3, 16, 1, 8, 16, 53, 76, 68, 6, 51, 106, 0};
|
||||
|
||||
// Creata an ImsSmsMessage
|
||||
ImsSmsMessage msg;
|
||||
|
@ -229,17 +227,16 @@ TEST_F(RadioHidlTest, sendImsSms) {
|
|||
* Test IRadio.getSmscAddress() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getSmscAddress) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getSmscAddress(++serial);
|
||||
radio->getSmscAddress(serial);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckGeneralError() ||
|
||||
radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
|
||||
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
|
||||
radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE);
|
||||
}
|
||||
}
|
||||
|
@ -248,10 +245,10 @@ TEST_F(RadioHidlTest, getSmscAddress) {
|
|||
* Test IRadio.setSmscAddress() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setSmscAddress) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
hidl_string address = hidl_string("smscAddress");
|
||||
|
||||
radio->setSmscAddress(++serial, address);
|
||||
radio->setSmscAddress(serial, address);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -268,13 +265,13 @@ TEST_F(RadioHidlTest, setSmscAddress) {
|
|||
* Test IRadio.writeSmsToSim() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, writeSmsToSim) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
SmsWriteArgs smsWriteArgs;
|
||||
smsWriteArgs.status = SmsWriteArgsStatus::REC_UNREAD;
|
||||
smsWriteArgs.smsc = "";
|
||||
smsWriteArgs.pdu = "01000b916105770203f3000006d4f29c3e9b01";
|
||||
|
||||
radio->writeSmsToSim(++serial, smsWriteArgs);
|
||||
radio->writeSmsToSim(serial, smsWriteArgs);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -296,10 +293,10 @@ TEST_F(RadioHidlTest, writeSmsToSim) {
|
|||
* Test IRadio.deleteSmsOnSim() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, deleteSmsOnSim) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
int index = 1;
|
||||
|
||||
radio->deleteSmsOnSim(++serial, index);
|
||||
radio->deleteSmsOnSim(serial, index);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -318,7 +315,7 @@ TEST_F(RadioHidlTest, deleteSmsOnSim) {
|
|||
* Test IRadio.writeSmsToRuim() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, writeSmsToRuim) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
// Create a CdmaSmsAddress
|
||||
CdmaSmsAddress cdmaSmsAddress;
|
||||
|
@ -326,8 +323,7 @@ TEST_F(RadioHidlTest, writeSmsToRuim) {
|
|||
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};
|
||||
cdmaSmsAddress.digits = (std::vector<uint8_t>){11, 1, 6, 5, 10, 7, 7, 2, 10, 3, 10, 3};
|
||||
|
||||
// Create a CdmaSmsSubAddress
|
||||
CdmaSmsSubaddress cdmaSmsSubaddress;
|
||||
|
@ -342,15 +338,15 @@ TEST_F(RadioHidlTest, writeSmsToRuim) {
|
|||
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};
|
||||
cdmaSmsMessage.bearerData =
|
||||
(std::vector<uint8_t>){15, 0, 3, 32, 3, 16, 1, 8, 16, 53, 76, 68, 6, 51, 106, 0};
|
||||
|
||||
// Create a CdmaSmsWriteArgs
|
||||
CdmaSmsWriteArgs cdmaSmsWriteArgs;
|
||||
cdmaSmsWriteArgs.status = CdmaSmsWriteArgsStatus::REC_UNREAD;
|
||||
cdmaSmsWriteArgs.message = cdmaSmsMessage;
|
||||
|
||||
radio->writeSmsToRuim(++serial, cdmaSmsWriteArgs);
|
||||
radio->writeSmsToRuim(serial, cdmaSmsWriteArgs);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -372,7 +368,7 @@ TEST_F(RadioHidlTest, writeSmsToRuim) {
|
|||
* Test IRadio.deleteSmsOnRuim() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, deleteSmsOnRuim) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
int index = 1;
|
||||
|
||||
// Create a CdmaSmsAddress
|
||||
|
@ -381,8 +377,7 @@ TEST_F(RadioHidlTest, deleteSmsOnRuim) {
|
|||
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};
|
||||
cdmaSmsAddress.digits = (std::vector<uint8_t>){11, 1, 6, 5, 10, 7, 7, 2, 10, 3, 10, 3};
|
||||
|
||||
// Create a CdmaSmsSubAddress
|
||||
CdmaSmsSubaddress cdmaSmsSubaddress;
|
||||
|
@ -397,15 +392,15 @@ TEST_F(RadioHidlTest, deleteSmsOnRuim) {
|
|||
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};
|
||||
cdmaSmsMessage.bearerData =
|
||||
(std::vector<uint8_t>){15, 0, 3, 32, 3, 16, 1, 8, 16, 53, 76, 68, 6, 51, 106, 0};
|
||||
|
||||
// Create a CdmaSmsWriteArgs
|
||||
CdmaSmsWriteArgs cdmaSmsWriteArgs;
|
||||
cdmaSmsWriteArgs.status = CdmaSmsWriteArgsStatus::REC_UNREAD;
|
||||
cdmaSmsWriteArgs.message = cdmaSmsMessage;
|
||||
|
||||
radio->deleteSmsOnRuim(++serial, index);
|
||||
radio->deleteSmsOnRuim(serial, index);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -420,10 +415,10 @@ TEST_F(RadioHidlTest, deleteSmsOnRuim) {
|
|||
* Test IRadio.reportSmsMemoryStatus() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, reportSmsMemoryStatus) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
bool available = true;
|
||||
|
||||
radio->reportSmsMemoryStatus(++serial, available);
|
||||
radio->reportSmsMemoryStatus(serial, available);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
|
|
@ -22,12 +22,12 @@ using namespace ::android::hardware::radio::V1_0;
|
|||
* Test IRadio.sendEnvelope() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, sendEnvelope) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
// Test with sending empty string
|
||||
std::string content = "";
|
||||
|
||||
radio->sendEnvelope(++serial, content);
|
||||
radio->sendEnvelope(serial, content);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -38,9 +38,10 @@ TEST_F(RadioHidlTest, sendEnvelope) {
|
|||
}
|
||||
|
||||
// Test with sending random string
|
||||
serial = GetRandomSerialNumber();
|
||||
content = "0";
|
||||
|
||||
radio->sendEnvelope(++serial, content);
|
||||
radio->sendEnvelope(serial, content);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -55,12 +56,12 @@ TEST_F(RadioHidlTest, sendEnvelope) {
|
|||
* Test IRadio.sendTerminalResponseToSim() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, sendTerminalResponseToSim) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
// Test with sending empty string
|
||||
std::string commandResponse = "";
|
||||
|
||||
radio->sendTerminalResponseToSim(++serial, commandResponse);
|
||||
radio->sendTerminalResponseToSim(serial, commandResponse);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -70,10 +71,12 @@ TEST_F(RadioHidlTest, sendTerminalResponseToSim) {
|
|||
EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
|
||||
}
|
||||
|
||||
serial = GetRandomSerialNumber();
|
||||
|
||||
// Test with sending random string
|
||||
commandResponse = "0";
|
||||
|
||||
radio->sendTerminalResponseToSim(++serial, commandResponse);
|
||||
radio->sendTerminalResponseToSim(serial, commandResponse);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -88,17 +91,22 @@ TEST_F(RadioHidlTest, sendTerminalResponseToSim) {
|
|||
* Test IRadio.handleStkCallSetupRequestFromSim() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, handleStkCallSetupRequestFromSim) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
bool accept = false;
|
||||
|
||||
radio->handleStkCallSetupRequestFromSim(++serial, accept);
|
||||
radio->handleStkCallSetupRequestFromSim(serial, accept);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
|
||||
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
|
||||
radioRsp->rspInfo.error == RadioError::SYSTEM_ERR ||
|
||||
radioRsp->rspInfo.error == RadioError::NO_MEMORY ||
|
||||
radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
|
||||
radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
|
||||
radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -106,9 +114,9 @@ TEST_F(RadioHidlTest, handleStkCallSetupRequestFromSim) {
|
|||
* Test IRadio.reportStkServiceIsRunning() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, reportStkServiceIsRunning) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->reportStkServiceIsRunning(++serial);
|
||||
radio->reportStkServiceIsRunning(serial);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -124,12 +132,12 @@ TEST_F(RadioHidlTest, reportStkServiceIsRunning) {
|
|||
* string.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, sendEnvelopeWithStatus) {
|
||||
int serial = 0;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
// Test with sending empty string
|
||||
std::string contents = "";
|
||||
|
||||
radio->sendEnvelopeWithStatus(++serial, contents);
|
||||
radio->sendEnvelopeWithStatus(serial, contents);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -140,9 +148,10 @@ TEST_F(RadioHidlTest, sendEnvelopeWithStatus) {
|
|||
}
|
||||
|
||||
// Test with sending random string
|
||||
serial = GetRandomSerialNumber();
|
||||
contents = "0";
|
||||
|
||||
radio->sendEnvelopeWithStatus(++serial, contents);
|
||||
radio->sendEnvelopeWithStatus(serial, contents);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
#include <radio_hidl_hal_utils.h>
|
||||
|
||||
void RadioHidlTest::SetUp() {
|
||||
radio = ::testing::VtsHalHidlTargetTestBase::getService<IRadio>(
|
||||
hidl_string(RADIO_SERVICE_NAME));
|
||||
radio =
|
||||
::testing::VtsHalHidlTargetTestBase::getService<IRadio>(hidl_string(RADIO_SERVICE_NAME));
|
||||
ASSERT_NE(radio, nullptr);
|
||||
|
||||
radioRsp = new RadioResponse(*this);
|
||||
|
@ -29,10 +29,11 @@ void RadioHidlTest::SetUp() {
|
|||
radioInd = NULL;
|
||||
radio->setResponseFunctions(radioRsp, radioInd);
|
||||
|
||||
radio->getIccCardStatus(1);
|
||||
int serial = GetRandomSerialNumber();
|
||||
radio->getIccCardStatus(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(1, radioRsp->rspInfo.serial);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include <android/hardware/radio/1.0/IRadioResponse.h>
|
||||
#include <android/hardware/radio/1.0/types.h>
|
||||
|
||||
#include <vts_test_util.h>
|
||||
|
||||
using ::android::hardware::radio::V1_0::ActivityStatsInfo;
|
||||
using ::android::hardware::radio::V1_0::AppType;
|
||||
using ::android::hardware::radio::V1_0::CardStatus;
|
||||
|
@ -128,49 +130,42 @@ class RadioResponse : public IRadioResponse {
|
|||
Return<void> changeIccPin2ForAppResponse(const RadioResponseInfo& info,
|
||||
int32_t remainingRetries);
|
||||
|
||||
Return<void> supplyNetworkDepersonalizationResponse(
|
||||
const RadioResponseInfo& info, int32_t remainingRetries);
|
||||
Return<void> supplyNetworkDepersonalizationResponse(const RadioResponseInfo& info,
|
||||
int32_t remainingRetries);
|
||||
|
||||
Return<void> getCurrentCallsResponse(
|
||||
const RadioResponseInfo& info,
|
||||
Return<void> getCurrentCallsResponse(const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_vec<Call>& calls);
|
||||
|
||||
Return<void> dialResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> getIMSIForAppResponse(
|
||||
const RadioResponseInfo& info,
|
||||
Return<void> getIMSIForAppResponse(const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_string& imsi);
|
||||
|
||||
Return<void> hangupConnectionResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> hangupWaitingOrBackgroundResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> hangupForegroundResumeBackgroundResponse(
|
||||
const RadioResponseInfo& info);
|
||||
Return<void> hangupForegroundResumeBackgroundResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> switchWaitingOrHoldingAndActiveResponse(
|
||||
const RadioResponseInfo& info);
|
||||
Return<void> switchWaitingOrHoldingAndActiveResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> conferenceResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> rejectCallResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> getLastCallFailCauseResponse(
|
||||
const RadioResponseInfo& info,
|
||||
Return<void> getLastCallFailCauseResponse(const RadioResponseInfo& info,
|
||||
const LastCallFailCauseInfo& failCauseInfo);
|
||||
|
||||
Return<void> getSignalStrengthResponse(const RadioResponseInfo& info,
|
||||
const SignalStrength& sigStrength);
|
||||
|
||||
Return<void> getVoiceRegistrationStateResponse(
|
||||
const RadioResponseInfo& info,
|
||||
Return<void> getVoiceRegistrationStateResponse(const RadioResponseInfo& info,
|
||||
const VoiceRegStateResult& voiceRegResponse);
|
||||
|
||||
Return<void> getDataRegistrationStateResponse(
|
||||
const RadioResponseInfo& info, const DataRegStateResult& dataRegResponse);
|
||||
Return<void> getDataRegistrationStateResponse(const RadioResponseInfo& info,
|
||||
const DataRegStateResult& dataRegResponse);
|
||||
|
||||
Return<void> getOperatorResponse(
|
||||
const RadioResponseInfo& info,
|
||||
Return<void> getOperatorResponse(const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_string& longName,
|
||||
const ::android::hardware::hidl_string& shortName,
|
||||
const ::android::hardware::hidl_string& numeric);
|
||||
|
@ -179,24 +174,20 @@ class RadioResponse : public IRadioResponse {
|
|||
|
||||
Return<void> sendDtmfResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> sendSmsResponse(const RadioResponseInfo& info,
|
||||
const SendSmsResult& sms);
|
||||
Return<void> sendSmsResponse(const RadioResponseInfo& info, const SendSmsResult& sms);
|
||||
|
||||
Return<void> sendSMSExpectMoreResponse(const RadioResponseInfo& info,
|
||||
const SendSmsResult& sms);
|
||||
Return<void> sendSMSExpectMoreResponse(const RadioResponseInfo& info, const SendSmsResult& sms);
|
||||
|
||||
Return<void> setupDataCallResponse(const RadioResponseInfo& info,
|
||||
const SetupDataCallResult& dcResponse);
|
||||
|
||||
Return<void> iccIOForAppResponse(const RadioResponseInfo& info,
|
||||
const IccIoResult& iccIo);
|
||||
Return<void> iccIOForAppResponse(const RadioResponseInfo& info, const IccIoResult& iccIo);
|
||||
|
||||
Return<void> sendUssdResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> cancelPendingUssdResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> getClirResponse(const RadioResponseInfo& info, int32_t n,
|
||||
int32_t m);
|
||||
Return<void> getClirResponse(const RadioResponseInfo& info, int32_t n, int32_t m);
|
||||
|
||||
Return<void> setClirResponse(const RadioResponseInfo& info);
|
||||
|
||||
|
@ -206,34 +197,28 @@ class RadioResponse : public IRadioResponse {
|
|||
|
||||
Return<void> setCallForwardResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> getCallWaitingResponse(const RadioResponseInfo& info,
|
||||
bool enable, int32_t serviceClass);
|
||||
Return<void> getCallWaitingResponse(const RadioResponseInfo& info, bool enable,
|
||||
int32_t serviceClass);
|
||||
|
||||
Return<void> setCallWaitingResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> acknowledgeLastIncomingGsmSmsResponse(
|
||||
const RadioResponseInfo& info);
|
||||
Return<void> acknowledgeLastIncomingGsmSmsResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> acceptCallResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> deactivateDataCallResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> getFacilityLockForAppResponse(const RadioResponseInfo& info,
|
||||
int32_t response);
|
||||
Return<void> getFacilityLockForAppResponse(const RadioResponseInfo& info, int32_t response);
|
||||
|
||||
Return<void> setFacilityLockForAppResponse(const RadioResponseInfo& info,
|
||||
int32_t retry);
|
||||
Return<void> setFacilityLockForAppResponse(const RadioResponseInfo& info, int32_t retry);
|
||||
|
||||
Return<void> setBarringPasswordResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> getNetworkSelectionModeResponse(const RadioResponseInfo& info,
|
||||
bool manual);
|
||||
Return<void> getNetworkSelectionModeResponse(const RadioResponseInfo& info, bool manual);
|
||||
|
||||
Return<void> setNetworkSelectionModeAutomaticResponse(
|
||||
const RadioResponseInfo& info);
|
||||
Return<void> setNetworkSelectionModeAutomaticResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> setNetworkSelectionModeManualResponse(
|
||||
const RadioResponseInfo& info);
|
||||
Return<void> setNetworkSelectionModeManualResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> getAvailableNetworksResponse(
|
||||
const RadioResponseInfo& info,
|
||||
|
@ -243,8 +228,7 @@ class RadioResponse : public IRadioResponse {
|
|||
|
||||
Return<void> stopDtmfResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> getBasebandVersionResponse(
|
||||
const RadioResponseInfo& info,
|
||||
Return<void> getBasebandVersionResponse(const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_string& version);
|
||||
|
||||
Return<void> separateConnectionResponse(const RadioResponseInfo& info);
|
||||
|
@ -253,27 +237,22 @@ class RadioResponse : public IRadioResponse {
|
|||
|
||||
Return<void> getMuteResponse(const RadioResponseInfo& info, bool enable);
|
||||
|
||||
Return<void> getClipResponse(const RadioResponseInfo& info,
|
||||
ClipStatus status);
|
||||
Return<void> getClipResponse(const RadioResponseInfo& info, ClipStatus status);
|
||||
|
||||
Return<void> getDataCallListResponse(
|
||||
const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_vec<SetupDataCallResult>& dcResponse);
|
||||
|
||||
Return<void> sendOemRilRequestRawResponse(
|
||||
const RadioResponseInfo& info,
|
||||
Return<void> sendOemRilRequestRawResponse(const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_vec<uint8_t>& data);
|
||||
|
||||
Return<void> sendOemRilRequestStringsResponse(
|
||||
const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_vec<::android::hardware::hidl_string>&
|
||||
data);
|
||||
const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& data);
|
||||
|
||||
Return<void> setSuppServiceNotificationsResponse(
|
||||
const RadioResponseInfo& info);
|
||||
Return<void> setSuppServiceNotificationsResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> writeSmsToSimResponse(const RadioResponseInfo& info,
|
||||
int32_t index);
|
||||
Return<void> writeSmsToSimResponse(const RadioResponseInfo& info, int32_t index);
|
||||
|
||||
Return<void> deleteSmsOnSimResponse(const RadioResponseInfo& info);
|
||||
|
||||
|
@ -283,14 +262,12 @@ class RadioResponse : public IRadioResponse {
|
|||
const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_vec<RadioBandMode>& bandModes);
|
||||
|
||||
Return<void> sendEnvelopeResponse(
|
||||
const RadioResponseInfo& info,
|
||||
Return<void> sendEnvelopeResponse(const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_string& commandResponse);
|
||||
|
||||
Return<void> sendTerminalResponseToSimResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> handleStkCallSetupRequestFromSimResponse(
|
||||
const RadioResponseInfo& info);
|
||||
Return<void> handleStkCallSetupRequestFromSimResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> explicitCallTransferResponse(const RadioResponseInfo& info);
|
||||
|
||||
|
@ -300,8 +277,7 @@ class RadioResponse : public IRadioResponse {
|
|||
PreferredNetworkType nwType);
|
||||
|
||||
Return<void> getNeighboringCidsResponse(
|
||||
const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_vec<NeighboringCell>& cells);
|
||||
const RadioResponseInfo& info, const ::android::hardware::hidl_vec<NeighboringCell>& cells);
|
||||
|
||||
Return<void> setLocationUpdatesResponse(const RadioResponseInfo& info);
|
||||
|
||||
|
@ -318,18 +294,15 @@ class RadioResponse : public IRadioResponse {
|
|||
|
||||
Return<void> setPreferredVoicePrivacyResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> getPreferredVoicePrivacyResponse(const RadioResponseInfo& info,
|
||||
bool enable);
|
||||
Return<void> getPreferredVoicePrivacyResponse(const RadioResponseInfo& info, bool enable);
|
||||
|
||||
Return<void> sendCDMAFeatureCodeResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> sendBurstDtmfResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> sendCdmaSmsResponse(const RadioResponseInfo& info,
|
||||
const SendSmsResult& sms);
|
||||
Return<void> sendCdmaSmsResponse(const RadioResponseInfo& info, const SendSmsResult& sms);
|
||||
|
||||
Return<void> acknowledgeLastIncomingCdmaSmsResponse(
|
||||
const RadioResponseInfo& info);
|
||||
Return<void> acknowledgeLastIncomingCdmaSmsResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> getGsmBroadcastConfigResponse(
|
||||
const RadioResponseInfo& info,
|
||||
|
@ -345,24 +318,20 @@ class RadioResponse : public IRadioResponse {
|
|||
|
||||
Return<void> setCdmaBroadcastConfigResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> setCdmaBroadcastActivationResponse(
|
||||
const RadioResponseInfo& info);
|
||||
Return<void> setCdmaBroadcastActivationResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> getCDMASubscriptionResponse(
|
||||
const RadioResponseInfo& info,
|
||||
Return<void> getCDMASubscriptionResponse(const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_string& mdn,
|
||||
const ::android::hardware::hidl_string& hSid,
|
||||
const ::android::hardware::hidl_string& hNid,
|
||||
const ::android::hardware::hidl_string& min,
|
||||
const ::android::hardware::hidl_string& prl);
|
||||
|
||||
Return<void> writeSmsToRuimResponse(const RadioResponseInfo& info,
|
||||
uint32_t index);
|
||||
Return<void> writeSmsToRuimResponse(const RadioResponseInfo& info, uint32_t index);
|
||||
|
||||
Return<void> deleteSmsOnRuimResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> getDeviceIdentityResponse(
|
||||
const RadioResponseInfo& info,
|
||||
Return<void> getDeviceIdentityResponse(const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_string& imei,
|
||||
const ::android::hardware::hidl_string& imeisv,
|
||||
const ::android::hardware::hidl_string& esn,
|
||||
|
@ -370,8 +339,7 @@ class RadioResponse : public IRadioResponse {
|
|||
|
||||
Return<void> exitEmergencyCallbackModeResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> getSmscAddressResponse(
|
||||
const RadioResponseInfo& info,
|
||||
Return<void> getSmscAddressResponse(const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_string& smsc);
|
||||
|
||||
Return<void> setSmscAddressResponse(const RadioResponseInfo& info);
|
||||
|
@ -384,11 +352,9 @@ class RadioResponse : public IRadioResponse {
|
|||
CdmaSubscriptionSource source);
|
||||
|
||||
Return<void> requestIsimAuthenticationResponse(
|
||||
const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_string& response);
|
||||
const RadioResponseInfo& info, const ::android::hardware::hidl_string& response);
|
||||
|
||||
Return<void> acknowledgeIncomingGsmSmsWithPduResponse(
|
||||
const RadioResponseInfo& info);
|
||||
Return<void> acknowledgeIncomingGsmSmsWithPduResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> sendEnvelopeWithStatusResponse(const RadioResponseInfo& info,
|
||||
const IccIoResult& iccIo);
|
||||
|
@ -396,23 +362,20 @@ class RadioResponse : public IRadioResponse {
|
|||
Return<void> getVoiceRadioTechnologyResponse(const RadioResponseInfo& info,
|
||||
RadioTechnology rat);
|
||||
|
||||
Return<void> getCellInfoListResponse(
|
||||
const RadioResponseInfo& info,
|
||||
Return<void> getCellInfoListResponse(const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_vec<CellInfo>& cellInfo);
|
||||
|
||||
Return<void> setCellInfoListRateResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> setInitialAttachApnResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> getImsRegistrationStateResponse(const RadioResponseInfo& info,
|
||||
bool isRegistered,
|
||||
Return<void> getImsRegistrationStateResponse(const RadioResponseInfo& info, bool isRegistered,
|
||||
RadioTechnologyFamily ratFamily);
|
||||
|
||||
Return<void> sendImsSmsResponse(const RadioResponseInfo& info,
|
||||
const SendSmsResult& sms);
|
||||
Return<void> sendImsSmsResponse(const RadioResponseInfo& info, const SendSmsResult& sms);
|
||||
|
||||
Return<void> iccTransmitApduBasicChannelResponse(
|
||||
const RadioResponseInfo& info, const IccIoResult& result);
|
||||
Return<void> iccTransmitApduBasicChannelResponse(const RadioResponseInfo& info,
|
||||
const IccIoResult& result);
|
||||
|
||||
Return<void> iccOpenLogicalChannelResponse(
|
||||
const RadioResponseInfo& info, int32_t channelId,
|
||||
|
@ -420,11 +383,10 @@ class RadioResponse : public IRadioResponse {
|
|||
|
||||
Return<void> iccCloseLogicalChannelResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> iccTransmitApduLogicalChannelResponse(
|
||||
const RadioResponseInfo& info, const IccIoResult& result);
|
||||
Return<void> iccTransmitApduLogicalChannelResponse(const RadioResponseInfo& info,
|
||||
const IccIoResult& result);
|
||||
|
||||
Return<void> nvReadItemResponse(
|
||||
const RadioResponseInfo& info,
|
||||
Return<void> nvReadItemResponse(const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_string& result);
|
||||
|
||||
Return<void> nvWriteItemResponse(const RadioResponseInfo& info);
|
||||
|
@ -438,11 +400,10 @@ class RadioResponse : public IRadioResponse {
|
|||
Return<void> setDataAllowedResponse(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> getHardwareConfigResponse(
|
||||
const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_vec<HardwareConfig>& config);
|
||||
const RadioResponseInfo& info, const ::android::hardware::hidl_vec<HardwareConfig>& config);
|
||||
|
||||
Return<void> requestIccSimAuthenticationResponse(
|
||||
const RadioResponseInfo& info, const IccIoResult& result);
|
||||
Return<void> requestIccSimAuthenticationResponse(const RadioResponseInfo& info,
|
||||
const IccIoResult& result);
|
||||
|
||||
Return<void> setDataProfileResponse(const RadioResponseInfo& info);
|
||||
|
||||
|
@ -460,17 +421,14 @@ class RadioResponse : public IRadioResponse {
|
|||
Return<void> stopLceServiceResponse(const RadioResponseInfo& info,
|
||||
const LceStatusInfo& statusInfo);
|
||||
|
||||
Return<void> pullLceDataResponse(const RadioResponseInfo& info,
|
||||
const LceDataInfo& lceInfo);
|
||||
Return<void> pullLceDataResponse(const RadioResponseInfo& info, const LceDataInfo& lceInfo);
|
||||
|
||||
Return<void> getModemActivityInfoResponse(
|
||||
const RadioResponseInfo& info, const ActivityStatsInfo& activityInfo);
|
||||
Return<void> getModemActivityInfoResponse(const RadioResponseInfo& info,
|
||||
const ActivityStatsInfo& activityInfo);
|
||||
|
||||
Return<void> setAllowedCarriersResponse(const RadioResponseInfo& info,
|
||||
int32_t numAllowed);
|
||||
Return<void> setAllowedCarriersResponse(const RadioResponseInfo& info, int32_t numAllowed);
|
||||
|
||||
Return<void> getAllowedCarriersResponse(const RadioResponseInfo& info,
|
||||
bool allAllowed,
|
||||
Return<void> getAllowedCarriersResponse(const RadioResponseInfo& info, bool allAllowed,
|
||||
const CarrierRestrictions& carriers);
|
||||
|
||||
Return<void> sendDeviceStateResponse(const RadioResponseInfo& info);
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* Test IRadio.getCurrentCalls() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getCurrentCalls) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getCurrentCalls(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
|
@ -36,7 +36,7 @@ TEST_F(RadioHidlTest, getCurrentCalls) {
|
|||
* Test IRadio.dial() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, dial) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
Dial dialInfo;
|
||||
memset(&dialInfo, 0, sizeof(dialInfo));
|
||||
|
@ -67,7 +67,7 @@ TEST_F(RadioHidlTest, dial) {
|
|||
* Test IRadio.hangup() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, hangup) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->hangup(serial, 1);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
|
@ -86,7 +86,7 @@ TEST_F(RadioHidlTest, hangup) {
|
|||
* Test IRadio.hangupWaitingOrBackground() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, hangupWaitingOrBackground) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->hangupWaitingOrBackground(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
|
@ -94,8 +94,7 @@ TEST_F(RadioHidlTest, hangupWaitingOrBackground) {
|
|||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckGeneralError() ||
|
||||
radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
|
||||
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
|
||||
radioRsp->rspInfo.error == RadioError::MODEM_ERR);
|
||||
}
|
||||
}
|
||||
|
@ -104,7 +103,7 @@ TEST_F(RadioHidlTest, hangupWaitingOrBackground) {
|
|||
* Test IRadio.hangupForegroundResumeBackground() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, hangupForegroundResumeBackground) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->hangupForegroundResumeBackground(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
|
@ -112,8 +111,7 @@ TEST_F(RadioHidlTest, hangupForegroundResumeBackground) {
|
|||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckGeneralError() ||
|
||||
radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
|
||||
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
|
||||
radioRsp->rspInfo.error == RadioError::MODEM_ERR);
|
||||
}
|
||||
}
|
||||
|
@ -122,7 +120,7 @@ TEST_F(RadioHidlTest, hangupForegroundResumeBackground) {
|
|||
* Test IRadio.switchWaitingOrHoldingAndActive() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, switchWaitingOrHoldingAndActive) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->switchWaitingOrHoldingAndActive(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
|
@ -130,8 +128,7 @@ TEST_F(RadioHidlTest, switchWaitingOrHoldingAndActive) {
|
|||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckGeneralError() ||
|
||||
radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
|
||||
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
|
||||
radioRsp->rspInfo.error == RadioError::MODEM_ERR);
|
||||
}
|
||||
}
|
||||
|
@ -140,7 +137,7 @@ TEST_F(RadioHidlTest, switchWaitingOrHoldingAndActive) {
|
|||
* Test IRadio.conference() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, conference) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->conference(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
|
@ -148,8 +145,7 @@ TEST_F(RadioHidlTest, conference) {
|
|||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckGeneralError() ||
|
||||
radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
|
||||
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
|
||||
radioRsp->rspInfo.error == RadioError::MODEM_ERR);
|
||||
}
|
||||
}
|
||||
|
@ -158,7 +154,7 @@ TEST_F(RadioHidlTest, conference) {
|
|||
* Test IRadio.rejectCall() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, rejectCall) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->rejectCall(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
|
@ -166,8 +162,7 @@ TEST_F(RadioHidlTest, rejectCall) {
|
|||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckGeneralError() ||
|
||||
radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
|
||||
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
|
||||
radioRsp->rspInfo.error == RadioError::MODEM_ERR);
|
||||
}
|
||||
}
|
||||
|
@ -176,7 +171,7 @@ TEST_F(RadioHidlTest, rejectCall) {
|
|||
* Test IRadio.getLastCallFailCause() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getLastCallFailCause) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getLastCallFailCause(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
|
@ -184,8 +179,7 @@ TEST_F(RadioHidlTest, getLastCallFailCause) {
|
|||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckGeneralError() ||
|
||||
radioRsp->rspInfo.error == RadioError::NONE);
|
||||
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -193,7 +187,7 @@ TEST_F(RadioHidlTest, getLastCallFailCause) {
|
|||
* Test IRadio.sendUssd() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, sendUssd) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
radio->sendUssd(serial, hidl_string("test"));
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
|
@ -211,7 +205,7 @@ TEST_F(RadioHidlTest, sendUssd) {
|
|||
* Test IRadio.cancelPendingUssd() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, cancelPendingUssd) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->cancelPendingUssd(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
|
@ -219,8 +213,7 @@ TEST_F(RadioHidlTest, cancelPendingUssd) {
|
|||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckGeneralError() ||
|
||||
radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
|
||||
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
|
||||
radioRsp->rspInfo.error == RadioError::MODEM_ERR);
|
||||
}
|
||||
}
|
||||
|
@ -229,7 +222,7 @@ TEST_F(RadioHidlTest, cancelPendingUssd) {
|
|||
* Test IRadio.getCallForwardStatus() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getCallForwardStatus) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
CallForwardInfo callInfo;
|
||||
memset(&callInfo, 0, sizeof(callInfo));
|
||||
callInfo.number = hidl_string();
|
||||
|
@ -251,7 +244,7 @@ TEST_F(RadioHidlTest, getCallForwardStatus) {
|
|||
* Test IRadio.setCallForward() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setCallForward) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
CallForwardInfo callInfo;
|
||||
memset(&callInfo, 0, sizeof(callInfo));
|
||||
callInfo.number = hidl_string();
|
||||
|
@ -273,7 +266,7 @@ TEST_F(RadioHidlTest, setCallForward) {
|
|||
* Test IRadio.getCallWaiting() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getCallWaiting) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getCallWaiting(serial, 1);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
|
@ -292,7 +285,7 @@ TEST_F(RadioHidlTest, getCallWaiting) {
|
|||
* Test IRadio.setCallWaiting() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setCallWaiting) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->setCallWaiting(serial, true, 1);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
|
@ -311,7 +304,7 @@ TEST_F(RadioHidlTest, setCallWaiting) {
|
|||
* Test IRadio.acceptCall() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, acceptCall) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->acceptCall(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
|
@ -319,8 +312,7 @@ TEST_F(RadioHidlTest, acceptCall) {
|
|||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckGeneralError() ||
|
||||
radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
|
||||
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
|
||||
radioRsp->rspInfo.error == RadioError::MODEM_ERR);
|
||||
}
|
||||
}
|
||||
|
@ -329,7 +321,7 @@ TEST_F(RadioHidlTest, acceptCall) {
|
|||
* Test IRadio.separateConnection() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, separateConnection) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->separateConnection(serial, 1);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
|
@ -348,7 +340,7 @@ TEST_F(RadioHidlTest, separateConnection) {
|
|||
* Test IRadio.explicitCallTransfer() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, explicitCallTransfer) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->explicitCallTransfer(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
|
@ -356,8 +348,7 @@ TEST_F(RadioHidlTest, explicitCallTransfer) {
|
|||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckGeneralError() ||
|
||||
radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
|
||||
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
|
||||
radioRsp->rspInfo.error == RadioError::MODEM_ERR);
|
||||
}
|
||||
}
|
||||
|
@ -366,7 +357,7 @@ TEST_F(RadioHidlTest, explicitCallTransfer) {
|
|||
* Test IRadio.sendCDMAFeatureCode() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, sendCDMAFeatureCode) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->sendCDMAFeatureCode(serial, hidl_string());
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
|
@ -387,7 +378,7 @@ TEST_F(RadioHidlTest, sendCDMAFeatureCode) {
|
|||
* Test IRadio.sendDtmf() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, sendDtmf) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->sendDtmf(serial, "1");
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
|
@ -407,7 +398,7 @@ TEST_F(RadioHidlTest, sendDtmf) {
|
|||
* Test IRadio.startDtmf() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, startDtmf) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->startDtmf(serial, "1");
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
|
@ -427,7 +418,7 @@ TEST_F(RadioHidlTest, startDtmf) {
|
|||
* Test IRadio.stopDtmf() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, stopDtmf) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->stopDtmf(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
|
@ -435,8 +426,7 @@ TEST_F(RadioHidlTest, stopDtmf) {
|
|||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckGeneralError() ||
|
||||
radioRsp->rspInfo.error == RadioError::NONE ||
|
||||
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE ||
|
||||
radioRsp->rspInfo.error == RadioError::INVALID_CALL_ID ||
|
||||
radioRsp->rspInfo.error == RadioError::MODEM_ERR);
|
||||
}
|
||||
|
@ -446,7 +436,7 @@ TEST_F(RadioHidlTest, stopDtmf) {
|
|||
* Test IRadio.setMute() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, setMute) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->setMute(serial, true);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
|
@ -464,7 +454,7 @@ TEST_F(RadioHidlTest, setMute) {
|
|||
* Test IRadio.getMute() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, getMute) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->getMute(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
|
@ -480,7 +470,7 @@ TEST_F(RadioHidlTest, getMute) {
|
|||
* Test IRadio.sendBurstDtmf() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest, sendBurstDtmf) {
|
||||
int serial = 1;
|
||||
int serial = GetRandomSerialNumber();
|
||||
|
||||
radio->sendBurstDtmf(serial, "1", 0, 0);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
|
|
|
@ -20,66 +20,65 @@ CardStatus cardStatus;
|
|||
|
||||
RadioResponse::RadioResponse(RadioHidlTest& parent) : parent(parent) {}
|
||||
|
||||
Return<void> RadioResponse::getIccCardStatusResponse(
|
||||
const RadioResponseInfo& info, const CardStatus& card_status) {
|
||||
Return<void> RadioResponse::getIccCardStatusResponse(const RadioResponseInfo& info,
|
||||
const CardStatus& card_status) {
|
||||
rspInfo = info;
|
||||
cardStatus = card_status;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::supplyIccPinForAppResponse(
|
||||
const RadioResponseInfo& info, int32_t /*remainingRetries*/) {
|
||||
Return<void> RadioResponse::supplyIccPinForAppResponse(const RadioResponseInfo& info,
|
||||
int32_t /*remainingRetries*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::supplyIccPukForAppResponse(
|
||||
const RadioResponseInfo& info, int32_t /*remainingRetries*/) {
|
||||
Return<void> RadioResponse::supplyIccPukForAppResponse(const RadioResponseInfo& info,
|
||||
int32_t /*remainingRetries*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::supplyIccPin2ForAppResponse(
|
||||
const RadioResponseInfo& info, int32_t /*remainingRetries*/) {
|
||||
Return<void> RadioResponse::supplyIccPin2ForAppResponse(const RadioResponseInfo& info,
|
||||
int32_t /*remainingRetries*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::supplyIccPuk2ForAppResponse(
|
||||
const RadioResponseInfo& info, int32_t /*remainingRetries*/) {
|
||||
Return<void> RadioResponse::supplyIccPuk2ForAppResponse(const RadioResponseInfo& info,
|
||||
int32_t /*remainingRetries*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::changeIccPinForAppResponse(
|
||||
const RadioResponseInfo& info, int32_t /*remainingRetries*/) {
|
||||
Return<void> RadioResponse::changeIccPinForAppResponse(const RadioResponseInfo& info,
|
||||
int32_t /*remainingRetries*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::changeIccPin2ForAppResponse(
|
||||
const RadioResponseInfo& info, int32_t /*remainingRetries*/) {
|
||||
Return<void> RadioResponse::changeIccPin2ForAppResponse(const RadioResponseInfo& info,
|
||||
int32_t /*remainingRetries*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::supplyNetworkDepersonalizationResponse(
|
||||
const RadioResponseInfo& info, int32_t /*remainingRetries*/) {
|
||||
Return<void> RadioResponse::supplyNetworkDepersonalizationResponse(const RadioResponseInfo& info,
|
||||
int32_t /*remainingRetries*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getCurrentCallsResponse(
|
||||
const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_vec<Call>& /*calls*/) {
|
||||
const RadioResponseInfo& info, const ::android::hardware::hidl_vec<Call>& /*calls*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
|
@ -91,8 +90,7 @@ Return<void> RadioResponse::dialResponse(const RadioResponseInfo& info) {
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getIMSIForAppResponse(
|
||||
const RadioResponseInfo& info,
|
||||
Return<void> RadioResponse::getIMSIForAppResponse(const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_string& imsi) {
|
||||
rspInfo = info;
|
||||
this->imsi = imsi;
|
||||
|
@ -100,15 +98,13 @@ Return<void> RadioResponse::getIMSIForAppResponse(
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::hangupConnectionResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::hangupConnectionResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::hangupWaitingOrBackgroundResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::hangupWaitingOrBackgroundResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
|
@ -121,8 +117,7 @@ Return<void> RadioResponse::hangupForegroundResumeBackgroundResponse(
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::switchWaitingOrHoldingAndActiveResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::switchWaitingOrHoldingAndActiveResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
|
@ -141,39 +136,35 @@ Return<void> RadioResponse::rejectCallResponse(const RadioResponseInfo& info) {
|
|||
}
|
||||
|
||||
Return<void> RadioResponse::getLastCallFailCauseResponse(
|
||||
const RadioResponseInfo& info,
|
||||
const LastCallFailCauseInfo& /*failCauseInfo*/) {
|
||||
const RadioResponseInfo& info, const LastCallFailCauseInfo& /*failCauseInfo*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getSignalStrengthResponse(
|
||||
const RadioResponseInfo& info, const SignalStrength& /*sig_strength*/) {
|
||||
Return<void> RadioResponse::getSignalStrengthResponse(const RadioResponseInfo& info,
|
||||
const SignalStrength& /*sig_strength*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getVoiceRegistrationStateResponse(
|
||||
const RadioResponseInfo& info,
|
||||
const VoiceRegStateResult& /*voiceRegResponse*/) {
|
||||
const RadioResponseInfo& info, const VoiceRegStateResult& /*voiceRegResponse*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getDataRegistrationStateResponse(
|
||||
const RadioResponseInfo& info,
|
||||
const DataRegStateResult& /*dataRegResponse*/) {
|
||||
const RadioResponseInfo& info, const DataRegStateResult& /*dataRegResponse*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getOperatorResponse(
|
||||
const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_string& /*longName*/,
|
||||
const RadioResponseInfo& info, const ::android::hardware::hidl_string& /*longName*/,
|
||||
const ::android::hardware::hidl_string& /*shortName*/,
|
||||
const ::android::hardware::hidl_string& /*numeric*/) {
|
||||
rspInfo = info;
|
||||
|
@ -181,8 +172,7 @@ Return<void> RadioResponse::getOperatorResponse(
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setRadioPowerResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::setRadioPowerResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
|
@ -202,16 +192,16 @@ Return<void> RadioResponse::sendSmsResponse(const RadioResponseInfo& info,
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::sendSMSExpectMoreResponse(
|
||||
const RadioResponseInfo& info, const SendSmsResult& sms) {
|
||||
Return<void> RadioResponse::sendSMSExpectMoreResponse(const RadioResponseInfo& info,
|
||||
const SendSmsResult& sms) {
|
||||
rspInfo = info;
|
||||
sendSmsResult = sms;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setupDataCallResponse(
|
||||
const RadioResponseInfo& info, const SetupDataCallResult& /*dcResponse*/) {
|
||||
Return<void> RadioResponse::setupDataCallResponse(const RadioResponseInfo& info,
|
||||
const SetupDataCallResult& /*dcResponse*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
|
@ -231,15 +221,14 @@ Return<void> RadioResponse::sendUssdResponse(const RadioResponseInfo& info) {
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::cancelPendingUssdResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::cancelPendingUssdResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getClirResponse(const RadioResponseInfo& info,
|
||||
int32_t /*n*/, int32_t /*m*/) {
|
||||
Return<void> RadioResponse::getClirResponse(const RadioResponseInfo& info, int32_t /*n*/,
|
||||
int32_t /*m*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
|
@ -252,37 +241,33 @@ Return<void> RadioResponse::setClirResponse(const RadioResponseInfo& info) {
|
|||
}
|
||||
|
||||
Return<void> RadioResponse::getCallForwardStatusResponse(
|
||||
const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_vec<CallForwardInfo>&
|
||||
const RadioResponseInfo& info, const ::android::hardware::hidl_vec<CallForwardInfo>&
|
||||
/*callForwardInfos*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setCallForwardResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::setCallForwardResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getCallWaitingResponse(
|
||||
const RadioResponseInfo& info, bool /*enable*/, int32_t /*serviceClass*/) {
|
||||
Return<void> RadioResponse::getCallWaitingResponse(const RadioResponseInfo& info, bool /*enable*/,
|
||||
int32_t /*serviceClass*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setCallWaitingResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::setCallWaitingResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::acknowledgeLastIncomingGsmSmsResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::acknowledgeLastIncomingGsmSmsResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
|
@ -294,36 +279,34 @@ Return<void> RadioResponse::acceptCallResponse(const RadioResponseInfo& info) {
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::deactivateDataCallResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::deactivateDataCallResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getFacilityLockForAppResponse(
|
||||
const RadioResponseInfo& info, int32_t /*response*/) {
|
||||
Return<void> RadioResponse::getFacilityLockForAppResponse(const RadioResponseInfo& info,
|
||||
int32_t /*response*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setFacilityLockForAppResponse(
|
||||
const RadioResponseInfo& info, int32_t /*retry*/) {
|
||||
Return<void> RadioResponse::setFacilityLockForAppResponse(const RadioResponseInfo& info,
|
||||
int32_t /*retry*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setBarringPasswordResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::setBarringPasswordResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getNetworkSelectionModeResponse(
|
||||
const RadioResponseInfo& info, bool /*manual*/) {
|
||||
Return<void> RadioResponse::getNetworkSelectionModeResponse(const RadioResponseInfo& info,
|
||||
bool /*manual*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
|
@ -336,8 +319,7 @@ Return<void> RadioResponse::setNetworkSelectionModeAutomaticResponse(
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setNetworkSelectionModeManualResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::setNetworkSelectionModeManualResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
|
@ -364,15 +346,13 @@ Return<void> RadioResponse::stopDtmfResponse(const RadioResponseInfo& info) {
|
|||
}
|
||||
|
||||
Return<void> RadioResponse::getBasebandVersionResponse(
|
||||
const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_string& /*version*/) {
|
||||
const RadioResponseInfo& info, const ::android::hardware::hidl_string& /*version*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::separateConnectionResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::separateConnectionResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
|
@ -384,15 +364,13 @@ Return<void> RadioResponse::setMuteResponse(const RadioResponseInfo& info) {
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getMuteResponse(const RadioResponseInfo& info,
|
||||
bool /*enable*/) {
|
||||
Return<void> RadioResponse::getMuteResponse(const RadioResponseInfo& info, bool /*enable*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getClipResponse(const RadioResponseInfo& info,
|
||||
ClipStatus /*status*/) {
|
||||
Return<void> RadioResponse::getClipResponse(const RadioResponseInfo& info, ClipStatus /*status*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
|
@ -407,35 +385,30 @@ Return<void> RadioResponse::getDataCallListResponse(
|
|||
}
|
||||
|
||||
Return<void> RadioResponse::sendOemRilRequestRawResponse(
|
||||
const RadioResponseInfo& /*info*/,
|
||||
const ::android::hardware::hidl_vec<uint8_t>& /*data*/) {
|
||||
const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_vec<uint8_t>& /*data*/) {
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::sendOemRilRequestStringsResponse(
|
||||
const RadioResponseInfo& /*info*/,
|
||||
const ::android::hardware::hidl_vec<
|
||||
::android::hardware::hidl_string>& /*data*/) {
|
||||
const ::android::hardware::hidl_vec< ::android::hardware::hidl_string>& /*data*/) {
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setSuppServiceNotificationsResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::setSuppServiceNotificationsResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::writeSmsToSimResponse(const RadioResponseInfo& info,
|
||||
int32_t index) {
|
||||
Return<void> RadioResponse::writeSmsToSimResponse(const RadioResponseInfo& info, int32_t index) {
|
||||
rspInfo = info;
|
||||
writeSmsToSimIndex = index;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::deleteSmsOnSimResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::deleteSmsOnSimResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
|
@ -456,15 +429,13 @@ Return<void> RadioResponse::getAvailableBandModesResponse(
|
|||
}
|
||||
|
||||
Return<void> RadioResponse::sendEnvelopeResponse(
|
||||
const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_string& /*commandResponse*/) {
|
||||
const RadioResponseInfo& info, const ::android::hardware::hidl_string& /*commandResponse*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::sendTerminalResponseToSimResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::sendTerminalResponseToSimResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
|
@ -477,22 +448,20 @@ Return<void> RadioResponse::handleStkCallSetupRequestFromSimResponse(
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::explicitCallTransferResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::explicitCallTransferResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setPreferredNetworkTypeResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::setPreferredNetworkTypeResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getPreferredNetworkTypeResponse(
|
||||
const RadioResponseInfo& info, PreferredNetworkType /*nw_type*/) {
|
||||
Return<void> RadioResponse::getPreferredNetworkTypeResponse(const RadioResponseInfo& info,
|
||||
PreferredNetworkType /*nw_type*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
|
@ -506,29 +475,26 @@ Return<void> RadioResponse::getNeighboringCidsResponse(
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setLocationUpdatesResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::setLocationUpdatesResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setCdmaSubscriptionSourceResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::setCdmaSubscriptionSourceResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setCdmaRoamingPreferenceResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::setCdmaRoamingPreferenceResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getCdmaRoamingPreferenceResponse(
|
||||
const RadioResponseInfo& info, CdmaRoamingType /*type*/) {
|
||||
Return<void> RadioResponse::getCdmaRoamingPreferenceResponse(const RadioResponseInfo& info,
|
||||
CdmaRoamingType /*type*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
|
@ -540,36 +506,32 @@ Return<void> RadioResponse::setTTYModeResponse(const RadioResponseInfo& info) {
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getTTYModeResponse(const RadioResponseInfo& info,
|
||||
TtyMode /*mode*/) {
|
||||
Return<void> RadioResponse::getTTYModeResponse(const RadioResponseInfo& info, TtyMode /*mode*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setPreferredVoicePrivacyResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::setPreferredVoicePrivacyResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getPreferredVoicePrivacyResponse(
|
||||
const RadioResponseInfo& info, bool /*enable*/) {
|
||||
Return<void> RadioResponse::getPreferredVoicePrivacyResponse(const RadioResponseInfo& info,
|
||||
bool /*enable*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::sendCDMAFeatureCodeResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::sendCDMAFeatureCodeResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::sendBurstDtmfResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::sendBurstDtmfResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
|
@ -583,8 +545,7 @@ Return<void> RadioResponse::sendCdmaSmsResponse(const RadioResponseInfo& info,
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::acknowledgeLastIncomingCdmaSmsResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::acknowledgeLastIncomingCdmaSmsResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
|
@ -592,22 +553,19 @@ Return<void> RadioResponse::acknowledgeLastIncomingCdmaSmsResponse(
|
|||
|
||||
Return<void> RadioResponse::getGsmBroadcastConfigResponse(
|
||||
const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_vec<
|
||||
GsmBroadcastSmsConfigInfo>& /*configs*/) {
|
||||
const ::android::hardware::hidl_vec<GsmBroadcastSmsConfigInfo>& /*configs*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setGsmBroadcastConfigResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::setGsmBroadcastConfigResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setGsmBroadcastActivationResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::setGsmBroadcastActivationResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
|
@ -615,30 +573,26 @@ Return<void> RadioResponse::setGsmBroadcastActivationResponse(
|
|||
|
||||
Return<void> RadioResponse::getCdmaBroadcastConfigResponse(
|
||||
const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_vec<
|
||||
CdmaBroadcastSmsConfigInfo>& /*configs*/) {
|
||||
const ::android::hardware::hidl_vec<CdmaBroadcastSmsConfigInfo>& /*configs*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setCdmaBroadcastConfigResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::setCdmaBroadcastConfigResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setCdmaBroadcastActivationResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::setCdmaBroadcastActivationResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getCDMASubscriptionResponse(
|
||||
const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_string& /*mdn*/,
|
||||
const RadioResponseInfo& info, const ::android::hardware::hidl_string& /*mdn*/,
|
||||
const ::android::hardware::hidl_string& /*hSid*/,
|
||||
const ::android::hardware::hidl_string& /*hNid*/,
|
||||
const ::android::hardware::hidl_string& /*min*/,
|
||||
|
@ -648,24 +602,21 @@ Return<void> RadioResponse::getCDMASubscriptionResponse(
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::writeSmsToRuimResponse(
|
||||
const RadioResponseInfo& info, uint32_t index) {
|
||||
Return<void> RadioResponse::writeSmsToRuimResponse(const RadioResponseInfo& info, uint32_t index) {
|
||||
rspInfo = info;
|
||||
writeSmsToRuimIndex = index;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::deleteSmsOnRuimResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::deleteSmsOnRuimResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getDeviceIdentityResponse(
|
||||
const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_string& /*imei*/,
|
||||
const RadioResponseInfo& info, const ::android::hardware::hidl_string& /*imei*/,
|
||||
const ::android::hardware::hidl_string& /*imeisv*/,
|
||||
const ::android::hardware::hidl_string& /*esn*/,
|
||||
const ::android::hardware::hidl_string& /*meid*/) {
|
||||
|
@ -674,15 +625,13 @@ Return<void> RadioResponse::getDeviceIdentityResponse(
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::exitEmergencyCallbackModeResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::exitEmergencyCallbackModeResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getSmscAddressResponse(
|
||||
const RadioResponseInfo& info,
|
||||
Return<void> RadioResponse::getSmscAddressResponse(const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_string& smsc) {
|
||||
rspInfo = info;
|
||||
smscAddress = smsc;
|
||||
|
@ -690,37 +639,33 @@ Return<void> RadioResponse::getSmscAddressResponse(
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setSmscAddressResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::setSmscAddressResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::reportSmsMemoryStatusResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::reportSmsMemoryStatusResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::reportStkServiceIsRunningResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::reportStkServiceIsRunningResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getCdmaSubscriptionSourceResponse(
|
||||
const RadioResponseInfo& info, CdmaSubscriptionSource /*source*/) {
|
||||
Return<void> RadioResponse::getCdmaSubscriptionSourceResponse(const RadioResponseInfo& info,
|
||||
CdmaSubscriptionSource /*source*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::requestIsimAuthenticationResponse(
|
||||
const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_string& /*response*/) {
|
||||
const RadioResponseInfo& info, const ::android::hardware::hidl_string& /*response*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
|
@ -733,44 +678,41 @@ Return<void> RadioResponse::acknowledgeIncomingGsmSmsWithPduResponse(
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::sendEnvelopeWithStatusResponse(
|
||||
const RadioResponseInfo& info, const IccIoResult& /*iccIo*/) {
|
||||
Return<void> RadioResponse::sendEnvelopeWithStatusResponse(const RadioResponseInfo& info,
|
||||
const IccIoResult& /*iccIo*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getVoiceRadioTechnologyResponse(
|
||||
const RadioResponseInfo& info, RadioTechnology /*rat*/) {
|
||||
Return<void> RadioResponse::getVoiceRadioTechnologyResponse(const RadioResponseInfo& info,
|
||||
RadioTechnology /*rat*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getCellInfoListResponse(
|
||||
const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_vec<CellInfo>& /*cellInfo*/) {
|
||||
const RadioResponseInfo& info, const ::android::hardware::hidl_vec<CellInfo>& /*cellInfo*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setCellInfoListRateResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::setCellInfoListRateResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setInitialAttachApnResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::setInitialAttachApnResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getImsRegistrationStateResponse(
|
||||
const RadioResponseInfo& info, bool /*isRegistered*/,
|
||||
Return<void> RadioResponse::getImsRegistrationStateResponse(const RadioResponseInfo& info,
|
||||
bool /*isRegistered*/,
|
||||
RadioTechnologyFamily /*ratFamily*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
|
@ -785,8 +727,8 @@ Return<void> RadioResponse::sendImsSmsResponse(const RadioResponseInfo& info,
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::iccTransmitApduBasicChannelResponse(
|
||||
const RadioResponseInfo& info, const IccIoResult& result) {
|
||||
Return<void> RadioResponse::iccTransmitApduBasicChannelResponse(const RadioResponseInfo& info,
|
||||
const IccIoResult& result) {
|
||||
rspInfo = info;
|
||||
this->iccIoResult = result;
|
||||
parent.notify();
|
||||
|
@ -802,23 +744,21 @@ Return<void> RadioResponse::iccOpenLogicalChannelResponse(
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::iccCloseLogicalChannelResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::iccCloseLogicalChannelResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::iccTransmitApduLogicalChannelResponse(
|
||||
const RadioResponseInfo& info, const IccIoResult& result) {
|
||||
Return<void> RadioResponse::iccTransmitApduLogicalChannelResponse(const RadioResponseInfo& info,
|
||||
const IccIoResult& result) {
|
||||
rspInfo = info;
|
||||
this->iccIoResult = result;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::nvReadItemResponse(
|
||||
const RadioResponseInfo& info,
|
||||
Return<void> RadioResponse::nvReadItemResponse(const RadioResponseInfo& info,
|
||||
const ::android::hardware::hidl_string& /*result*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
|
@ -831,29 +771,25 @@ Return<void> RadioResponse::nvWriteItemResponse(const RadioResponseInfo& info) {
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::nvWriteCdmaPrlResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::nvWriteCdmaPrlResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::nvResetConfigResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::nvResetConfigResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setUiccSubscriptionResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::setUiccSubscriptionResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setDataAllowedResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::setDataAllowedResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
|
@ -867,58 +803,56 @@ Return<void> RadioResponse::getHardwareConfigResponse(
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::requestIccSimAuthenticationResponse(
|
||||
const RadioResponseInfo& info, const IccIoResult& result) {
|
||||
Return<void> RadioResponse::requestIccSimAuthenticationResponse(const RadioResponseInfo& info,
|
||||
const IccIoResult& result) {
|
||||
rspInfo = info;
|
||||
this->iccIoResult = result;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setDataProfileResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::setDataProfileResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::requestShutdownResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::requestShutdownResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getRadioCapabilityResponse(
|
||||
const RadioResponseInfo& info, const RadioCapability& /*rc*/) {
|
||||
Return<void> RadioResponse::getRadioCapabilityResponse(const RadioResponseInfo& info,
|
||||
const RadioCapability& /*rc*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setRadioCapabilityResponse(
|
||||
const RadioResponseInfo& info, const RadioCapability& /*rc*/) {
|
||||
Return<void> RadioResponse::setRadioCapabilityResponse(const RadioResponseInfo& info,
|
||||
const RadioCapability& /*rc*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::startLceServiceResponse(
|
||||
const RadioResponseInfo& info, const LceStatusInfo& /*statusInfo*/) {
|
||||
Return<void> RadioResponse::startLceServiceResponse(const RadioResponseInfo& info,
|
||||
const LceStatusInfo& /*statusInfo*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::stopLceServiceResponse(
|
||||
const RadioResponseInfo& info, const LceStatusInfo& /*statusInfo*/) {
|
||||
Return<void> RadioResponse::stopLceServiceResponse(const RadioResponseInfo& info,
|
||||
const LceStatusInfo& /*statusInfo*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::pullLceDataResponse(
|
||||
const RadioResponseInfo& info, const LceDataInfo& /*lceInfo*/) {
|
||||
Return<void> RadioResponse::pullLceDataResponse(const RadioResponseInfo& info,
|
||||
const LceDataInfo& /*lceInfo*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
|
@ -931,37 +865,34 @@ Return<void> RadioResponse::getModemActivityInfoResponse(
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setAllowedCarriersResponse(
|
||||
const RadioResponseInfo& info, int32_t /*numAllowed*/) {
|
||||
Return<void> RadioResponse::setAllowedCarriersResponse(const RadioResponseInfo& info,
|
||||
int32_t /*numAllowed*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getAllowedCarriersResponse(
|
||||
const RadioResponseInfo& info, bool /*allAllowed*/,
|
||||
Return<void> RadioResponse::getAllowedCarriersResponse(const RadioResponseInfo& info,
|
||||
bool /*allAllowed*/,
|
||||
const CarrierRestrictions& /*carriers*/) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::sendDeviceStateResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::sendDeviceStateResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setIndicationFilterResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::setIndicationFilterResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setSimCardPowerResponse(
|
||||
const RadioResponseInfo& info) {
|
||||
Return<void> RadioResponse::setSimCardPowerResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent.notify();
|
||||
return Void();
|
||||
|
|
|
@ -18,8 +18,7 @@
|
|||
|
||||
SapCallback::SapCallback(SapHidlTest& parent) : parent(parent) {}
|
||||
|
||||
Return<void> SapCallback::connectResponse(int32_t token,
|
||||
SapConnectRsp /*sapConnectRsp*/,
|
||||
Return<void> SapCallback::connectResponse(int32_t token, SapConnectRsp /*sapConnectRsp*/,
|
||||
int32_t /*maxMsgSize*/) {
|
||||
sapResponseToken = token;
|
||||
parent.notify();
|
||||
|
@ -32,13 +31,12 @@ Return<void> SapCallback::disconnectResponse(int32_t token) {
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> SapCallback::disconnectIndication(
|
||||
int32_t /*token*/, SapDisconnectType /*disconnectType*/) {
|
||||
Return<void> SapCallback::disconnectIndication(int32_t /*token*/,
|
||||
SapDisconnectType /*disconnectType*/) {
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> SapCallback::apduResponse(
|
||||
int32_t token, SapResultCode resultCode,
|
||||
Return<void> SapCallback::apduResponse(int32_t token, SapResultCode resultCode,
|
||||
const ::android::hardware::hidl_vec<uint8_t>& /*apduRsp*/) {
|
||||
sapResponseToken = token;
|
||||
sapResultCode = resultCode;
|
||||
|
@ -55,39 +53,37 @@ Return<void> SapCallback::transferAtrResponse(
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> SapCallback::powerResponse(int32_t token,
|
||||
SapResultCode resultCode) {
|
||||
Return<void> SapCallback::powerResponse(int32_t token, SapResultCode resultCode) {
|
||||
sapResponseToken = token;
|
||||
sapResultCode = resultCode;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> SapCallback::resetSimResponse(int32_t token,
|
||||
SapResultCode resultCode) {
|
||||
Return<void> SapCallback::resetSimResponse(int32_t token, SapResultCode resultCode) {
|
||||
sapResponseToken = token;
|
||||
sapResultCode = resultCode;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> SapCallback::statusIndication(int32_t /*token*/,
|
||||
SapStatus /*status*/) {
|
||||
Return<void> SapCallback::statusIndication(int32_t /*token*/, SapStatus /*status*/) {
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> SapCallback::transferCardReaderStatusResponse(
|
||||
int32_t token, SapResultCode resultCode, int32_t /*cardReaderStatus*/) {
|
||||
Return<void> SapCallback::transferCardReaderStatusResponse(int32_t token, SapResultCode resultCode,
|
||||
int32_t /*cardReaderStatus*/) {
|
||||
sapResponseToken = token;
|
||||
sapResultCode = resultCode;
|
||||
parent.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> SapCallback::errorResponse(int32_t /*token*/) { return Void(); }
|
||||
Return<void> SapCallback::errorResponse(int32_t /*token*/) {
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> SapCallback::transferProtocolResponse(int32_t token,
|
||||
SapResultCode resultCode) {
|
||||
Return<void> SapCallback::transferProtocolResponse(int32_t token, SapResultCode resultCode) {
|
||||
sapResponseToken = token;
|
||||
sapResultCode = resultCode;
|
||||
parent.notify();
|
||||
|
|
|
@ -20,10 +20,10 @@
|
|||
* Test ISap.connectReq() for the response returned.
|
||||
*/
|
||||
TEST_F(SapHidlTest, connectReq) {
|
||||
int32_t token = 0;
|
||||
int32_t token = GetRandomSerialNumber();
|
||||
int32_t maxMsgSize = 100;
|
||||
|
||||
sap->connectReq(++token, maxMsgSize);
|
||||
sap->connectReq(token, maxMsgSize);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(sapCb->sapResponseToken, token);
|
||||
}
|
||||
|
@ -32,9 +32,9 @@ TEST_F(SapHidlTest, connectReq) {
|
|||
* Test IRadio.disconnectReq() for the response returned
|
||||
*/
|
||||
TEST_F(SapHidlTest, disconnectReq) {
|
||||
int32_t token = 0;
|
||||
int32_t token = GetRandomSerialNumber();
|
||||
|
||||
sap->disconnectReq(++token);
|
||||
sap->disconnectReq(token);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(sapCb->sapResponseToken, token);
|
||||
}
|
||||
|
@ -43,15 +43,16 @@ TEST_F(SapHidlTest, disconnectReq) {
|
|||
* Test IRadio.apduReq() for the response returned.
|
||||
*/
|
||||
TEST_F(SapHidlTest, apduReq) {
|
||||
int32_t token = 0;
|
||||
int32_t token = GetRandomSerialNumber();
|
||||
SapApduType sapApduType = SapApduType::APDU;
|
||||
android::hardware::hidl_vec<uint8_t> command = {};
|
||||
|
||||
sap->apduReq(++token, sapApduType, command);
|
||||
sap->apduReq(token, sapApduType, command);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(sapCb->sapResponseToken, token);
|
||||
|
||||
ASSERT_TRUE(SapResultCode::CARD_NOT_ACCESSSIBLE == sapCb->sapResultCode ||
|
||||
ASSERT_TRUE(SapResultCode::GENERIC_FAILURE == sapCb->sapResultCode ||
|
||||
SapResultCode::CARD_NOT_ACCESSSIBLE == sapCb->sapResultCode ||
|
||||
SapResultCode::CARD_ALREADY_POWERED_OFF == sapCb->sapResultCode ||
|
||||
SapResultCode::CARD_REMOVED == sapCb->sapResultCode);
|
||||
}
|
||||
|
@ -60,13 +61,14 @@ TEST_F(SapHidlTest, apduReq) {
|
|||
* Test IRadio.transferAtrReq() for the response returned.
|
||||
*/
|
||||
TEST_F(SapHidlTest, transferAtrReq) {
|
||||
int32_t token = 0;
|
||||
int32_t token = GetRandomSerialNumber();
|
||||
|
||||
sap->transferAtrReq(++token);
|
||||
sap->transferAtrReq(token);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(sapCb->sapResponseToken, token);
|
||||
|
||||
ASSERT_TRUE(SapResultCode::DATA_NOT_AVAILABLE == sapCb->sapResultCode ||
|
||||
ASSERT_TRUE(SapResultCode::GENERIC_FAILURE == sapCb->sapResultCode ||
|
||||
SapResultCode::DATA_NOT_AVAILABLE == sapCb->sapResultCode ||
|
||||
SapResultCode::CARD_ALREADY_POWERED_OFF == sapCb->sapResultCode ||
|
||||
SapResultCode::CARD_REMOVED == sapCb->sapResultCode);
|
||||
}
|
||||
|
@ -75,14 +77,15 @@ TEST_F(SapHidlTest, transferAtrReq) {
|
|||
* Test IRadio.powerReq() for the response returned.
|
||||
*/
|
||||
TEST_F(SapHidlTest, powerReq) {
|
||||
int32_t token = 0;
|
||||
int32_t token = GetRandomSerialNumber();
|
||||
bool state = true;
|
||||
|
||||
sap->powerReq(++token, state);
|
||||
sap->powerReq(token, state);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(sapCb->sapResponseToken, token);
|
||||
|
||||
ASSERT_TRUE(SapResultCode::CARD_NOT_ACCESSSIBLE == sapCb->sapResultCode ||
|
||||
ASSERT_TRUE(SapResultCode::GENERIC_FAILURE == sapCb->sapResultCode ||
|
||||
SapResultCode::CARD_NOT_ACCESSSIBLE == sapCb->sapResultCode ||
|
||||
SapResultCode::CARD_ALREADY_POWERED_OFF == sapCb->sapResultCode ||
|
||||
SapResultCode::CARD_REMOVED == sapCb->sapResultCode ||
|
||||
SapResultCode::CARD_ALREADY_POWERED_ON == sapCb->sapResultCode);
|
||||
|
@ -92,13 +95,14 @@ TEST_F(SapHidlTest, powerReq) {
|
|||
* Test IRadio.resetSimReq() for the response returned.
|
||||
*/
|
||||
TEST_F(SapHidlTest, resetSimReq) {
|
||||
int32_t token = 0;
|
||||
int32_t token = GetRandomSerialNumber();
|
||||
|
||||
sap->resetSimReq(++token);
|
||||
sap->resetSimReq(token);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(sapCb->sapResponseToken, token);
|
||||
|
||||
ASSERT_TRUE(SapResultCode::CARD_NOT_ACCESSSIBLE == sapCb->sapResultCode ||
|
||||
ASSERT_TRUE(SapResultCode::GENERIC_FAILURE == sapCb->sapResultCode ||
|
||||
SapResultCode::CARD_NOT_ACCESSSIBLE == sapCb->sapResultCode ||
|
||||
SapResultCode::CARD_ALREADY_POWERED_OFF == sapCb->sapResultCode ||
|
||||
SapResultCode::CARD_REMOVED == sapCb->sapResultCode);
|
||||
}
|
||||
|
@ -107,23 +111,24 @@ TEST_F(SapHidlTest, resetSimReq) {
|
|||
* Test IRadio.transferCardReaderStatusReq() for the response returned.
|
||||
*/
|
||||
TEST_F(SapHidlTest, transferCardReaderStatusReq) {
|
||||
int32_t token = 0;
|
||||
int32_t token = GetRandomSerialNumber();
|
||||
|
||||
sap->transferCardReaderStatusReq(++token);
|
||||
sap->transferCardReaderStatusReq(token);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(sapCb->sapResponseToken, token);
|
||||
|
||||
EXPECT_EQ(SapResultCode::DATA_NOT_AVAILABLE, sapCb->sapResultCode);
|
||||
ASSERT_TRUE(SapResultCode::GENERIC_FAILURE == sapCb->sapResultCode ||
|
||||
SapResultCode::DATA_NOT_AVAILABLE == sapCb->sapResultCode);
|
||||
}
|
||||
|
||||
/*
|
||||
* Test IRadio.setTransferProtocolReq() for the response returned.
|
||||
*/
|
||||
TEST_F(SapHidlTest, setTransferProtocolReq) {
|
||||
int32_t token = 0;
|
||||
int32_t token = GetRandomSerialNumber();
|
||||
SapTransferProtocol sapTransferProtocol = SapTransferProtocol::T0;
|
||||
|
||||
sap->setTransferProtocolReq(++token, sapTransferProtocol);
|
||||
sap->setTransferProtocolReq(token, sapTransferProtocol);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(sapCb->sapResponseToken, token);
|
||||
|
||||
|
|
|
@ -17,8 +17,7 @@
|
|||
#include <sap_hidl_hal_utils.h>
|
||||
|
||||
void SapHidlTest::SetUp() {
|
||||
sap = ::testing::VtsHalHidlTargetTestBase::getService<ISap>(
|
||||
hidl_string(SAP_SERVICE_NAME));
|
||||
sap = ::testing::VtsHalHidlTargetTestBase::getService<ISap>(hidl_string(SAP_SERVICE_NAME));
|
||||
ASSERT_NE(sap, nullptr);
|
||||
|
||||
sapCb = new SapCallback(*this);
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
#include <android/hardware/radio/1.0/ISapCallback.h>
|
||||
#include <android/hardware/radio/1.0/types.h>
|
||||
|
||||
#include <vts_test_util.h>
|
||||
|
||||
using namespace ::android::hardware::radio::V1_0;
|
||||
|
||||
using ::android::hardware::hidl_string;
|
||||
|
@ -51,20 +53,16 @@ class SapCallback : public ISapCallback {
|
|||
|
||||
virtual ~SapCallback() = default;
|
||||
|
||||
Return<void> connectResponse(int32_t token, SapConnectRsp sapConnectRsp,
|
||||
int32_t maxMsgSize);
|
||||
Return<void> connectResponse(int32_t token, SapConnectRsp sapConnectRsp, int32_t maxMsgSize);
|
||||
|
||||
Return<void> disconnectResponse(int32_t token);
|
||||
|
||||
Return<void> disconnectIndication(int32_t token,
|
||||
SapDisconnectType disconnectType);
|
||||
Return<void> disconnectIndication(int32_t token, SapDisconnectType disconnectType);
|
||||
|
||||
Return<void> apduResponse(
|
||||
int32_t token, SapResultCode resultCode,
|
||||
Return<void> apduResponse(int32_t token, SapResultCode resultCode,
|
||||
const ::android::hardware::hidl_vec<uint8_t>& apduRsp);
|
||||
|
||||
Return<void> transferAtrResponse(
|
||||
int32_t token, SapResultCode resultCode,
|
||||
Return<void> transferAtrResponse(int32_t token, SapResultCode resultCode,
|
||||
const ::android::hardware::hidl_vec<uint8_t>& atr);
|
||||
|
||||
Return<void> powerResponse(int32_t token, SapResultCode resultCode);
|
||||
|
@ -73,14 +71,12 @@ class SapCallback : public ISapCallback {
|
|||
|
||||
Return<void> statusIndication(int32_t token, SapStatus status);
|
||||
|
||||
Return<void> transferCardReaderStatusResponse(int32_t token,
|
||||
SapResultCode resultCode,
|
||||
Return<void> transferCardReaderStatusResponse(int32_t token, SapResultCode resultCode,
|
||||
int32_t cardReaderStatus);
|
||||
|
||||
Return<void> errorResponse(int32_t token);
|
||||
|
||||
Return<void> transferProtocolResponse(int32_t token,
|
||||
SapResultCode resultCode);
|
||||
Return<void> transferProtocolResponse(int32_t token, SapResultCode resultCode);
|
||||
};
|
||||
|
||||
// The main test class for Sap HIDL.
|
||||
|
|
22
radio/1.0/vts/functional/vts_test_util.cpp
Normal file
22
radio/1.0/vts/functional/vts_test_util.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (C) 2017 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#include <vts_test_util.h>
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
int GetRandomSerialNumber() {
|
||||
return rand();
|
||||
}
|
17
radio/1.0/vts/functional/vts_test_util.h
Normal file
17
radio/1.0/vts/functional/vts_test_util.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* Copyright (C) 2017 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
int GetRandomSerialNumber();
|
Loading…
Reference in a new issue