From 6894f89fd88dab3b56531c06e8f5d2ae0316f47f Mon Sep 17 00:00:00 2001 From: Rambo Wang Date: Wed, 5 Feb 2020 21:31:53 -0800 Subject: [PATCH] Add CellIdentity to getBarringInfoResponse Add CellIdentity to getBarringInfoResponse to make the req/resp method match the existing indication. The CellIdentity is used to prevent races where barring is attributed to the wrong cell based on the timing of separate polled or unsolicited inputs to the framework. Because the CellIdentity is already in IRadioIndication the information to provide CID with BarringInfo is already present and available. This just makes the unsol and the polled APIs match. Matching indication is IRadioIndication@1.5::barringInfoChanged Bug: 148992393 Test: make && VtsHalRadioV1_5TargetTest Change-Id: I74e6ab9ca9e0dd49846af774fd73773ff3737df7 --- current.txt | 2 +- radio/1.5/IRadioResponse.hal | 5 ++++- radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h | 1 + radio/1.5/vts/functional/radio_response.cpp | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/current.txt b/current.txt index 9765f81f42..2faeab2aaf 100644 --- a/current.txt +++ b/current.txt @@ -685,7 +685,7 @@ def77c7db95d374f11a111bfc4ed60f92451303642a43276c4e291988fcee625 android.hardwar e1d34b83188a8ef3c507ec53c0ebcf714863c746da7f4a05460453f7c4c09389 android.hardware.radio@1.5::types 8062d0a1a03594dd8b448adcf6f08856b5720f7e33f9b785a21d3ef74a4f211d android.hardware.radio@1.5::IRadio e96ae1c3a9c0689002ec2318e9c587f4f607c16a75a3cd38788b77eb91072021 android.hardware.radio@1.5::IRadioIndication -7f2439b48bda2961c6d629d0415eee66d519142cf9537f05e9d285153c70ca85 android.hardware.radio@1.5::IRadioResponse +c8a8e4c3998ebdf1c71ece2d3ecb033ae17798830bed4b30a53e5991aa219e3a android.hardware.radio@1.5::IRadioResponse dcc8872337f0135e81970e1d8d5fd7139160dc80e9be76f0ae05290fa7e472b8 android.hardware.radio.config@1.3::types a2977755bc5f1ef47f04b7f2400632efda6218e1515dba847da487145cfabc4f android.hardware.radio.config@1.3::IRadioConfig 742360c775313438b0f82256eac62fb5bbc76a6ae6f388573f3aa142fb2c1eea android.hardware.radio.config@1.3::IRadioConfigIndication diff --git a/radio/1.5/IRadioResponse.hal b/radio/1.5/IRadioResponse.hal index aa8b526ffa..543f9b59b2 100644 --- a/radio/1.5/IRadioResponse.hal +++ b/radio/1.5/IRadioResponse.hal @@ -20,6 +20,7 @@ import @1.0::RadioResponseInfo; import @1.0::SendSmsResult; import @1.4::IRadioResponse; import @1.5::BarringInfo; +import @1.5::CellIdentity; import @1.5::CellInfo; import @1.5::PersoSubstate; import @1.5::RegStateResult; @@ -165,6 +166,7 @@ interface IRadioResponse extends @1.4::IRadioResponse { /** * @param info Response info struct containing response type, serial no. and error + * @param cellIdentity CellIdentity for the barring infos. * @param barringInfos a vector of barring info for all barring service types * * Valid errors returned: @@ -173,7 +175,8 @@ interface IRadioResponse extends @1.4::IRadioResponse { * RadioError:INTERNAL_ERR * RadioError:MODEM_ERR */ - oneway getBarringInfoResponse(RadioResponseInfo info, vec barringInfos); + oneway getBarringInfoResponse(RadioResponseInfo info, CellIdentity cellIdentity, + vec barringInfos); /** * @param info Response info struct containing response type, serial no. and error 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 ce7b1ab8e7..6f65cbbdf2 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 @@ -556,6 +556,7 @@ class RadioResponse_v1_5 : public ::android::hardware::radio::V1_5::IRadioRespon Return getBarringInfoResponse( const RadioResponseInfo& info, + const ::android::hardware::radio::V1_5::CellIdentity& cellIdentity, const ::android::hardware::hidl_vec<::android::hardware::radio::V1_5::BarringInfo>& barringInfos); diff --git a/radio/1.5/vts/functional/radio_response.cpp b/radio/1.5/vts/functional/radio_response.cpp index 26401eb800..17b294bbcd 100644 --- a/radio/1.5/vts/functional/radio_response.cpp +++ b/radio/1.5/vts/functional/radio_response.cpp @@ -963,6 +963,7 @@ Return RadioResponse_v1_5::setIndicationFilterResponse_1_5(const RadioResp Return RadioResponse_v1_5::getBarringInfoResponse( const RadioResponseInfo& info, + const ::android::hardware::radio::V1_5::CellIdentity& /*cellIdentity*/, const ::android::hardware::hidl_vec<::android::hardware::radio::V1_5::BarringInfo>& /*barringInfos*/) { rspInfo = info;