Merge "Add setupDataCall_1_4 VTS test case" am: 7d30a90b5e
am: feadd1da7a
am: 1dce037462
Change-Id: Ifb25be11a4126286a2806ff4196a58c9b56586b0
This commit is contained in:
commit
86fde623c3
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