Merge "Allow not implementing some config and network Radio HAL methods" into main
diff --git a/radio/aidl/vts/radio_network_test.cpp b/radio/aidl/vts/radio_network_test.cpp
index 5c1955a..ff231db 100644
--- a/radio/aidl/vts/radio_network_test.cpp
+++ b/radio/aidl/vts/radio_network_test.cpp
@@ -1020,6 +1020,9 @@
EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
ALOGI("startNetworkScan, rspInfo.error = %s\n",
toString(radioRsp_network->rspInfo.error).c_str());
+ if (radioRsp_network->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED) {
+ GTEST_SKIP() << "Skipping startNetworkScan because it's not supported";
+ }
if (cardStatus.cardState == CardStatus::STATE_ABSENT) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error, {RadioError::SIM_ABSENT}));
@@ -1072,6 +1075,9 @@
EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
ALOGI("startNetworkScan_InvalidArgument, rspInfo.error = %s\n",
toString(radioRsp_network->rspInfo.error).c_str());
+ if (radioRsp_network->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED) {
+ GTEST_SKIP() << "Skipping startNetworkScan because it's not supported";
+ }
if (cardStatus.cardState == CardStatus::STATE_ABSENT) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
@@ -1138,6 +1144,9 @@
EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
ALOGI("startNetworkScan_InvalidInterval1, rspInfo.error = %s\n",
toString(radioRsp_network->rspInfo.error).c_str());
+ if (radioRsp_network->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED) {
+ GTEST_SKIP() << "Skipping startNetworkScan because it's not supported";
+ }
if (cardStatus.cardState == CardStatus::STATE_ABSENT) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
{RadioError::SIM_ABSENT, RadioError::INVALID_ARGUMENTS}));
@@ -1172,6 +1181,9 @@
EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
ALOGI("startNetworkScan_InvalidInterval2, rspInfo.error = %s\n",
toString(radioRsp_network->rspInfo.error).c_str());
+ if (radioRsp_network->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED) {
+ GTEST_SKIP() << "Skipping startNetworkScan because it's not supported";
+ }
if (cardStatus.cardState == CardStatus::STATE_ABSENT) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
{RadioError::SIM_ABSENT, RadioError::INVALID_ARGUMENTS}));
@@ -1206,6 +1218,9 @@
EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
ALOGI("startNetworkScan_InvalidMaxSearchTime1, rspInfo.error = %s\n",
toString(radioRsp_network->rspInfo.error).c_str());
+ if (radioRsp_network->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED) {
+ GTEST_SKIP() << "Skipping startNetworkScan because it's not supported";
+ }
if (cardStatus.cardState == CardStatus::STATE_ABSENT) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
{RadioError::SIM_ABSENT, RadioError::INVALID_ARGUMENTS}));
@@ -1240,6 +1255,9 @@
EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
ALOGI("startNetworkScan_InvalidMaxSearchTime2, rspInfo.error = %s\n",
toString(radioRsp_network->rspInfo.error).c_str());
+ if (radioRsp_network->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED) {
+ GTEST_SKIP() << "Skipping startNetworkScan because it's not supported";
+ }
if (cardStatus.cardState == CardStatus::STATE_ABSENT) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
{RadioError::SIM_ABSENT, RadioError::INVALID_ARGUMENTS}));
@@ -1274,6 +1292,9 @@
EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
ALOGI("startNetworkScan_InvalidPeriodicity1, rspInfo.error = %s\n",
toString(radioRsp_network->rspInfo.error).c_str());
+ if (radioRsp_network->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED) {
+ GTEST_SKIP() << "Skipping startNetworkScan because it's not supported";
+ }
if (cardStatus.cardState == CardStatus::STATE_ABSENT) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
{RadioError::SIM_ABSENT, RadioError::INVALID_ARGUMENTS}));
@@ -1308,6 +1329,9 @@
EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
ALOGI("startNetworkScan_InvalidPeriodicity2, rspInfo.error = %s\n",
toString(radioRsp_network->rspInfo.error).c_str());
+ if (radioRsp_network->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED) {
+ GTEST_SKIP() << "Skipping startNetworkScan because it's not supported";
+ }
if (cardStatus.cardState == CardStatus::STATE_ABSENT) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
{RadioError::SIM_ABSENT, RadioError::INVALID_ARGUMENTS}));
@@ -1342,6 +1366,9 @@
EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
ALOGI("startNetworkScan_GoodRequest1, rspInfo.error = %s\n",
toString(radioRsp_network->rspInfo.error).c_str());
+ if (radioRsp_network->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED) {
+ GTEST_SKIP() << "Skipping startNetworkScan because it's not supported";
+ }
if (cardStatus.cardState == CardStatus::STATE_ABSENT) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
{RadioError::NONE, RadioError::SIM_ABSENT}));
@@ -1382,6 +1409,9 @@
EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
ALOGI("startNetworkScan_GoodRequest2, rspInfo.error = %s\n",
toString(radioRsp_network->rspInfo.error).c_str());
+ if (radioRsp_network->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED) {
+ GTEST_SKIP() << "Skipping startNetworkScan because it's not supported";
+ }
if (cardStatus.cardState == CardStatus::STATE_ABSENT) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
{RadioError::NONE, RadioError::SIM_ABSENT}));
@@ -1418,7 +1448,8 @@
radioRsp_network->rspInfo.error,
{RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::INVALID_ARGUMENTS,
RadioError::INVALID_STATE, RadioError::NO_MEMORY, RadioError::INTERNAL_ERR,
- RadioError::SYSTEM_ERR, RadioError::CANCELLED, RadioError::MODEM_ERR}));
+ RadioError::SYSTEM_ERR, RadioError::CANCELLED, RadioError::MODEM_ERR,
+ RadioError::REQUEST_NOT_SUPPORTED}));
}
/*
@@ -1435,6 +1466,9 @@
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
+ if (radioRsp_network->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED) {
+ GTEST_SKIP() << "Skipping getBarringInfo because it's not supported";
+ }
ASSERT_TRUE(radioRsp_network->barringInfoList.size() > 0);
std::set<int> reportedServices;
diff --git a/radio/aidl/vts/radio_sim_test.cpp b/radio/aidl/vts/radio_sim_test.cpp
index 138424c..e7c7c65 100644
--- a/radio/aidl/vts/radio_sim_test.cpp
+++ b/radio/aidl/vts/radio_sim_test.cpp
@@ -87,7 +87,12 @@
EXPECT_EQ(serial, radioRsp_sim->rspInfo.serial);
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_sim->rspInfo.error,
{RadioError::NONE, RadioError::INVALID_ARGUMENTS,
- RadioError::RADIO_NOT_AVAILABLE, RadioError::SIM_ERR}));
+ RadioError::RADIO_NOT_AVAILABLE, RadioError::SIM_ERR,
+ RadioError::REQUEST_NOT_SUPPORTED}));
+
+ if (radioRsp_sim->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED) {
+ GTEST_SKIP() << "Skipping setSimCardPower because it's not supported";
+ }
// setSimCardPower does not return until the request is handled, and should not trigger
// CardStatus::STATE_ABSENT when turning off power
@@ -667,7 +672,8 @@
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_sim->rspInfo.type);
ASSERT_TRUE(CheckAnyOfErrors(
radioRsp_sim->rspInfo.error,
- {RadioError::PASSWORD_INCORRECT, RadioError::INVALID_SIM_STATE}));
+ {RadioError::PASSWORD_INCORRECT, RadioError::INVALID_SIM_STATE,
+ RadioError::REQUEST_NOT_SUPPORTED}));
}
}
}
@@ -728,7 +734,8 @@
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_sim->rspInfo.type);
ASSERT_TRUE(CheckAnyOfErrors(
radioRsp_sim->rspInfo.error,
- {RadioError::PASSWORD_INCORRECT, RadioError::INVALID_SIM_STATE}));
+ {RadioError::PASSWORD_INCORRECT, RadioError::INVALID_SIM_STATE,
+ RadioError::REQUEST_NOT_SUPPORTED}));
}
}
}