Used LTE bands for network scan am: 87abf6a366 am: 708539cec7

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

Change-Id: Ibe3dce46ecca9218f8da31d62056eb09d89c2bd5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jack Yu 2023-03-17 04:11:14 +00:00 committed by Automerger Merge Worker
commit d4b2a2b91d
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) { TEST_P(RadioHidlTest_v1_5, startNetworkScan) {
serial = GetRandomSerialNumber(); serial = GetRandomSerialNumber();
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900; ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band17;
bandP900.geranBands() = {GeranBands::BAND_P900}; band17.eutranBands() = {::android::hardware::radio::V1_5::EutranBands::BAND_17};
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850; ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band20;
band850.geranBands() = {GeranBands::BAND_850}; band20.eutranBands() = {::android::hardware::radio::V1_5::EutranBands::BAND_20};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = { ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier17 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN, .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::EUTRAN,
.bands = bandP900, .bands = band17,
.channels = {1, 2}}; .channels = {1, 2}};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = { ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier20 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN, .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::EUTRAN,
.bands = band850, .bands = band20,
.channels = {128, 129}}; .channels = {128, 129}};
::android::hardware::radio::V1_5::NetworkScanRequest request = { ::android::hardware::radio::V1_5::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT, .type = ScanType::ONE_SHOT,
.interval = 60, .interval = 60,
.specifiers = {specifierP900, specifier850}, .specifiers = {specifier17, specifier20},
.maxSearchTime = 60, .maxSearchTime = 60,
.incrementalResults = false, .incrementalResults = false,
.incrementalResultsPeriodicity = 1}; .incrementalResultsPeriodicity = 1};
@ -595,7 +595,7 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan) {
if (cardStatus.base.base.base.cardState == CardState::ABSENT) { if (cardStatus.base.base.base.cardState == CardState::ABSENT) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error, {RadioError::SIM_ABSENT})); ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error, {RadioError::SIM_ABSENT}));
} else if (cardStatus.base.base.base.cardState == CardState::PRESENT) { } 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. // support scanning requests combined with some parameters.
if (deviceSupportsFeature(FEATURE_TELEPHONY_GSM)) { if (deviceSupportsFeature(FEATURE_TELEPHONY_GSM)) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error, ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error,

View file

@ -829,20 +829,20 @@ TEST_P(RadioNetworkTest, setSystemSelectionChannels) {
TEST_P(RadioNetworkTest, startNetworkScan) { TEST_P(RadioNetworkTest, startNetworkScan) {
serial = GetRandomSerialNumber(); serial = GetRandomSerialNumber();
RadioAccessSpecifierBands bandP900 = RadioAccessSpecifierBands band17 =
RadioAccessSpecifierBands::make<RadioAccessSpecifierBands::geranBands>( RadioAccessSpecifierBands::make<RadioAccessSpecifierBands::eutranBands>(
{GeranBands::BAND_P900}); {EutranBands::BAND_17});
RadioAccessSpecifierBands band850 = RadioAccessSpecifierBands band20 =
RadioAccessSpecifierBands::make<RadioAccessSpecifierBands::geranBands>( RadioAccessSpecifierBands::make<RadioAccessSpecifierBands::eutranBands>(
{GeranBands::BAND_850}); {EutranBands::BAND_20});
RadioAccessSpecifier specifierP900 = { RadioAccessSpecifier specifier17 = {
.accessNetwork = AccessNetwork::GERAN, .bands = bandP900, .channels = {1, 2}}; .accessNetwork = AccessNetwork::EUTRAN, .bands = band17, .channels = {1, 2}};
RadioAccessSpecifier specifier850 = { RadioAccessSpecifier specifier20 = {
.accessNetwork = AccessNetwork::GERAN, .bands = band850, .channels = {128, 129}}; .accessNetwork = AccessNetwork::EUTRAN, .bands = band20, .channels = {128, 129}};
NetworkScanRequest request = {.type = NetworkScanRequest::SCAN_TYPE_ONE_SHOT, NetworkScanRequest request = {.type = NetworkScanRequest::SCAN_TYPE_ONE_SHOT,
.interval = 60, .interval = 60,
.specifiers = {specifierP900, specifier850}, .specifiers = {specifier17, specifier20},
.maxSearchTime = 60, .maxSearchTime = 60,
.incrementalResults = false, .incrementalResults = false,
.incrementalResultsPeriodicity = 1}; .incrementalResultsPeriodicity = 1};
@ -858,11 +858,9 @@ TEST_P(RadioNetworkTest, startNetworkScan) {
if (cardStatus.cardState == CardStatus::STATE_ABSENT) { if (cardStatus.cardState == CardStatus::STATE_ABSENT) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error, {RadioError::SIM_ABSENT})); ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error, {RadioError::SIM_ABSENT}));
} else if (cardStatus.cardState == CardStatus::STATE_PRESENT) { } 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)) { 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, ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
{RadioError::NONE, RadioError::OPERATION_NOT_ALLOWED})); {RadioError::NONE, RadioError::OPERATION_NOT_ALLOWED}));
} else { } else {