Update VTS tests to use GeranBands P900 and 850 instead am: 96f358efda

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1371139

Change-Id: I6953fa59c359395c1ddb02ded114d11a6153b30a
This commit is contained in:
Sarah Chin
2020-07-23 04:49:44 +00:00
committed by Automerger Merge Worker
6 changed files with 180 additions and 107 deletions

View File

@@ -18,6 +18,15 @@
#define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk())
namespace {
const RadioAccessSpecifier GERAN_SPECIFIER_P900 = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
.geranBands = {GeranBands::BAND_P900},
.channels = {1, 2}};
const RadioAccessSpecifier GERAN_SPECIFIER_850 = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
.geranBands = {GeranBands::BAND_850},
.channels = {128, 129}};
} // namespace
/*
* Test IRadio.emergencyDial() for the response returned.
*/
@@ -199,14 +208,10 @@ TEST_P(RadioHidlTest_v1_4, setPreferredNetworkTypeBitmap) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan) {
serial = GetRandomSerialNumber();
RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
.geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
.channels = {1, 2}};
::android::hardware::radio::V1_2::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
.specifiers = {specifier},
.specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
.maxSearchTime = 60,
.incrementalResults = false,
.incrementalResultsPeriodicity = 1};
@@ -234,6 +239,11 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan) {
{RadioError::NONE, RadioError::OPERATION_NOT_ALLOWED,
RadioError::REQUEST_NOT_SUPPORTED}));
}
if (radioRsp_v1_4->rspInfo.error == RadioError::NONE) {
ALOGI("Stop Network Scan");
stopNetworkScan();
}
}
/*
@@ -270,14 +280,10 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidArgument) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidInterval1) {
serial = GetRandomSerialNumber();
RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
.geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
.channels = {1, 2}};
::android::hardware::radio::V1_2::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 4,
.specifiers = {specifier},
.specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
.maxSearchTime = 60,
.incrementalResults = false,
.incrementalResultsPeriodicity = 1};
@@ -307,14 +313,10 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidInterval1) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidInterval2) {
serial = GetRandomSerialNumber();
RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
.geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
.channels = {1, 2}};
::android::hardware::radio::V1_2::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 301,
.specifiers = {specifier},
.specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
.maxSearchTime = 60,
.incrementalResults = false,
.incrementalResultsPeriodicity = 1};
@@ -343,14 +345,10 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidInterval2) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidMaxSearchTime1) {
serial = GetRandomSerialNumber();
RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
.geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
.channels = {1, 2}};
::android::hardware::radio::V1_2::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
.specifiers = {specifier},
.specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
.maxSearchTime = 59,
.incrementalResults = false,
.incrementalResultsPeriodicity = 1};
@@ -379,14 +377,10 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidMaxSearchTime1) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidMaxSearchTime2) {
serial = GetRandomSerialNumber();
RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
.geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
.channels = {1, 2}};
::android::hardware::radio::V1_2::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
.specifiers = {specifier},
.specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
.maxSearchTime = 3601,
.incrementalResults = false,
.incrementalResultsPeriodicity = 1};
@@ -415,14 +409,10 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidMaxSearchTime2) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidPeriodicity1) {
serial = GetRandomSerialNumber();
RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
.geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
.channels = {1, 2}};
::android::hardware::radio::V1_2::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
.specifiers = {specifier},
.specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
.maxSearchTime = 600,
.incrementalResults = true,
.incrementalResultsPeriodicity = 0};
@@ -451,14 +441,10 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidPeriodicity1) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidPeriodicity2) {
serial = GetRandomSerialNumber();
RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
.geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
.channels = {1, 2}};
::android::hardware::radio::V1_2::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
.specifiers = {specifier},
.specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
.maxSearchTime = 600,
.incrementalResults = true,
.incrementalResultsPeriodicity = 11};
@@ -487,14 +473,10 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidPeriodicity2) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan_GoodRequest1) {
serial = GetRandomSerialNumber();
RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
.geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
.channels = {1, 2}};
::android::hardware::radio::V1_2::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
.specifiers = {specifier},
.specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
// Some vendor may not support max search time of 360s.
// This issue is tracked in b/112205669.
.maxSearchTime = 300,
@@ -518,6 +500,11 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_GoodRequest1) {
{RadioError::NONE, RadioError::INVALID_ARGUMENTS,
RadioError::REQUEST_NOT_SUPPORTED}));
}
if (radioRsp_v1_4->rspInfo.error == RadioError::NONE) {
ALOGI("Stop Network Scan");
stopNetworkScan();
}
}
/*
@@ -526,14 +513,10 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_GoodRequest1) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan_GoodRequest2) {
serial = GetRandomSerialNumber();
RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
.geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
.channels = {1, 2}};
::android::hardware::radio::V1_2::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
.specifiers = {specifier},
.specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
// Some vendor may not support max search time of 360s.
// This issue is tracked in b/112205669.
.maxSearchTime = 300,
@@ -559,6 +542,11 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_GoodRequest2) {
{RadioError::NONE, RadioError::INVALID_ARGUMENTS,
RadioError::REQUEST_NOT_SUPPORTED}));
}
if (radioRsp_v1_4->rspInfo.error == RadioError::NONE) {
ALOGI("Stop Network Scan");
stopNetworkScan();
}
}
/*

View File

@@ -107,3 +107,9 @@ void RadioHidlTest_v1_4::updateSimCardStatus() {
radio_v1_4->getIccCardStatus(serial);
EXPECT_EQ(std::cv_status::no_timeout, wait());
}
void RadioHidlTest_v1_4::stopNetworkScan() {
serial = GetRandomSerialNumber();
radio_v1_4->stopNetworkScan(serial);
EXPECT_EQ(std::cv_status::no_timeout, wait());
}

View File

@@ -721,7 +721,10 @@ class RadioHidlTest_v1_4 : public ::testing::TestWithParam<std::string> {
/* Update Sim Card Status */
void updateSimCardStatus();
public:
/* Stop Network Scan Command */
void stopNetworkScan();
public:
virtual void SetUp() override;
/* Used as a mechanism to inform the test about data/event callback */

View File

@@ -502,15 +502,21 @@ TEST_P(RadioHidlTest_v1_5, areUiccApplicationsEnabled) {
TEST_P(RadioHidlTest_v1_5, setSystemSelectionChannels_1_5) {
serial = GetRandomSerialNumber();
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
bandP900.geranBands() = {GeranBands::BAND_P900};
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
band850.geranBands() = {GeranBands::BAND_850};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
.bands = rasBands,
.bands = bandP900,
.channels = {1, 2}};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
.bands = band850,
.channels = {128, 129}};
Return<void> res = radio_v1_5->setSystemSelectionChannels_1_5(serial, true, {specifier});
Return<void> res =
radio_v1_5->setSystemSelectionChannels_1_5(serial, true, {specifierP900, specifier850});
ASSERT_OK(res);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_5->rspInfo.type);
@@ -523,7 +529,8 @@ TEST_P(RadioHidlTest_v1_5, setSystemSelectionChannels_1_5) {
if (radioRsp_v1_5->rspInfo.error == RadioError::NONE) {
serial = GetRandomSerialNumber();
Return<void> res = radio_v1_5->setSystemSelectionChannels_1_5(serial, false, {specifier});
Return<void> res = radio_v1_5->setSystemSelectionChannels_1_5(
serial, false, {specifierP900, specifier850});
ASSERT_OK(res);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_5->rspInfo.type);
@@ -540,18 +547,23 @@ TEST_P(RadioHidlTest_v1_5, setSystemSelectionChannels_1_5) {
TEST_P(RadioHidlTest_v1_5, startNetworkScan) {
serial = GetRandomSerialNumber();
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
bandP900.geranBands() = {GeranBands::BAND_P900};
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
band850.geranBands() = {GeranBands::BAND_850};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
.bands = rasBands,
.bands = bandP900,
.channels = {1, 2}};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
.bands = band850,
.channels = {128, 129}};
::android::hardware::radio::V1_5::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
.specifiers = {specifier},
.specifiers = {specifierP900, specifier850},
.maxSearchTime = 60,
.incrementalResults = false,
.incrementalResultsPeriodicity = 1};
@@ -573,6 +585,11 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error,
{RadioError::NONE, RadioError::OPERATION_NOT_ALLOWED}));
}
if (radioRsp_v1_5->rspInfo.error == RadioError::NONE) {
ALOGI("Stop Network Scan");
stopNetworkScan();
}
}
/*
@@ -608,18 +625,23 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidArgument) {
TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidInterval1) {
serial = GetRandomSerialNumber();
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
bandP900.geranBands() = {GeranBands::BAND_P900};
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
band850.geranBands() = {GeranBands::BAND_850};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
.bands = rasBands,
.bands = bandP900,
.channels = {1, 2}};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
.bands = band850,
.channels = {128, 129}};
::android::hardware::radio::V1_5::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 4,
.specifiers = {specifier},
.specifiers = {specifierP900, specifier850},
.maxSearchTime = 60,
.incrementalResults = false,
.incrementalResultsPeriodicity = 1};
@@ -647,18 +669,23 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidInterval1) {
TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidInterval2) {
serial = GetRandomSerialNumber();
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
bandP900.geranBands() = {GeranBands::BAND_P900};
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
band850.geranBands() = {GeranBands::BAND_850};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
.bands = rasBands,
.bands = bandP900,
.channels = {1, 2}};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
.bands = band850,
.channels = {128, 129}};
::android::hardware::radio::V1_5::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 301,
.specifiers = {specifier},
.specifiers = {specifierP900, specifier850},
.maxSearchTime = 60,
.incrementalResults = false,
.incrementalResultsPeriodicity = 1};
@@ -686,18 +713,23 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidInterval2) {
TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidMaxSearchTime1) {
serial = GetRandomSerialNumber();
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
bandP900.geranBands() = {GeranBands::BAND_P900};
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
band850.geranBands() = {GeranBands::BAND_850};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
.bands = rasBands,
.bands = bandP900,
.channels = {1, 2}};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
.bands = band850,
.channels = {128, 129}};
::android::hardware::radio::V1_5::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
.specifiers = {specifier},
.specifiers = {specifierP900, specifier850},
.maxSearchTime = 59,
.incrementalResults = false,
.incrementalResultsPeriodicity = 1};
@@ -725,18 +757,23 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidMaxSearchTime1) {
TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidMaxSearchTime2) {
serial = GetRandomSerialNumber();
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
bandP900.geranBands() = {GeranBands::BAND_P900};
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
band850.geranBands() = {GeranBands::BAND_850};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
.bands = rasBands,
.bands = bandP900,
.channels = {1, 2}};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
.bands = band850,
.channels = {128, 129}};
::android::hardware::radio::V1_5::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
.specifiers = {specifier},
.specifiers = {specifierP900, specifier850},
.maxSearchTime = 3601,
.incrementalResults = false,
.incrementalResultsPeriodicity = 1};
@@ -764,18 +801,23 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidMaxSearchTime2) {
TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidPeriodicity1) {
serial = GetRandomSerialNumber();
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
bandP900.geranBands() = {GeranBands::BAND_P900};
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
band850.geranBands() = {GeranBands::BAND_850};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
.bands = rasBands,
.bands = bandP900,
.channels = {1, 2}};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
.bands = band850,
.channels = {128, 129}};
::android::hardware::radio::V1_5::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
.specifiers = {specifier},
.specifiers = {specifierP900, specifier850},
.maxSearchTime = 600,
.incrementalResults = true,
.incrementalResultsPeriodicity = 0};
@@ -803,18 +845,23 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidPeriodicity1) {
TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidPeriodicity2) {
serial = GetRandomSerialNumber();
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
bandP900.geranBands() = {GeranBands::BAND_P900};
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
band850.geranBands() = {GeranBands::BAND_850};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
.bands = rasBands,
.bands = bandP900,
.channels = {1, 2}};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
.bands = band850,
.channels = {128, 129}};
::android::hardware::radio::V1_5::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
.specifiers = {specifier},
.specifiers = {specifierP900, specifier850},
.maxSearchTime = 600,
.incrementalResults = true,
.incrementalResultsPeriodicity = 11};
@@ -842,18 +889,23 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidPeriodicity2) {
TEST_P(RadioHidlTest_v1_5, startNetworkScan_GoodRequest1) {
serial = GetRandomSerialNumber();
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
bandP900.geranBands() = {GeranBands::BAND_P900};
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
band850.geranBands() = {GeranBands::BAND_850};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
.bands = rasBands,
.bands = bandP900,
.channels = {1, 2}};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
.bands = band850,
.channels = {128, 129}};
::android::hardware::radio::V1_5::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
.specifiers = {specifier},
.specifiers = {specifierP900, specifier850},
.maxSearchTime = 360,
.incrementalResults = false,
.incrementalResultsPeriodicity = 10};
@@ -873,6 +925,11 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan_GoodRequest1) {
{RadioError::NONE, RadioError::INVALID_ARGUMENTS,
RadioError::REQUEST_NOT_SUPPORTED}));
}
if (radioRsp_v1_5->rspInfo.error == RadioError::NONE) {
ALOGI("Stop Network Scan");
stopNetworkScan();
}
}
/*
@@ -881,18 +938,23 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan_GoodRequest1) {
TEST_P(RadioHidlTest_v1_5, startNetworkScan_GoodRequest2) {
serial = GetRandomSerialNumber();
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
bandP900.geranBands() = {GeranBands::BAND_P900};
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
band850.geranBands() = {GeranBands::BAND_850};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
.bands = rasBands,
.bands = bandP900,
.channels = {1, 2}};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
.bands = band850,
.channels = {128, 129}};
::android::hardware::radio::V1_5::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
.specifiers = {specifier},
.specifiers = {specifierP900, specifier850},
.maxSearchTime = 360,
.incrementalResults = false,
.incrementalResultsPeriodicity = 10,
@@ -913,6 +975,11 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan_GoodRequest2) {
{RadioError::NONE, RadioError::INVALID_ARGUMENTS,
RadioError::REQUEST_NOT_SUPPORTED}));
}
if (radioRsp_v1_5->rspInfo.error == RadioError::NONE) {
ALOGI("Stop Network Scan");
stopNetworkScan();
}
}
/*

View File

@@ -78,3 +78,9 @@ void RadioHidlTest_v1_5::updateSimCardStatus() {
radio_v1_5->getIccCardStatus(serial);
EXPECT_EQ(std::cv_status::no_timeout, wait());
}
void RadioHidlTest_v1_5::stopNetworkScan() {
serial = GetRandomSerialNumber();
radio_v1_5->stopNetworkScan(serial);
EXPECT_EQ(std::cv_status::no_timeout, wait());
}

View File

@@ -831,6 +831,9 @@ class RadioHidlTest_v1_5 : public ::testing::TestWithParam<std::string> {
/* Update Sim Card Status */
void updateSimCardStatus();
/* Stop Network Scan Command */
void stopNetworkScan();
public:
virtual void SetUp() override;