Add setupDataCall_1_4 VTS test case
Add a test case for testing setupDataCall_1_4 of radio 1.4 Test: Compilation Bug: 121348900 Change-Id: I0055a6492f1e111444391ffa67b0db2c5d29da1f
This commit is contained in:
parent
3ee1f4a333
commit
56a94d502d
1 changed files with 56 additions and 1 deletions
|
@ -93,4 +93,59 @@ TEST_F(RadioHidlTest_v1_4, emergencyDial_withEmergencyRouting) {
|
|||
ALOGI("emergencyDial_withEmergencyRouting, rspInfo.error = %s\n",
|
||||
toString(radioRsp_v1_4->rspInfo.error).c_str());
|
||||
EXPECT_EQ(RadioError::NONE, radioRsp_v1_4->rspInfo.error);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Test IRadio.setupDataCall_1_4() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest_v1_4, setupDataCall_1_4) {
|
||||
serial = GetRandomSerialNumber();
|
||||
|
||||
::android::hardware::radio::V1_4::AccessNetwork accessNetwork =
|
||||
::android::hardware::radio::V1_4::AccessNetwork::EUTRAN;
|
||||
|
||||
android::hardware::radio::V1_4::DataProfileInfo dataProfileInfo;
|
||||
memset(&dataProfileInfo, 0, sizeof(dataProfileInfo));
|
||||
dataProfileInfo.profileId = DataProfileId::DEFAULT;
|
||||
dataProfileInfo.apn = hidl_string("internet");
|
||||
dataProfileInfo.protocol = PdpProtocolType::IPV4V6;
|
||||
dataProfileInfo.roamingProtocol = PdpProtocolType::IPV4V6;
|
||||
dataProfileInfo.authType = ApnAuthType::NO_PAP_NO_CHAP;
|
||||
dataProfileInfo.user = hidl_string("username");
|
||||
dataProfileInfo.password = hidl_string("password");
|
||||
dataProfileInfo.type = DataProfileInfoType::THREE_GPP;
|
||||
dataProfileInfo.maxConnsTime = 300;
|
||||
dataProfileInfo.maxConns = 20;
|
||||
dataProfileInfo.waitTime = 0;
|
||||
dataProfileInfo.enabled = true;
|
||||
dataProfileInfo.supportedApnTypesBitmap = 320;
|
||||
dataProfileInfo.bearerBitmap = 161543;
|
||||
dataProfileInfo.mtu = 0;
|
||||
dataProfileInfo.preferred = true;
|
||||
dataProfileInfo.persistent = false;
|
||||
|
||||
bool roamingAllowed = false;
|
||||
|
||||
::android::hardware::radio::V1_2::DataRequestReason reason =
|
||||
::android::hardware::radio::V1_2::DataRequestReason::NORMAL;
|
||||
std::vector<hidl_string> addresses = {""};
|
||||
std::vector<hidl_string> dnses = {""};
|
||||
|
||||
Return<void> res = radio_v1_4->setupDataCall_1_4(serial, accessNetwork, dataProfileInfo,
|
||||
roamingAllowed, reason, addresses, dnses);
|
||||
ASSERT_OK(res);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_4->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp_v1_4->rspInfo.serial);
|
||||
|
||||
if (cardStatus.base.base.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
|
||||
{RadioError::SIM_ABSENT, RadioError::RADIO_NOT_AVAILABLE,
|
||||
RadioError::OP_NOT_ALLOWED_BEFORE_REG_TO_NW}));
|
||||
} else if (cardStatus.base.base.cardState == CardState::PRESENT) {
|
||||
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
|
||||
{RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE,
|
||||
RadioError::OP_NOT_ALLOWED_BEFORE_REG_TO_NW}));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue