Merge "Create IRadio 1.6 folder, empty files and VTS framework"
diff --git a/audio/core/all-versions/default/Android.bp b/audio/core/all-versions/default/Android.bp
index 0af81b2..8fdb70d 100644
--- a/audio/core/all-versions/default/Android.bp
+++ b/audio/core/all-versions/default/Android.bp
@@ -1,8 +1,5 @@
-cc_defaults {
- name: "android.hardware.audio-impl_default",
- relative_install_path: "hw",
- proprietary: true,
- vendor: true,
+filegroup {
+ name: "android.hardware.audio-impl_srcs",
srcs: [
"Conversions.cpp",
"Device.cpp",
@@ -13,11 +10,24 @@
"StreamIn.cpp",
"StreamOut.cpp",
],
+}
+
+cc_library_headers {
+ name: "android.hardware.audio-impl_headers",
+ proprietary: true,
+ vendor: true,
+ export_include_dirs: ["include"],
+}
+
+cc_defaults {
+ name: "android.hardware.audio-impl_default",
+ relative_install_path: "hw",
+ proprietary: true,
+ vendor: true,
+ srcs: [":android.hardware.audio-impl_srcs"],
defaults: ["hidl_defaults"],
- export_include_dirs: ["include"],
-
static_libs: [
"libaudiofoundation",
],
@@ -35,12 +45,17 @@
],
header_libs: [
+ "android.hardware.audio-impl_headers",
"android.hardware.audio.common.util@all-versions",
"libaudioclient_headers",
"libaudio_system_headers",
"libhardware_headers",
"libmedia_headers",
],
+
+ export_header_lib_headers: [
+ "android.hardware.audio-impl_headers",
+ ],
}
cc_library_shared {
@@ -89,8 +104,8 @@
],
}
-cc_library_shared {
- name: "android.hardware.audio@6.0-impl",
+cc_defaults {
+ name: "android.hardware.audio@6.0-impl_default",
defaults: ["android.hardware.audio-impl_default"],
shared_libs: [
"android.hardware.audio@6.0",
@@ -103,3 +118,8 @@
"-include common/all-versions/VersionMacro.h",
],
}
+
+cc_library_shared {
+ name: "android.hardware.audio@6.0-impl",
+ defaults: ["android.hardware.audio@6.0-impl_default"],
+}
diff --git a/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h b/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h
index af6e9e8..8e6be89 100644
--- a/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h
+++ b/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h
@@ -329,6 +329,9 @@
INSTANTIATE_TEST_CASE_P(AudioHidl, AudioPolicyConfigTest,
::testing::ValuesIn(getDeviceParametersForFactoryTests()),
&DeviceParameterToString);
+// When the VTS test runs on a device lacking the corresponding HAL version the parameter
+// list is empty, this isn't a problem.
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AudioPolicyConfigTest);
//////////////////////////////////////////////////////////////////////////////
////////////////////// getService audio_devices_factory //////////////////////
@@ -364,6 +367,9 @@
INSTANTIATE_TEST_CASE_P(AudioHidl, AudioHidlTest,
::testing::ValuesIn(getDeviceParametersForFactoryTests()),
&DeviceParameterToString);
+// When the VTS test runs on a device lacking the corresponding HAL version the parameter
+// list is empty, this isn't a problem.
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AudioHidlTest);
//////////////////////////////////////////////////////////////////////////////
/////////////////////////////// openDevice ///////////////////////////////////
@@ -389,6 +395,9 @@
INSTANTIATE_TEST_CASE_P(AudioHidlDevice, AudioHidlDeviceTest,
::testing::ValuesIn(getDeviceParameters()), &DeviceParameterToString);
+// When the VTS test runs on a device lacking the corresponding HAL version the parameter
+// list is empty, this isn't a problem.
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AudioHidlDeviceTest);
//////////////////////////////////////////////////////////////////////////////
/////////////////////////////// openDevice primary ///////////////////////////
@@ -415,6 +424,9 @@
INSTANTIATE_TEST_CASE_P(AudioPrimaryHidl, AudioPrimaryHidlTest,
::testing::ValuesIn(getDeviceParametersForPrimaryDeviceTests()),
&DeviceParameterToString);
+// When the VTS test runs on a device lacking the corresponding HAL version the parameter
+// list is empty, this isn't a problem.
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AudioPrimaryHidlTest);
//////////////////////////////////////////////////////////////////////////////
///////////////////// {set,get}{Master,Mic}{Mute,Volume} /////////////////////
@@ -503,6 +515,10 @@
INSTANTIATE_TEST_CASE_P(BoolAccessorPrimaryHidl, BoolAccessorPrimaryHidlTest,
::testing::ValuesIn(getDeviceParametersForPrimaryDeviceTests()),
&DeviceParameterToString);
+// When the VTS test runs on a device lacking the corresponding HAL version the parameter
+// list is empty, this isn't a problem.
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(BoolAccessorHidlTest);
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(BoolAccessorPrimaryHidlTest);
using FloatAccessorHidlTest = AccessorHidlTest<float>;
TEST_P(FloatAccessorHidlTest, MasterVolumeTest) {
@@ -515,6 +531,9 @@
INSTANTIATE_TEST_CASE_P(FloatAccessorHidl, FloatAccessorHidlTest,
::testing::ValuesIn(getDeviceParameters()), &DeviceParameterToString);
+// When the VTS test runs on a device lacking the corresponding HAL version the parameter
+// list is empty, this isn't a problem.
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(FloatAccessorHidlTest);
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////// AudioPatches ////////////////////////////////
@@ -537,6 +556,9 @@
INSTANTIATE_TEST_CASE_P(AudioPatchHidl, AudioPatchHidlTest,
::testing::ValuesIn(getDeviceParameters()), &DeviceParameterToString);
+// When the VTS test runs on a device lacking the corresponding HAL version the parameter
+// list is empty, this isn't a problem.
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AudioPatchHidlTest);
// Nesting a tuple in another tuple allows to use GTest Combine function to generate
// all combinations of devices and configs.
@@ -707,11 +729,15 @@
::testing::ValuesIn(ConfigHelper::getRecommendedSupportCaptureAudioConfig()),
::testing::Values(AudioInputFlag::NONE)),
&DeviceConfigParameterToString);
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(OptionalInputBufferSizeTest);
#elif MAJOR_VERSION >= 6
INSTANTIATE_TEST_CASE_P(SupportedInputBufferSize, RequiredInputBufferSizeTest,
::testing::ValuesIn(getInputDeviceConfigParameters()),
&DeviceConfigParameterToString);
#endif
+// When the VTS test runs on a device lacking the corresponding HAL version the parameter
+// list is empty, this isn't a problem.
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(RequiredInputBufferSizeTest);
//////////////////////////////////////////////////////////////////////////////
/////////////////////////////// setScreenState ///////////////////////////////
@@ -945,6 +971,9 @@
::testing::ValuesIn(getOutputDeviceConfigParameters()),
&DeviceConfigParameterToString);
#endif
+// When the VTS test runs on a device lacking the corresponding HAL version the parameter
+// list is empty, this isn't a problem.
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(OutputStreamTest);
////////////////////////////// openInputStream //////////////////////////////
@@ -1000,6 +1029,9 @@
::testing::ValuesIn(getInputDeviceConfigParameters()),
&DeviceConfigParameterToString);
#endif
+// When the VTS test runs on a device lacking the corresponding HAL version the parameter
+// list is empty, this isn't a problem.
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(InputStreamTest);
//////////////////////////////////////////////////////////////////////////////
////////////////////////////// IStream getters ///////////////////////////////
@@ -1538,6 +1570,9 @@
INSTANTIATE_TEST_CASE_P(TtyModeAccessorPrimaryHidl, TtyModeAccessorPrimaryHidlTest,
::testing::ValuesIn(getDeviceParametersForPrimaryDeviceTests()),
&DeviceParameterToString);
+// When the VTS test runs on a device lacking the corresponding HAL version the parameter
+// list is empty, this isn't a problem.
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(TtyModeAccessorPrimaryHidlTest);
TEST_P(BoolAccessorPrimaryHidlTest, setGetHac) {
doc::test("Query and set the HAC state");
diff --git a/audio/effect/all-versions/vts/functional/VtsHalAudioEffectTargetTest.cpp b/audio/effect/all-versions/vts/functional/VtsHalAudioEffectTargetTest.cpp
index 070242f..4787c09 100644
--- a/audio/effect/all-versions/vts/functional/VtsHalAudioEffectTargetTest.cpp
+++ b/audio/effect/all-versions/vts/functional/VtsHalAudioEffectTargetTest.cpp
@@ -845,3 +845,9 @@
IEffectsFactory::descriptor)),
::testing::Values(LOUDNESS_ENHANCER_EFFECT_TYPE)),
EffectParameterToString);
+// When the VTS test runs on a device lacking the corresponding HAL version the parameter
+// list is empty, this isn't a problem.
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AudioEffectsFactoryHidlTest);
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AudioEffectHidlTest);
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(EqualizerAudioEffectHidlTest);
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(LoudnessEnhancerAudioEffectHidlTest);
diff --git a/current.txt b/current.txt
index bdbad8a..d774dba 100644
--- a/current.txt
+++ b/current.txt
@@ -652,6 +652,8 @@
# ABI preserving changes to HALs during Android S
cd84ab19c590e0e73dd2307b591a3093ee18147ef95e6d5418644463a6620076 android.hardware.neuralnetworks@1.2::IDevice
+9625e85f56515ad2cf87b6a1847906db669f746ea4ab02cd3d4ca25abc9b0109 android.hardware.neuralnetworks@1.2::types
+9e758e208d14f7256e0885d6d8ad0b61121b21d8c313864f981727ae55bffd16 android.hardware.neuralnetworks@1.3::types
38d65fb20c60a5b823298560fc0825457ecdc49603a4b4e94bf81511790737da android.hardware.radio@1.4::types
954c334efd80e8869b66d1ce5fe2755712d96ba4b3c38d415739c330af5fb4cb android.hardware.radio@1.5::types
diff --git a/neuralnetworks/1.2/types.hal b/neuralnetworks/1.2/types.hal
index 92cf2aa..7441a54 100644
--- a/neuralnetworks/1.2/types.hal
+++ b/neuralnetworks/1.2/types.hal
@@ -4853,15 +4853,18 @@
/**
* Quantized scale of the operand.
*
- * Only applicable if the operand is of type TENSOR_QUANT8_ASYMM or
- * TENSOR_INT32.
+ * Must be 0 when not applicable to an operand type.
+ *
+ * See {@link OperandType}.
*/
float scale;
/**
* Quantized zero-point offset of the operand.
*
- * Only applicable if the operand is of type TENSOR_QUANT8_ASYMM.
+ * Must be 0 when not applicable to an operand type.
+ *
+ * See {@link OperandType}.
*/
int32_t zeroPoint;
diff --git a/neuralnetworks/1.2/types.t b/neuralnetworks/1.2/types.t
index d197f6b..21d88ac 100644
--- a/neuralnetworks/1.2/types.t
+++ b/neuralnetworks/1.2/types.t
@@ -251,15 +251,18 @@
/**
* Quantized scale of the operand.
*
- * Only applicable if the operand is of type TENSOR_QUANT8_ASYMM or
- * TENSOR_INT32.
+ * Must be 0 when not applicable to an operand type.
+ *
+ * See {@link OperandType}.
*/
float scale;
/**
* Quantized zero-point offset of the operand.
*
- * Only applicable if the operand is of type TENSOR_QUANT8_ASYMM.
+ * Must be 0 when not applicable to an operand type.
+ *
+ * See {@link OperandType}.
*/
int32_t zeroPoint;
diff --git a/neuralnetworks/1.3/types.hal b/neuralnetworks/1.3/types.hal
index 3b2b14c..5f5ee03 100644
--- a/neuralnetworks/1.3/types.hal
+++ b/neuralnetworks/1.3/types.hal
@@ -5103,8 +5103,8 @@
* signature of this operation. That is, if the operation has (3 + n) inputs
* and m outputs, both subgraphs must have n inputs and m outputs with the same
* types, ranks, dimensions, scales,
- * zeroPoints, and extraParams as the corresponding operation inputs and
- * outputs.
+ * zeroPoints, and extraParams as the corresponding operation
+ * inputs and outputs.
* All of the operands mentioned must have fully specified dimensions.
*
* Inputs:
@@ -5170,15 +5170,15 @@
* * 0: A {@link OperandType::SUBGRAPH} reference to the condition
* subgraph. The subgraph must have (m + k + n) inputs with
* the same types, ranks, dimensions,
- * scales, zeroPoints, and extraParams as the corresponding inputs of
- * the WHILE operation and exactly one output of
- * {@link OperandType::TENSOR_BOOL8} and shape [1].
+ * scales, zeroPoints, and extraParams as the
+ * corresponding inputs of the WHILE operation and exactly one output
+ * of {@link OperandType::TENSOR_BOOL8} and shape [1].
* All of the operands mentioned must have fully specified dimensions.
* * 1: A {@link OperandType::SUBGRAPH} reference to the body subgraph.
* The subgraph must have (m + k + n) inputs and (m + k) outputs with
* the same types, ranks, dimensions,
- * scales, zeroPoints, and extraParams as the corresponding inputs and
- * outputs of the WHILE operation.
+ * scales, zeroPoints, and extraParams as the
+ * corresponding inputs and outputs of the WHILE operation.
* All of the operands mentioned must have fully specified dimensions.
* * (m inputs): Initial values for input-output operands.
* * (k inputs): Initial values for state-only operands.
@@ -5538,15 +5538,18 @@
/**
* Quantized scale of the operand.
*
- * Only applicable if the operand is of type TENSOR_QUANT8_ASYMM or
- * TENSOR_INT32.
+ * Must be 0 when not applicable to an operand type.
+ *
+ * See {@link OperandType}.
*/
float scale;
/**
* Quantized zero-point offset of the operand.
*
- * Only applicable if the operand is of type TENSOR_QUANT8_ASYMM.
+ * Must be 0 when not applicable to an operand type.
+ *
+ * See {@link OperandType}.
*/
int32_t zeroPoint;
@@ -5740,8 +5743,8 @@
* Input data and information to be used in the execution of a prepared
* model.
*
- * The index of the input corresponds to the index in Model.inputIndexes.
- * E.g., input[i] corresponds to Model.inputIndexes[i].
+ * The index of the input corresponds to the index in Model.main.inputIndexes.
+ * E.g., input[i] corresponds to Model.main.inputIndexes[i].
*/
vec<RequestArgument> inputs;
@@ -5749,8 +5752,8 @@
* Output data and information to be used in the execution of a prepared
* model.
*
- * The index of the output corresponds to the index in Model.outputIndexes.
- * E.g., output[i] corresponds to Model.outputIndexes[i].
+ * The index of the output corresponds to the index in Model.main.outputIndexes.
+ * E.g., output[i] corresponds to Model.main.outputIndexes[i].
*/
vec<RequestArgument> outputs;
diff --git a/neuralnetworks/1.3/types.t b/neuralnetworks/1.3/types.t
index 7220e37..2901d18 100644
--- a/neuralnetworks/1.3/types.t
+++ b/neuralnetworks/1.3/types.t
@@ -303,15 +303,18 @@
/**
* Quantized scale of the operand.
*
- * Only applicable if the operand is of type TENSOR_QUANT8_ASYMM or
- * TENSOR_INT32.
+ * Must be 0 when not applicable to an operand type.
+ *
+ * See {@link OperandType}.
*/
float scale;
/**
* Quantized zero-point offset of the operand.
*
- * Only applicable if the operand is of type TENSOR_QUANT8_ASYMM.
+ * Must be 0 when not applicable to an operand type.
+ *
+ * See {@link OperandType}.
*/
int32_t zeroPoint;
@@ -505,8 +508,8 @@
* Input data and information to be used in the execution of a prepared
* model.
*
- * The index of the input corresponds to the index in Model.inputIndexes.
- * E.g., input[i] corresponds to Model.inputIndexes[i].
+ * The index of the input corresponds to the index in Model.main.inputIndexes.
+ * E.g., input[i] corresponds to Model.main.inputIndexes[i].
*/
vec<RequestArgument> inputs;
@@ -514,8 +517,8 @@
* Output data and information to be used in the execution of a prepared
* model.
*
- * The index of the output corresponds to the index in Model.outputIndexes.
- * E.g., output[i] corresponds to Model.outputIndexes[i].
+ * The index of the output corresponds to the index in Model.main.outputIndexes.
+ * E.g., output[i] corresponds to Model.main.outputIndexes[i].
*/
vec<RequestArgument> outputs;
diff --git a/radio/1.4/vts/functional/radio_hidl_hal_api.cpp b/radio/1.4/vts/functional/radio_hidl_hal_api.cpp
index e4c0877..3ba9b9d 100644
--- a/radio/1.4/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.4/vts/functional/radio_hidl_hal_api.cpp
@@ -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, 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 @@
{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_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_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_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_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_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_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_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 @@
{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_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 @@
{RadioError::NONE, RadioError::INVALID_ARGUMENTS,
RadioError::REQUEST_NOT_SUPPORTED}));
}
+
+ if (radioRsp_v1_4->rspInfo.error == RadioError::NONE) {
+ ALOGI("Stop Network Scan");
+ stopNetworkScan();
+ }
}
/*
diff --git a/radio/1.4/vts/functional/radio_hidl_hal_test.cpp b/radio/1.4/vts/functional/radio_hidl_hal_test.cpp
index 15a0b24..4ac6cc9 100644
--- a/radio/1.4/vts/functional/radio_hidl_hal_test.cpp
+++ b/radio/1.4/vts/functional/radio_hidl_hal_test.cpp
@@ -107,3 +107,9 @@
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());
+}
diff --git a/radio/1.4/vts/functional/radio_hidl_hal_utils_v1_4.h b/radio/1.4/vts/functional/radio_hidl_hal_utils_v1_4.h
index 31b7e13..53a5845 100644
--- a/radio/1.4/vts/functional/radio_hidl_hal_utils_v1_4.h
+++ b/radio/1.4/vts/functional/radio_hidl_hal_utils_v1_4.h
@@ -721,7 +721,10 @@
/* 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 */
diff --git a/radio/1.5/vts/functional/radio_hidl_hal_api.cpp b/radio/1.5/vts/functional/radio_hidl_hal_api.cpp
index 4ab74ab..3cc5666 100644
--- a/radio/1.5/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.5/vts/functional/radio_hidl_hal_api.cpp
@@ -502,15 +502,21 @@
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 @@
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, 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 @@
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_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_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_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_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_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_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_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 @@
{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_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 @@
{RadioError::NONE, RadioError::INVALID_ARGUMENTS,
RadioError::REQUEST_NOT_SUPPORTED}));
}
+
+ if (radioRsp_v1_5->rspInfo.error == RadioError::NONE) {
+ ALOGI("Stop Network Scan");
+ stopNetworkScan();
+ }
}
/*
diff --git a/radio/1.5/vts/functional/radio_hidl_hal_test.cpp b/radio/1.5/vts/functional/radio_hidl_hal_test.cpp
index 7313de4..4155550 100644
--- a/radio/1.5/vts/functional/radio_hidl_hal_test.cpp
+++ b/radio/1.5/vts/functional/radio_hidl_hal_test.cpp
@@ -78,3 +78,9 @@
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());
+}
diff --git a/radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h b/radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h
index 6a369cc..87ce675 100644
--- a/radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h
+++ b/radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h
@@ -831,6 +831,9 @@
/* Update Sim Card Status */
void updateSimCardStatus();
+ /* Stop Network Scan Command */
+ void stopNetworkScan();
+
public:
virtual void SetUp() override;