Merge "Update VTS tests to use GeranBands P900 and 850 instead" into rvc-dev
This commit is contained in:
commit
dabaad71f7
6 changed files with 180 additions and 107 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -503,15 +503,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);
|
||||
|
@ -524,7 +530,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);
|
||||
|
@ -541,18 +548,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};
|
||||
|
@ -574,6 +586,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();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -609,18 +626,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};
|
||||
|
@ -648,18 +670,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};
|
||||
|
@ -687,18 +714,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};
|
||||
|
@ -726,18 +758,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};
|
||||
|
@ -765,18 +802,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};
|
||||
|
@ -804,18 +846,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};
|
||||
|
@ -843,18 +890,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};
|
||||
|
@ -874,6 +926,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();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -882,18 +939,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,
|
||||
|
@ -914,6 +976,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();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue