From beb15ccb086e4dabe77515da6c1a46e59454ce60 Mon Sep 17 00:00:00 2001 From: Nathan Harold Date: Mon, 20 May 2019 14:08:34 -0700 Subject: [PATCH 1/2] Allow impls to ignore incremental scan interval When incremental results are disabled for network scans, update the API documentation to allow implementations to ignore range checking for the incremental scan interval. Bug: 112486807 Test: compilation - docstring-only change Merged-In: I901335550b4b8c2cf75f91b39fd031f03ffae982 Change-Id: I901335550b4b8c2cf75f91b39fd031f03ffae982 (cherry picked from commit 944efca78d9717e1b17109b28c0da26a4cd9f790) --- current.txt | 1 + radio/1.2/types.hal | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/current.txt b/current.txt index 7a9e47d6a0..f4aa57ebd5 100644 --- a/current.txt +++ b/current.txt @@ -405,6 +405,7 @@ eb754b58c93e5591613208b4c972811288b0fa16a82430d602f107c91a908b22 android.hardwar ed9da80ec0c96991fd03f0a46107815d0e50f764656e49dba4980fa5c31d5bc3 android.hardware.radio@1.0::types 1d19720d4fd38b1095f0f555a4bd92b3b12c9b1d0f560b0e9a474cd6dcc20db6 android.hardware.radio@1.2::IRadio cd1757867a5e3a3faa362e785239515870d1a3c9ce756c6f0cf0f0fd8aac2547 android.hardware.radio@1.2::types +722b3595548ed7f1953b6e0143dc842d4d6e290ff009a134eb518d7c17a09347 android.hardware.radio@1.2::types # b/112486807 e78cf871f9fd1c072874e481e06e18e2681763cf2aa38c1fd777d53bab4eb69b android.hardware.sensors@1.0::types 1722ad002317b1fae1400de709e90f442d94ef22864e05f7a12af48c32e8edc8 android.hardware.usb@1.1::types 29c8da7a13c40d488f569c812441d5754ee45bdcdb8ce6564f524b708d10a057 android.hardware.vibrator@1.1::types diff --git a/radio/1.2/types.hal b/radio/1.2/types.hal index 2dceeb158d..dffebd3e42 100644 --- a/radio/1.2/types.hal +++ b/radio/1.2/types.hal @@ -193,7 +193,8 @@ struct NetworkScanRequest { * the client (in seconds). * Expected range for the input is * [IncrementalResultsPeriodicityRange:MIN - IncrementalResultsPeriodicityRange:MAX] - * This value must be less than or equal to maxSearchTime. + * This value must be less than or equal to maxSearchTime. If incremental results are + * not requested, implementations may ignore this value. */ int32_t incrementalResultsPeriodicity; From 81c811b895e2abb019598c77b9c73fc5c4770e23 Mon Sep 17 00:00:00 2001 From: Nathan Harold Date: Mon, 20 May 2019 14:12:27 -0700 Subject: [PATCH 2/2] Enable incremental scans for interval checks Currently tests that check for incremental scan interval range-checking have incremental scans disabled. This CL turns on incremental scans for tests where the invalid interval range checks are being validated. Bug: 112486807 Test: atest RadioHidlTest_v1_2#startNetworkScan_InvalidPeriodicity1; atest RadioHidlTest_v1_2#startNetworkScan_InvalidPeriodicity2; Merged-In: I94874f538d2df70a72913b489d9298f8d1cf9b56 Change-Id: I94874f538d2df70a72913b489d9298f8d1cf9b56 (cherry picked from commit f56b9a41dd68e0d3cc7d2a506b26ce7d0fac2a12) --- radio/1.2/vts/functional/radio_hidl_hal_api.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radio/1.2/vts/functional/radio_hidl_hal_api.cpp b/radio/1.2/vts/functional/radio_hidl_hal_api.cpp index a3073acca3..63d3187aed 100644 --- a/radio/1.2/vts/functional/radio_hidl_hal_api.cpp +++ b/radio/1.2/vts/functional/radio_hidl_hal_api.cpp @@ -228,7 +228,7 @@ TEST_F(RadioHidlTest_v1_2, startNetworkScan_InvalidPeriodicity1) { .interval = 60, .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850}, .maxSearchTime = 600, - .incrementalResults = false, + .incrementalResults = true, .incrementalResultsPeriodicity = 0}; Return res = radio_v1_2->startNetworkScan_1_2(serial, request); @@ -260,7 +260,7 @@ TEST_F(RadioHidlTest_v1_2, startNetworkScan_InvalidPeriodicity2) { .interval = 60, .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850}, .maxSearchTime = 600, - .incrementalResults = false, + .incrementalResults = true, .incrementalResultsPeriodicity = 11}; Return res = radio_v1_2->startNetworkScan_1_2(serial, request);