Used LTE bands for network scan am: 87abf6a366

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

Change-Id: I3ea47624d9b8a83512622665e40ce84504e8efcd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jack Yu 2023-03-17 03:32:18 +00:00 committed by Automerger Merge Worker
commit 708539cec7
2 changed files with 25 additions and 27 deletions

View file

@ -564,23 +564,23 @@ TEST_P(RadioHidlTest_v1_5, setSystemSelectionChannels_1_5) {
TEST_P(RadioHidlTest_v1_5, startNetworkScan) {
serial = GetRandomSerialNumber();
::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 = bandP900,
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band17;
band17.eutranBands() = {::android::hardware::radio::V1_5::EutranBands::BAND_17};
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band20;
band20.eutranBands() = {::android::hardware::radio::V1_5::EutranBands::BAND_20};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier17 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::EUTRAN,
.bands = band17,
.channels = {1, 2}};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
.bands = band850,
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier20 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::EUTRAN,
.bands = band20,
.channels = {128, 129}};
::android::hardware::radio::V1_5::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
.specifiers = {specifierP900, specifier850},
.specifiers = {specifier17, specifier20},
.maxSearchTime = 60,
.incrementalResults = false,
.incrementalResultsPeriodicity = 1};
@ -595,7 +595,7 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan) {
if (cardStatus.base.base.base.cardState == CardState::ABSENT) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error, {RadioError::SIM_ABSENT}));
} else if (cardStatus.base.base.base.cardState == CardState::PRESENT) {
// Modems have "GSM" rat scan need to
// Modems support 3GPP RAT family need to
// support scanning requests combined with some parameters.
if (deviceSupportsFeature(FEATURE_TELEPHONY_GSM)) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error,

View file

@ -829,20 +829,20 @@ TEST_P(RadioNetworkTest, setSystemSelectionChannels) {
TEST_P(RadioNetworkTest, startNetworkScan) {
serial = GetRandomSerialNumber();
RadioAccessSpecifierBands bandP900 =
RadioAccessSpecifierBands::make<RadioAccessSpecifierBands::geranBands>(
{GeranBands::BAND_P900});
RadioAccessSpecifierBands band850 =
RadioAccessSpecifierBands::make<RadioAccessSpecifierBands::geranBands>(
{GeranBands::BAND_850});
RadioAccessSpecifier specifierP900 = {
.accessNetwork = AccessNetwork::GERAN, .bands = bandP900, .channels = {1, 2}};
RadioAccessSpecifier specifier850 = {
.accessNetwork = AccessNetwork::GERAN, .bands = band850, .channels = {128, 129}};
RadioAccessSpecifierBands band17 =
RadioAccessSpecifierBands::make<RadioAccessSpecifierBands::eutranBands>(
{EutranBands::BAND_17});
RadioAccessSpecifierBands band20 =
RadioAccessSpecifierBands::make<RadioAccessSpecifierBands::eutranBands>(
{EutranBands::BAND_20});
RadioAccessSpecifier specifier17 = {
.accessNetwork = AccessNetwork::EUTRAN, .bands = band17, .channels = {1, 2}};
RadioAccessSpecifier specifier20 = {
.accessNetwork = AccessNetwork::EUTRAN, .bands = band20, .channels = {128, 129}};
NetworkScanRequest request = {.type = NetworkScanRequest::SCAN_TYPE_ONE_SHOT,
.interval = 60,
.specifiers = {specifierP900, specifier850},
.specifiers = {specifier17, specifier20},
.maxSearchTime = 60,
.incrementalResults = false,
.incrementalResultsPeriodicity = 1};
@ -858,11 +858,9 @@ TEST_P(RadioNetworkTest, startNetworkScan) {
if (cardStatus.cardState == CardStatus::STATE_ABSENT) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error, {RadioError::SIM_ABSENT}));
} else if (cardStatus.cardState == CardStatus::STATE_PRESENT) {
// OPERATION_NOT_ALLOWED should not be allowed; however, some vendors do
// not support the required manual GSM search functionality. This is
// tracked in b/112206766. Modems have "GSM" rat scan need to
// support scanning requests combined with some parameters.
if (deviceSupportsFeature(FEATURE_TELEPHONY_GSM)) {
// Modems support 3GPP RAT family need to
// support scanning requests combined with some parameters.
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
{RadioError::NONE, RadioError::OPERATION_NOT_ALLOWED}));
} else {