Revert "Add emergencyDial_1_6 in the HAL to modify the multisim ..."
Revert "Add cuttilefish implementation for emergencyDial_1_6"
Revert submission 1548864-cp-edial-1-6
Reason for revert: some build use some vendor ril_service.cpp
Reverted Changes:
I515ea7381:Add cuttilefish implementation for emergencyDial_1...
I94319ab34:Add emergencyDial_1_6 in the HAL to modify the mul...
Change-Id: I83aedc19bb8eade10c330c2bca625495b9e359e9
diff --git a/radio/1.6/vts/functional/radio_hidl_hal_api.cpp b/radio/1.6/vts/functional/radio_hidl_hal_api.cpp
index 44900b8..8b87292 100644
--- a/radio/1.6/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.6/vts/functional/radio_hidl_hal_api.cpp
@@ -412,167 +412,6 @@
}
/*
- * Test IRadio.emergencyDial() for the response returned.
- */
-TEST_P(RadioHidlTest_v1_6, emergencyDial_1_6) {
- if (!deviceSupportsFeature(FEATURE_VOICE_CALL)) {
- ALOGI("Skipping emergencyDial because voice call is not supported in device");
- return;
- } else {
- ALOGI("Running emergencyDial because voice call is supported in device");
- }
-
- serial = GetRandomSerialNumber();
-
- ::android::hardware::radio::V1_0::Dial dialInfo;
- dialInfo.address = hidl_string("911");
- int categories = static_cast<int>(
- ::android::hardware::radio::V1_4::EmergencyServiceCategory::UNSPECIFIED);
- std::vector<hidl_string> urns = {""};
- ::android::hardware::radio::V1_4::EmergencyCallRouting routing =
- ::android::hardware::radio::V1_4::EmergencyCallRouting::UNKNOWN;
-
- Return<void> res =
- radio_v1_6->emergencyDial_1_6(serial, dialInfo, categories, urns, routing, true, true);
- ASSERT_OK(res);
- EXPECT_EQ(std::cv_status::no_timeout, wait());
- EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo_v1_0.type);
- EXPECT_EQ(serial, radioRsp_v1_6->rspInfo_v1_0.serial);
-
- ALOGI("emergencyDial, rspInfo_v1_0.error = %s\n",
- toString(radioRsp_v1_6->rspInfo_v1_0.error).c_str());
-
- ::android::hardware::radio::V1_0::RadioError rspEmergencyDial =
- radioRsp_v1_6->rspInfo_v1_0.error;
- // In DSDS or TSTS, we only check the result if the current slot is IN_SERVICE
- // or Emergency_Only.
- if (isDsDsEnabled() || isTsTsEnabled()) {
- serial = GetRandomSerialNumber();
- radio_v1_6->getVoiceRegistrationState(serial);
- EXPECT_EQ(std::cv_status::no_timeout, wait());
- if (isVoiceEmergencyOnly(radioRsp_v1_6->voiceRegResp.regState) ||
- isVoiceInService(radioRsp_v1_6->voiceRegResp.regState)) {
- EXPECT_EQ(::android::hardware::radio::V1_0::RadioError::NONE, rspEmergencyDial);
- }
- } else {
- EXPECT_EQ(::android::hardware::radio::V1_0::RadioError::NONE, rspEmergencyDial);
- }
-
- // Give some time for modem to establish the emergency call channel.
- sleep(MODEM_EMERGENCY_CALL_ESTABLISH_TIME);
-
- // Disconnect all the potential established calls to prevent them affecting other tests.
- clearPotentialEstablishedCalls();
-}
-
-/*
- * Test IRadio.emergencyDial() with specified service and its response returned.
- */
-TEST_P(RadioHidlTest_v1_6, emergencyDial_1_6_withServices) {
- if (!deviceSupportsFeature(FEATURE_VOICE_CALL)) {
- ALOGI("Skipping emergencyDial because voice call is not supported in device");
- return;
- } else {
- ALOGI("Running emergencyDial because voice call is supported in device");
- }
-
- serial = GetRandomSerialNumber();
-
- ::android::hardware::radio::V1_0::Dial dialInfo;
- dialInfo.address = hidl_string("911");
- int categories =
- static_cast<int>(::android::hardware::radio::V1_4::EmergencyServiceCategory::AMBULANCE);
- std::vector<hidl_string> urns = {"urn:service:sos.ambulance"};
- ::android::hardware::radio::V1_4::EmergencyCallRouting routing =
- ::android::hardware::radio::V1_4::EmergencyCallRouting::UNKNOWN;
-
- Return<void> res =
- radio_v1_6->emergencyDial_1_6(serial, dialInfo, categories, urns, routing, true, true);
- ASSERT_OK(res);
- EXPECT_EQ(std::cv_status::no_timeout, wait());
- EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo_v1_0.type);
- EXPECT_EQ(serial, radioRsp_v1_6->rspInfo_v1_0.serial);
-
- ALOGI("emergencyDial_withServices, rspInfo_v1_0.error = %s\n",
- toString(radioRsp_v1_6->rspInfo_v1_0.error).c_str());
- ::android::hardware::radio::V1_0::RadioError rspEmergencyDial =
- radioRsp_v1_6->rspInfo_v1_0.error;
-
- // In DSDS or TSTS, we only check the result if the current slot is IN_SERVICE
- // or Emergency_Only.
- if (isDsDsEnabled() || isTsTsEnabled()) {
- serial = GetRandomSerialNumber();
- radio_v1_6->getVoiceRegistrationState(serial);
- EXPECT_EQ(std::cv_status::no_timeout, wait());
- if (isVoiceEmergencyOnly(radioRsp_v1_6->voiceRegResp.regState) ||
- isVoiceInService(radioRsp_v1_6->voiceRegResp.regState)) {
- EXPECT_EQ(::android::hardware::radio::V1_0::RadioError::NONE, rspEmergencyDial);
- }
- } else {
- EXPECT_EQ(::android::hardware::radio::V1_0::RadioError::NONE, rspEmergencyDial);
- }
- // Give some time for modem to establish the emergency call channel.
- sleep(MODEM_EMERGENCY_CALL_ESTABLISH_TIME);
-
- // Disconnect all the potential established calls to prevent them affecting other tests.
- clearPotentialEstablishedCalls();
-}
-
-/*
- * Test IRadio.emergencyDial() with known emergency call routing and its response returned.
- */
-TEST_P(RadioHidlTest_v1_6, emergencyDial_1_6_withEmergencyRouting) {
- if (!deviceSupportsFeature(FEATURE_VOICE_CALL)) {
- ALOGI("Skipping emergencyDial because voice call is not supported in device");
- return;
- } else {
- ALOGI("Running emergencyDial because voice call is supported in device");
- }
-
- serial = GetRandomSerialNumber();
-
- ::android::hardware::radio::V1_0::Dial dialInfo;
- dialInfo.address = hidl_string("911");
- int categories = static_cast<int>(
- ::android::hardware::radio::V1_4::EmergencyServiceCategory::UNSPECIFIED);
- std::vector<hidl_string> urns = {""};
- ::android::hardware::radio::V1_4::EmergencyCallRouting routing =
- ::android::hardware::radio::V1_4::EmergencyCallRouting::EMERGENCY;
-
- Return<void> res =
- radio_v1_6->emergencyDial_1_6(serial, dialInfo, categories, urns, routing, true, true);
- ASSERT_OK(res);
- EXPECT_EQ(std::cv_status::no_timeout, wait());
- EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo_v1_0.type);
- EXPECT_EQ(serial, radioRsp_v1_6->rspInfo_v1_0.serial);
-
- ALOGI("emergencyDial_withEmergencyRouting, rspInfo_v1_0.error = %s\n",
- toString(radioRsp_v1_6->rspInfo_v1_0.error).c_str());
- ::android::hardware::radio::V1_0::RadioError rspEmergencyDial =
- radioRsp_v1_6->rspInfo_v1_0.error;
-
- // In DSDS or TSTS, we only check the result if the current slot is IN_SERVICE
- // or Emergency_Only.
- if (isDsDsEnabled() || isTsTsEnabled()) {
- serial = GetRandomSerialNumber();
- radio_v1_6->getVoiceRegistrationState(serial);
- EXPECT_EQ(std::cv_status::no_timeout, wait());
- if (isVoiceEmergencyOnly(radioRsp_v1_6->voiceRegResp.regState) ||
- isVoiceInService(radioRsp_v1_6->voiceRegResp.regState)) {
- EXPECT_EQ(::android::hardware::radio::V1_0::RadioError::NONE, rspEmergencyDial);
- }
- } else {
- EXPECT_EQ(::android::hardware::radio::V1_0::RadioError::NONE, rspEmergencyDial);
- }
-
- // Give some time for modem to establish the emergency call channel.
- sleep(MODEM_EMERGENCY_CALL_ESTABLISH_TIME);
-
- // Disconnect all the potential established calls to prevent them affecting other tests.
- clearPotentialEstablishedCalls();
-}
-
-/*
* Test IRadio.getCurrentCalls_1_6() for the response returned.
*/
TEST_P(RadioHidlTest_v1_6, getCurrentCalls_1_6) {
diff --git a/radio/1.6/vts/functional/radio_hidl_hal_test.cpp b/radio/1.6/vts/functional/radio_hidl_hal_test.cpp
index 59f7682..79c3cde 100644
--- a/radio/1.6/vts/functional/radio_hidl_hal_test.cpp
+++ b/radio/1.6/vts/functional/radio_hidl_hal_test.cpp
@@ -74,29 +74,6 @@
return status;
}
-void RadioHidlTest_v1_6::clearPotentialEstablishedCalls() {
- // Get the current call Id to hangup the established emergency call.
- serial = GetRandomSerialNumber();
- radio_v1_6->getCurrentCalls_1_6(serial);
- EXPECT_EQ(std::cv_status::no_timeout, wait());
-
- // Hang up to disconnect the established call channels.
- for (const ::android::hardware::radio::V1_6::Call& call : radioRsp_v1_6->currentCalls) {
- serial = GetRandomSerialNumber();
- radio_v1_6->hangup(serial, call.base.base.index);
- ALOGI("Hang up to disconnect the established call channel: %d", call.base.base.index);
- EXPECT_EQ(std::cv_status::no_timeout, wait());
- // Give some time for modem to disconnect the established call channel.
- sleep(MODEM_EMERGENCY_CALL_DISCONNECT_TIME);
- }
-
- // Verify there are no more current calls.
- serial = GetRandomSerialNumber();
- radio_v1_6->getCurrentCalls_1_6(serial);
- EXPECT_EQ(std::cv_status::no_timeout, wait());
- EXPECT_EQ(0, radioRsp_v1_6->currentCalls.size());
-}
-
void RadioHidlTest_v1_6::updateSimCardStatus() {
serial = GetRandomSerialNumber();
radio_v1_6->getIccCardStatus(serial);
diff --git a/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h b/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h
index db067d7..5fcfa3b 100644
--- a/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h
+++ b/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h
@@ -70,8 +70,7 @@
::android::hardware::radio::V1_6::RadioResponseInfo rspInfo;
// Call
- hidl_vec<::android::hardware::radio::V1_6::Call> currentCalls;
- ::android::hardware::radio::V1_2::VoiceRegStateResult voiceRegResp;
+ hidl_vec<::android::hardware::radio::V1_2::Call> currentCalls;
// Sms
SendSmsResult sendSmsResult;
diff --git a/radio/1.6/vts/functional/radio_response.cpp b/radio/1.6/vts/functional/radio_response.cpp
index ba84fd4..7c5cf6d 100644
--- a/radio/1.6/vts/functional/radio_response.cpp
+++ b/radio/1.6/vts/functional/radio_response.cpp
@@ -816,11 +816,8 @@
}
Return<void> RadioResponse_v1_6::getVoiceRegistrationStateResponse_1_2(
- const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
- const ::android::hardware::radio::V1_2::VoiceRegStateResult& voiceRegResponse) {
- rspInfo_v1_0 = info;
- voiceRegResp = voiceRegResponse;
- parent_v1_6.notify(info.serial);
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_2::VoiceRegStateResult& /*voiceRegResponse*/) {
return Void();
}
@@ -1213,9 +1210,8 @@
Return<void> RadioResponse_v1_6::getCurrentCallsResponse_1_6(
const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
- const ::android::hardware::hidl_vec<::android::hardware::radio::V1_6::Call>& calls) {
+ const ::android::hardware::hidl_vec<::android::hardware::radio::V1_6::Call>& /*calls*/) {
rspInfo = info;
- currentCalls = calls;
parent_v1_6.notify(info.serial);
return Void();
}