summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot2018-04-22 02:28:49 -0500
committerandroid-build-team Robot2018-04-22 02:28:49 -0500
commitd89f95414fc715c0e89b4a5da47aa9bd277736a1 (patch)
tree3b4f0777b35824e0b89ea70d35a7dcf3eb1f8af9
parentcb0ee29e765a3f5076b90019f1c22636979ea2f4 (diff)
parent63abd8fdbc05ba5534141ae93816572e24b33289 (diff)
downloadplatform-hardware-interfaces-d89f95414fc715c0e89b4a5da47aa9bd277736a1.tar.gz
platform-hardware-interfaces-d89f95414fc715c0e89b4a5da47aa9bd277736a1.tar.xz
platform-hardware-interfaces-d89f95414fc715c0e89b4a5da47aa9bd277736a1.zip
Snap for 4736748 from 63abd8fdbc05ba5534141ae93816572e24b33289 to pi-release
Change-Id: Icd5ce28c284b6b7a8f1024158be663861bf10635
-rw-r--r--audio/core/2.0/default/Device.cpp2
-rw-r--r--audio/core/2.0/default/ParametersUtil.cpp1
-rw-r--r--audio/core/2.0/default/PrimaryDevice.cpp2
-rw-r--r--audio/core/2.0/default/Stream.cpp1
-rw-r--r--audio/core/2.0/default/StreamIn.cpp2
-rw-r--r--audio/core/2.0/default/StreamOut.cpp2
-rw-r--r--audio/core/2.0/default/include/core/2.0/default/Util.h26
-rw-r--r--audio/core/4.0/default/Device.cpp2
-rw-r--r--audio/core/4.0/default/ParametersUtil.cpp1
-rw-r--r--audio/core/4.0/default/PrimaryDevice.cpp2
-rw-r--r--audio/core/4.0/default/Stream.cpp1
-rw-r--r--audio/core/4.0/default/StreamIn.cpp2
-rw-r--r--audio/core/4.0/default/StreamOut.cpp2
-rw-r--r--audio/core/4.0/default/include/core/4.0/default/Util.h26
-rw-r--r--audio/core/all-versions/default/include/core/all-versions/default/Device.impl.h1
-rw-r--r--audio/core/all-versions/default/include/core/all-versions/default/ParametersUtil.impl.h21
-rw-r--r--audio/core/all-versions/default/include/core/all-versions/default/PrimaryDevice.impl.h4
-rw-r--r--audio/core/all-versions/default/include/core/all-versions/default/Stream.impl.h25
-rw-r--r--audio/core/all-versions/default/include/core/all-versions/default/StreamIn.impl.h2
-rw-r--r--audio/core/all-versions/default/include/core/all-versions/default/StreamOut.impl.h1
-rw-r--r--audio/core/all-versions/default/include/core/all-versions/default/Util.h49
-rw-r--r--automotive/vehicle/2.0/Android.bp2
-rw-r--r--camera/metadata/3.3/Android.bp1
-rw-r--r--neuralnetworks/1.0/vts/OWNERS4
-rw-r--r--neuralnetworks/1.1/Android.bp1
-rw-r--r--neuralnetworks/1.1/vts/OWNERS3
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_cell_broadcast.cpp12
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_data.cpp16
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_icc.cpp33
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_ims.cpp18
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_misc.cpp125
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_sms.cpp32
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_stk.cpp10
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_test.cpp23
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_utils_v1_0.h8
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_voice.cpp50
-rw-r--r--radio/1.0/vts/functional/radio_response.cpp256
-rw-r--r--radio/1.0/vts/functional/sap_callback.cpp16
-rw-r--r--radio/1.0/vts/functional/sap_hidl_hal_api.cpp16
-rw-r--r--radio/1.0/vts/functional/sap_hidl_hal_test.cpp6
-rw-r--r--radio/1.0/vts/functional/sap_hidl_hal_utils.h5
-rw-r--r--radio/1.1/vts/functional/radio_hidl_hal_api.cpp63
-rw-r--r--radio/1.1/vts/functional/radio_hidl_hal_test.cpp23
-rw-r--r--radio/1.1/vts/functional/radio_hidl_hal_utils_v1_1.h8
-rw-r--r--radio/1.1/vts/functional/radio_response.cpp14
-rw-r--r--radio/1.2/vts/functional/radio_hidl_hal_api.cpp46
-rw-r--r--radio/1.2/vts/functional/radio_hidl_hal_test.cpp21
-rw-r--r--radio/1.2/vts/functional/radio_hidl_hal_utils_v1_2.h8
-rw-r--r--radio/1.2/vts/functional/radio_response.cpp22
49 files changed, 589 insertions, 428 deletions
diff --git a/audio/core/2.0/default/Device.cpp b/audio/core/2.0/default/Device.cpp
index 221ea5c0..b67203d5 100644
--- a/audio/core/2.0/default/Device.cpp
+++ b/audio/core/2.0/default/Device.cpp
@@ -21,7 +21,7 @@
21#include "core/2.0/default/Conversions.h" 21#include "core/2.0/default/Conversions.h"
22#include "core/2.0/default/StreamIn.h" 22#include "core/2.0/default/StreamIn.h"
23#include "core/2.0/default/StreamOut.h" 23#include "core/2.0/default/StreamOut.h"
24#include "core/all-versions/default/Util.h" 24#include "core/2.0/default/Util.h"
25 25
26#define AUDIO_HAL_VERSION V2_0 26#define AUDIO_HAL_VERSION V2_0
27#include <core/all-versions/default/Device.impl.h> 27#include <core/all-versions/default/Device.impl.h>
diff --git a/audio/core/2.0/default/ParametersUtil.cpp b/audio/core/2.0/default/ParametersUtil.cpp
index 33a3ad9b..963e291d 100644
--- a/audio/core/2.0/default/ParametersUtil.cpp
+++ b/audio/core/2.0/default/ParametersUtil.cpp
@@ -15,6 +15,7 @@
15 */ 15 */
16 16
17#include "core/2.0/default/ParametersUtil.h" 17#include "core/2.0/default/ParametersUtil.h"
18#include "core/2.0/default/Util.h"
18 19
19#define AUDIO_HAL_VERSION V2_0 20#define AUDIO_HAL_VERSION V2_0
20#include <core/all-versions/default/ParametersUtil.impl.h> 21#include <core/all-versions/default/ParametersUtil.impl.h>
diff --git a/audio/core/2.0/default/PrimaryDevice.cpp b/audio/core/2.0/default/PrimaryDevice.cpp
index ce574038..decaa146 100644
--- a/audio/core/2.0/default/PrimaryDevice.cpp
+++ b/audio/core/2.0/default/PrimaryDevice.cpp
@@ -17,7 +17,7 @@
17#define LOG_TAG "PrimaryDeviceHAL" 17#define LOG_TAG "PrimaryDeviceHAL"
18 18
19#include "core/2.0/default/PrimaryDevice.h" 19#include "core/2.0/default/PrimaryDevice.h"
20#include "core/all-versions/default/Util.h" 20#include "core/2.0/default/Util.h"
21 21
22#define AUDIO_HAL_VERSION V2_0 22#define AUDIO_HAL_VERSION V2_0
23#include <core/all-versions/default/PrimaryDevice.impl.h> 23#include <core/all-versions/default/PrimaryDevice.impl.h>
diff --git a/audio/core/2.0/default/Stream.cpp b/audio/core/2.0/default/Stream.cpp
index 69ee6598..0863a7c3 100644
--- a/audio/core/2.0/default/Stream.cpp
+++ b/audio/core/2.0/default/Stream.cpp
@@ -19,6 +19,7 @@
19#include "core/2.0/default/Stream.h" 19#include "core/2.0/default/Stream.h"
20#include "common/all-versions/default/EffectMap.h" 20#include "common/all-versions/default/EffectMap.h"
21#include "core/2.0/default/Conversions.h" 21#include "core/2.0/default/Conversions.h"
22#include "core/2.0/default/Util.h"
22 23
23#define AUDIO_HAL_VERSION V2_0 24#define AUDIO_HAL_VERSION V2_0
24#include <core/all-versions/default/Stream.impl.h> 25#include <core/all-versions/default/Stream.impl.h>
diff --git a/audio/core/2.0/default/StreamIn.cpp b/audio/core/2.0/default/StreamIn.cpp
index 6b8776eb..2021df1c 100644
--- a/audio/core/2.0/default/StreamIn.cpp
+++ b/audio/core/2.0/default/StreamIn.cpp
@@ -17,7 +17,7 @@
17#define LOG_TAG "StreamInHAL" 17#define LOG_TAG "StreamInHAL"
18 18
19#include "core/2.0/default/StreamIn.h" 19#include "core/2.0/default/StreamIn.h"
20#include "core/all-versions/default/Util.h" 20#include "core/2.0/default/Util.h"
21 21
22#define AUDIO_HAL_VERSION V2_0 22#define AUDIO_HAL_VERSION V2_0
23#include <core/all-versions/default/StreamIn.impl.h> 23#include <core/all-versions/default/StreamIn.impl.h>
diff --git a/audio/core/2.0/default/StreamOut.cpp b/audio/core/2.0/default/StreamOut.cpp
index 7f1461ac..940a2512 100644
--- a/audio/core/2.0/default/StreamOut.cpp
+++ b/audio/core/2.0/default/StreamOut.cpp
@@ -17,7 +17,7 @@
17#define LOG_TAG "StreamOutHAL" 17#define LOG_TAG "StreamOutHAL"
18 18
19#include "core/2.0/default/StreamOut.h" 19#include "core/2.0/default/StreamOut.h"
20#include "core/all-versions/default/Util.h" 20#include "core/2.0/default/Util.h"
21 21
22#define AUDIO_HAL_VERSION V2_0 22#define AUDIO_HAL_VERSION V2_0
23#include <core/all-versions/default/StreamOut.impl.h> 23#include <core/all-versions/default/StreamOut.impl.h>
diff --git a/audio/core/2.0/default/include/core/2.0/default/Util.h b/audio/core/2.0/default/include/core/2.0/default/Util.h
new file mode 100644
index 00000000..1f0e284d
--- /dev/null
+++ b/audio/core/2.0/default/include/core/2.0/default/Util.h
@@ -0,0 +1,26 @@
1/*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ANDROID_HARDWARE_AUDIO_V2_0_UTIL_H
18#define ANDROID_HARDWARE_AUDIO_V2_0_UTIL_H
19
20#include <android/hardware/audio/2.0/types.h>
21
22#define AUDIO_HAL_VERSION V2_0
23#include <core/all-versions/default/Util.h>
24#undef AUDIO_HAL_VERSION
25
26#endif // ANDROID_HARDWARE_AUDIO_V2_0_UTIL_H
diff --git a/audio/core/4.0/default/Device.cpp b/audio/core/4.0/default/Device.cpp
index 26f9ab4a..b33434ec 100644
--- a/audio/core/4.0/default/Device.cpp
+++ b/audio/core/4.0/default/Device.cpp
@@ -21,7 +21,7 @@
21#include "core/4.0/default/Conversions.h" 21#include "core/4.0/default/Conversions.h"
22#include "core/4.0/default/StreamIn.h" 22#include "core/4.0/default/StreamIn.h"
23#include "core/4.0/default/StreamOut.h" 23#include "core/4.0/default/StreamOut.h"
24#include "core/all-versions/default/Util.h" 24#include "core/4.0/default/Util.h"
25 25
26#define AUDIO_HAL_VERSION V4_0 26#define AUDIO_HAL_VERSION V4_0
27#include <core/all-versions/default/Device.impl.h> 27#include <core/all-versions/default/Device.impl.h>
diff --git a/audio/core/4.0/default/ParametersUtil.cpp b/audio/core/4.0/default/ParametersUtil.cpp
index 5c1b1c4b..2cc9fb56 100644
--- a/audio/core/4.0/default/ParametersUtil.cpp
+++ b/audio/core/4.0/default/ParametersUtil.cpp
@@ -15,6 +15,7 @@
15 */ 15 */
16 16
17#include "core/4.0/default/ParametersUtil.h" 17#include "core/4.0/default/ParametersUtil.h"
18#include "core/4.0/default/Util.h"
18 19
19#define AUDIO_HAL_VERSION V4_0 20#define AUDIO_HAL_VERSION V4_0
20#include <core/all-versions/default/ParametersUtil.impl.h> 21#include <core/all-versions/default/ParametersUtil.impl.h>
diff --git a/audio/core/4.0/default/PrimaryDevice.cpp b/audio/core/4.0/default/PrimaryDevice.cpp
index 0294b4d0..e3e49768 100644
--- a/audio/core/4.0/default/PrimaryDevice.cpp
+++ b/audio/core/4.0/default/PrimaryDevice.cpp
@@ -17,7 +17,7 @@
17#define LOG_TAG "PrimaryDeviceHAL" 17#define LOG_TAG "PrimaryDeviceHAL"
18 18
19#include "core/4.0/default/PrimaryDevice.h" 19#include "core/4.0/default/PrimaryDevice.h"
20#include "core/all-versions/default/Util.h" 20#include "core/4.0/default/Util.h"
21 21
22#define AUDIO_HAL_VERSION V4_0 22#define AUDIO_HAL_VERSION V4_0
23#include <core/all-versions/default/PrimaryDevice.impl.h> 23#include <core/all-versions/default/PrimaryDevice.impl.h>
diff --git a/audio/core/4.0/default/Stream.cpp b/audio/core/4.0/default/Stream.cpp
index 30b34544..b8c71de7 100644
--- a/audio/core/4.0/default/Stream.cpp
+++ b/audio/core/4.0/default/Stream.cpp
@@ -19,6 +19,7 @@
19#include "core/4.0/default/Stream.h" 19#include "core/4.0/default/Stream.h"
20#include "common/all-versions/default/EffectMap.h" 20#include "common/all-versions/default/EffectMap.h"
21#include "core/4.0/default/Conversions.h" 21#include "core/4.0/default/Conversions.h"
22#include "core/4.0/default/Util.h"
22 23
23#define AUDIO_HAL_VERSION V4_0 24#define AUDIO_HAL_VERSION V4_0
24#include <core/all-versions/default/Stream.impl.h> 25#include <core/all-versions/default/Stream.impl.h>
diff --git a/audio/core/4.0/default/StreamIn.cpp b/audio/core/4.0/default/StreamIn.cpp
index 18719b5d..718bd25a 100644
--- a/audio/core/4.0/default/StreamIn.cpp
+++ b/audio/core/4.0/default/StreamIn.cpp
@@ -17,7 +17,7 @@
17#define LOG_TAG "StreamInHAL" 17#define LOG_TAG "StreamInHAL"
18 18
19#include "core/4.0/default/StreamIn.h" 19#include "core/4.0/default/StreamIn.h"
20#include "core/all-versions/default/Util.h" 20#include "core/4.0/default/Util.h"
21 21
22#define AUDIO_HAL_VERSION V4_0 22#define AUDIO_HAL_VERSION V4_0
23#include <core/all-versions/default/StreamIn.impl.h> 23#include <core/all-versions/default/StreamIn.impl.h>
diff --git a/audio/core/4.0/default/StreamOut.cpp b/audio/core/4.0/default/StreamOut.cpp
index 11c8fde6..db88e401 100644
--- a/audio/core/4.0/default/StreamOut.cpp
+++ b/audio/core/4.0/default/StreamOut.cpp
@@ -17,7 +17,7 @@
17#define LOG_TAG "StreamOutHAL" 17#define LOG_TAG "StreamOutHAL"
18 18
19#include "core/4.0/default/StreamOut.h" 19#include "core/4.0/default/StreamOut.h"
20#include "core/all-versions/default/Util.h" 20#include "core/4.0/default/Util.h"
21 21
22#define AUDIO_HAL_VERSION V4_0 22#define AUDIO_HAL_VERSION V4_0
23#include <core/all-versions/default/StreamOut.impl.h> 23#include <core/all-versions/default/StreamOut.impl.h>
diff --git a/audio/core/4.0/default/include/core/4.0/default/Util.h b/audio/core/4.0/default/include/core/4.0/default/Util.h
new file mode 100644
index 00000000..ce31e6f7
--- /dev/null
+++ b/audio/core/4.0/default/include/core/4.0/default/Util.h
@@ -0,0 +1,26 @@
1/*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ANDROID_HARDWARE_AUDIO_V4_0_UTIL_H
18#define ANDROID_HARDWARE_AUDIO_V4_0_UTIL_H
19
20#include <android/hardware/audio/4.0/types.h>
21
22#define AUDIO_HAL_VERSION V4_0
23#include <core/all-versions/default/Util.h>
24#undef AUDIO_HAL_VERSION
25
26#endif // ANDROID_HARDWARE_AUDIO_V4_0_UTIL_H
diff --git a/audio/core/all-versions/default/include/core/all-versions/default/Device.impl.h b/audio/core/all-versions/default/include/core/all-versions/default/Device.impl.h
index 581e1dcc..37b7124a 100644
--- a/audio/core/all-versions/default/include/core/all-versions/default/Device.impl.h
+++ b/audio/core/all-versions/default/include/core/all-versions/default/Device.impl.h
@@ -25,7 +25,6 @@
25#include <android/log.h> 25#include <android/log.h>
26 26
27using ::android::hardware::audio::common::AUDIO_HAL_VERSION::HidlUtils; 27using ::android::hardware::audio::common::AUDIO_HAL_VERSION::HidlUtils;
28using ::android::hardware::audio::all_versions::implementation::isGainNormalized;
29 28
30namespace android { 29namespace android {
31namespace hardware { 30namespace hardware {
diff --git a/audio/core/all-versions/default/include/core/all-versions/default/ParametersUtil.impl.h b/audio/core/all-versions/default/include/core/all-versions/default/ParametersUtil.impl.h
index 39072840..afff2b6d 100644
--- a/audio/core/all-versions/default/include/core/all-versions/default/ParametersUtil.impl.h
+++ b/audio/core/all-versions/default/include/core/all-versions/default/ParametersUtil.impl.h
@@ -149,26 +149,7 @@ Result ParametersUtil::setParam(const char* name, const DeviceAddress& address)
149 149
150Result ParametersUtil::setParams(const AudioParameter& param) { 150Result ParametersUtil::setParams(const AudioParameter& param) {
151 int halStatus = halSetParameters(param.toString().string()); 151 int halStatus = halSetParameters(param.toString().string());
152 switch (halStatus) { 152 return util::analyzeStatus(halStatus);
153 case OK:
154 return Result::OK;
155 case -EINVAL:
156 return Result::INVALID_ARGUMENTS;
157 case -ENODATA:
158 return Result::INVALID_STATE;
159 case -ENODEV:
160 return Result::NOT_INITIALIZED;
161 // The rest of the API (*::analyseStatus) returns NOT_SUPPORTED
162 // when the legacy API returns -ENOSYS
163 // However the legacy API explicitly state that for get_paramers,
164 // -ENOSYS should be returned if
165 // "the implementation does not accept a parameter change while the
166 // output is active but the parameter is acceptable otherwise"
167 case -ENOSYS:
168 return Result::INVALID_STATE;
169 default:
170 return Result::INVALID_ARGUMENTS;
171 }
172} 153}
173 154
174} // namespace implementation 155} // namespace implementation
diff --git a/audio/core/all-versions/default/include/core/all-versions/default/PrimaryDevice.impl.h b/audio/core/all-versions/default/include/core/all-versions/default/PrimaryDevice.impl.h
index 9b39d9c9..61ffbe00 100644
--- a/audio/core/all-versions/default/include/core/all-versions/default/PrimaryDevice.impl.h
+++ b/audio/core/all-versions/default/include/core/all-versions/default/PrimaryDevice.impl.h
@@ -160,7 +160,7 @@ Return<Result> PrimaryDevice::setConnectedState(const DeviceAddress& address, bo
160 160
161// Methods from ::android::hardware::audio::AUDIO_HAL_VERSION::IPrimaryDevice follow. 161// Methods from ::android::hardware::audio::AUDIO_HAL_VERSION::IPrimaryDevice follow.
162Return<Result> PrimaryDevice::setVoiceVolume(float volume) { 162Return<Result> PrimaryDevice::setVoiceVolume(float volume) {
163 if (!all_versions::implementation::isGainNormalized(volume)) { 163 if (!isGainNormalized(volume)) {
164 ALOGW("Can not set a voice volume (%f) outside [0,1]", volume); 164 ALOGW("Can not set a voice volume (%f) outside [0,1]", volume);
165 return Result::INVALID_ARGUMENTS; 165 return Result::INVALID_ARGUMENTS;
166 } 166 }
@@ -248,7 +248,7 @@ Return<Result> PrimaryDevice::setBtHfpSampleRate(uint32_t sampleRateHz) {
248 return mDevice->setParam(AUDIO_PARAMETER_KEY_HFP_SET_SAMPLING_RATE, int(sampleRateHz)); 248 return mDevice->setParam(AUDIO_PARAMETER_KEY_HFP_SET_SAMPLING_RATE, int(sampleRateHz));
249} 249}
250Return<Result> PrimaryDevice::setBtHfpVolume(float volume) { 250Return<Result> PrimaryDevice::setBtHfpVolume(float volume) {
251 if (!all_versions::implementation::isGainNormalized(volume)) { 251 if (!isGainNormalized(volume)) {
252 ALOGW("Can not set BT HFP volume (%f) outside [0,1]", volume); 252 ALOGW("Can not set BT HFP volume (%f) outside [0,1]", volume);
253 return Result::INVALID_ARGUMENTS; 253 return Result::INVALID_ARGUMENTS;
254 } 254 }
diff --git a/audio/core/all-versions/default/include/core/all-versions/default/Stream.impl.h b/audio/core/all-versions/default/include/core/all-versions/default/Stream.impl.h
index fa0ef45b..74151125 100644
--- a/audio/core/all-versions/default/include/core/all-versions/default/Stream.impl.h
+++ b/audio/core/all-versions/default/include/core/all-versions/default/Stream.impl.h
@@ -39,35 +39,14 @@ Stream::~Stream() {
39 39
40// static 40// static
41Result Stream::analyzeStatus(const char* funcName, int status) { 41Result Stream::analyzeStatus(const char* funcName, int status) {
42 static const std::vector<int> empty; 42 return util::analyzeStatus("stream", funcName, status);
43 return analyzeStatus(funcName, status, empty);
44} 43}
45 44
46template <typename T>
47inline bool element_in(T e, const std::vector<T>& v) {
48 return std::find(v.begin(), v.end(), e) != v.end();
49}
50 45
51// static 46// static
52Result Stream::analyzeStatus(const char* funcName, int status, 47Result Stream::analyzeStatus(const char* funcName, int status,
53 const std::vector<int>& ignoreErrors) { 48 const std::vector<int>& ignoreErrors) {
54 if (status != 0 && (ignoreErrors.empty() || !element_in(-status, ignoreErrors))) { 49 return util::analyzeStatus("stream", funcName, status, ignoreErrors);
55 ALOGW("Error from HAL stream in function %s: %s", funcName, strerror(-status));
56 }
57 switch (status) {
58 case 0:
59 return Result::OK;
60 case -EINVAL:
61 return Result::INVALID_ARGUMENTS;
62 case -ENODATA:
63 return Result::INVALID_STATE;
64 case -ENODEV:
65 return Result::NOT_INITIALIZED;
66 case -ENOSYS:
67 return Result::NOT_SUPPORTED;
68 default:
69 return Result::INVALID_STATE;
70 }
71} 50}
72 51
73char* Stream::halGetParameters(const char* keys) { 52char* Stream::halGetParameters(const char* keys) {
diff --git a/audio/core/all-versions/default/include/core/all-versions/default/StreamIn.impl.h b/audio/core/all-versions/default/include/core/all-versions/default/StreamIn.impl.h
index 8774be90..64c85ab5 100644
--- a/audio/core/all-versions/default/include/core/all-versions/default/StreamIn.impl.h
+++ b/audio/core/all-versions/default/include/core/all-versions/default/StreamIn.impl.h
@@ -25,9 +25,7 @@
25#include <memory> 25#include <memory>
26 26
27using ::android::hardware::audio::AUDIO_HAL_VERSION::MessageQueueFlagBits; 27using ::android::hardware::audio::AUDIO_HAL_VERSION::MessageQueueFlagBits;
28using ::android::hardware::audio::all_versions::implementation::isGainNormalized;
29#include "Conversions.h" 28#include "Conversions.h"
30#include "Util.h"
31 29
32namespace android { 30namespace android {
33namespace hardware { 31namespace hardware {
diff --git a/audio/core/all-versions/default/include/core/all-versions/default/StreamOut.impl.h b/audio/core/all-versions/default/include/core/all-versions/default/StreamOut.impl.h
index 77098a81..6fb157f7 100644
--- a/audio/core/all-versions/default/include/core/all-versions/default/StreamOut.impl.h
+++ b/audio/core/all-versions/default/include/core/all-versions/default/StreamOut.impl.h
@@ -32,7 +32,6 @@ namespace AUDIO_HAL_VERSION {
32namespace implementation { 32namespace implementation {
33 33
34using ::android::hardware::audio::common::AUDIO_HAL_VERSION::ThreadInfo; 34using ::android::hardware::audio::common::AUDIO_HAL_VERSION::ThreadInfo;
35using ::android::hardware::audio::all_versions::implementation::isGainNormalized;
36 35
37namespace { 36namespace {
38 37
diff --git a/audio/core/all-versions/default/include/core/all-versions/default/Util.h b/audio/core/all-versions/default/include/core/all-versions/default/Util.h
index 39d9dbde..350fd867 100644
--- a/audio/core/all-versions/default/include/core/all-versions/default/Util.h
+++ b/audio/core/all-versions/default/include/core/all-versions/default/Util.h
@@ -14,24 +14,61 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17#ifndef ANDROID_HARDWARE_AUDIO_DEVICE_ALL_VERSIONS_UTIL_H 17#include <common/all-versions/IncludeGuard.h>
18#define ANDROID_HARDWARE_AUDIO_DEVICE_ALL_VERSIONS_UTIL_H 18
19#include <algorithm>
20#include <vector>
21
22#include <system/audio.h>
19 23
20namespace android { 24namespace android {
21namespace hardware { 25namespace hardware {
22namespace audio { 26namespace audio {
23namespace all_versions { 27namespace AUDIO_HAL_VERSION {
24namespace implementation { 28namespace implementation {
25 29
30using ::android::hardware::audio::AUDIO_HAL_VERSION::Result;
31
26/** @return true if gain is between 0 and 1 included. */ 32/** @return true if gain is between 0 and 1 included. */
27constexpr bool isGainNormalized(float gain) { 33constexpr bool isGainNormalized(float gain) {
28 return gain >= 0.0 && gain <= 1.0; 34 return gain >= 0.0 && gain <= 1.0;
29} 35}
30 36
37namespace util {
38
39template <typename T>
40inline bool element_in(T e, const std::vector<T>& v) {
41 return std::find(v.begin(), v.end(), e) != v.end();
42}
43
44static inline Result analyzeStatus(status_t status) {
45 switch (status) {
46 case 0:
47 return Result::OK;
48 case -EINVAL:
49 return Result::INVALID_ARGUMENTS;
50 case -ENODATA:
51 return Result::INVALID_STATE;
52 case -ENODEV:
53 return Result::NOT_INITIALIZED;
54 case -ENOSYS:
55 return Result::NOT_SUPPORTED;
56 default:
57 return Result::INVALID_STATE;
58 }
59}
60
61static inline Result analyzeStatus(const char* className, const char* funcName, status_t status,
62 const std::vector<int>& ignoreErrors = {}) {
63 if (status != 0 && !element_in(-status, ignoreErrors)) {
64 ALOGW("Error from HAL %s in function %s: %s", className, funcName, strerror(-status));
65 }
66 return analyzeStatus(status);
67}
68
69} // namespace util
31} // namespace implementation 70} // namespace implementation
32} // namespace all_versions 71} // namespace AUDIO_HAL_VERSION
33} // namespace audio 72} // namespace audio
34} // namespace hardware 73} // namespace hardware
35} // namespace android 74} // namespace android
36
37#endif // ANDROID_HARDWARE_AUDIO_DEVICE_ALL_VERSIONS_UTIL_H
diff --git a/automotive/vehicle/2.0/Android.bp b/automotive/vehicle/2.0/Android.bp
index 4b93008e..91255d0d 100644
--- a/automotive/vehicle/2.0/Android.bp
+++ b/automotive/vehicle/2.0/Android.bp
@@ -32,9 +32,9 @@ hidl_interface {
32 "SubscribeOptions", 32 "SubscribeOptions",
33 "VehicleApPowerBootupReason", 33 "VehicleApPowerBootupReason",
34 "VehicleApPowerStateConfigFlag", 34 "VehicleApPowerStateConfigFlag",
35 "VehicleApPowerStateReport",
35 "VehicleApPowerStateReq", 36 "VehicleApPowerStateReq",
36 "VehicleApPowerStateReqIndex", 37 "VehicleApPowerStateReqIndex",
37 "VehicleApPowerStateReport",
38 "VehicleApPowerStateShutdownParam", 38 "VehicleApPowerStateShutdownParam",
39 "VehicleArea", 39 "VehicleArea",
40 "VehicleAreaConfig", 40 "VehicleAreaConfig",
diff --git a/camera/metadata/3.3/Android.bp b/camera/metadata/3.3/Android.bp
index 166c2acd..ad6f141c 100644
--- a/camera/metadata/3.3/Android.bp
+++ b/camera/metadata/3.3/Android.bp
@@ -16,6 +16,7 @@ hidl_interface {
16 "CameraMetadataEnumAndroidControlAeMode", 16 "CameraMetadataEnumAndroidControlAeMode",
17 "CameraMetadataEnumAndroidControlAfSceneChange", 17 "CameraMetadataEnumAndroidControlAfSceneChange",
18 "CameraMetadataEnumAndroidControlCaptureIntent", 18 "CameraMetadataEnumAndroidControlCaptureIntent",
19 "CameraMetadataEnumAndroidDistortionCorrectionMode",
19 "CameraMetadataEnumAndroidInfoSupportedHardwareLevel", 20 "CameraMetadataEnumAndroidInfoSupportedHardwareLevel",
20 "CameraMetadataEnumAndroidLensPoseReference", 21 "CameraMetadataEnumAndroidLensPoseReference",
21 "CameraMetadataEnumAndroidLogicalMultiCameraSensorSyncType", 22 "CameraMetadataEnumAndroidLogicalMultiCameraSensorSyncType",
diff --git a/neuralnetworks/1.0/vts/OWNERS b/neuralnetworks/1.0/vts/OWNERS
index 59e7c28b..87e322b5 100644
--- a/neuralnetworks/1.0/vts/OWNERS
+++ b/neuralnetworks/1.0/vts/OWNERS
@@ -1,10 +1,10 @@
1# Neuralnetworks team 1# Neuralnetworks team
2butlermichael@google.com 2butlermichael@google.com
3dgross@google.com 3dgross@google.com
4ijsung@google.com
5jeanluc@google.com 4jeanluc@google.com
6miaowang@google.com 5miaowang@google.com
7yangni@google.com 6mikie@google.com
7pszczepaniak@google.com
8 8
9# VTS team 9# VTS team
10yim@google.com 10yim@google.com
diff --git a/neuralnetworks/1.1/Android.bp b/neuralnetworks/1.1/Android.bp
index 81bcef31..24d83968 100644
--- a/neuralnetworks/1.1/Android.bp
+++ b/neuralnetworks/1.1/Android.bp
@@ -16,6 +16,7 @@ hidl_interface {
16 ], 16 ],
17 types: [ 17 types: [
18 "Capabilities", 18 "Capabilities",
19 "ExecutionPreference",
19 "Model", 20 "Model",
20 "Operation", 21 "Operation",
21 "OperationType", 22 "OperationType",
diff --git a/neuralnetworks/1.1/vts/OWNERS b/neuralnetworks/1.1/vts/OWNERS
index 7f75ab30..87e322b5 100644
--- a/neuralnetworks/1.1/vts/OWNERS
+++ b/neuralnetworks/1.1/vts/OWNERS
@@ -3,7 +3,8 @@ butlermichael@google.com
3dgross@google.com 3dgross@google.com
4jeanluc@google.com 4jeanluc@google.com
5miaowang@google.com 5miaowang@google.com
6yangni@google.com 6mikie@google.com
7pszczepaniak@google.com
7 8
8# VTS team 9# VTS team
9yim@google.com 10yim@google.com
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_cell_broadcast.cpp b/radio/1.0/vts/functional/radio_hidl_hal_cell_broadcast.cpp
index 8c4ccf6b..2c1eb607 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_cell_broadcast.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_cell_broadcast.cpp
@@ -22,7 +22,7 @@ using namespace ::android::hardware::radio::V1_0;
22 * Test IRadio.setGsmBroadcastConfig() for the response returned. 22 * Test IRadio.setGsmBroadcastConfig() for the response returned.
23 */ 23 */
24TEST_F(RadioHidlTest, setGsmBroadcastConfig) { 24TEST_F(RadioHidlTest, setGsmBroadcastConfig) {
25 int serial = GetRandomSerialNumber(); 25 serial = GetRandomSerialNumber();
26 26
27 // Create GsmBroadcastSmsConfigInfo #1 27 // Create GsmBroadcastSmsConfigInfo #1
28 GsmBroadcastSmsConfigInfo gbSmsConfig1; 28 GsmBroadcastSmsConfigInfo gbSmsConfig1;
@@ -85,7 +85,7 @@ TEST_F(RadioHidlTest, setGsmBroadcastConfig) {
85 * Test IRadio.getGsmBroadcastConfig() for the response returned. 85 * Test IRadio.getGsmBroadcastConfig() for the response returned.
86 */ 86 */
87TEST_F(RadioHidlTest, getGsmBroadcastConfig) { 87TEST_F(RadioHidlTest, getGsmBroadcastConfig) {
88 int serial = GetRandomSerialNumber(); 88 serial = GetRandomSerialNumber();
89 89
90 radio->getGsmBroadcastConfig(serial); 90 radio->getGsmBroadcastConfig(serial);
91 91
@@ -105,7 +105,7 @@ TEST_F(RadioHidlTest, getGsmBroadcastConfig) {
105 * Test IRadio.setCdmaBroadcastConfig() for the response returned. 105 * Test IRadio.setCdmaBroadcastConfig() for the response returned.
106 */ 106 */
107TEST_F(RadioHidlTest, setCdmaBroadcastConfig) { 107TEST_F(RadioHidlTest, setCdmaBroadcastConfig) {
108 int serial = GetRandomSerialNumber(); 108 serial = GetRandomSerialNumber();
109 109
110 CdmaBroadcastSmsConfigInfo cbSmsConfig; 110 CdmaBroadcastSmsConfigInfo cbSmsConfig;
111 cbSmsConfig.serviceCategory = 4096; 111 cbSmsConfig.serviceCategory = 4096;
@@ -132,7 +132,7 @@ TEST_F(RadioHidlTest, setCdmaBroadcastConfig) {
132 * Test IRadio.getCdmaBroadcastConfig() for the response returned. 132 * Test IRadio.getCdmaBroadcastConfig() for the response returned.
133 */ 133 */
134TEST_F(RadioHidlTest, getCdmaBroadcastConfig) { 134TEST_F(RadioHidlTest, getCdmaBroadcastConfig) {
135 int serial = GetRandomSerialNumber(); 135 serial = GetRandomSerialNumber();
136 136
137 radio->getCdmaBroadcastConfig(serial); 137 radio->getCdmaBroadcastConfig(serial);
138 138
@@ -150,7 +150,7 @@ TEST_F(RadioHidlTest, getCdmaBroadcastConfig) {
150 * Test IRadio.setCdmaBroadcastActivation() for the response returned. 150 * Test IRadio.setCdmaBroadcastActivation() for the response returned.
151 */ 151 */
152TEST_F(RadioHidlTest, setCdmaBroadcastActivation) { 152TEST_F(RadioHidlTest, setCdmaBroadcastActivation) {
153 int serial = GetRandomSerialNumber(); 153 serial = GetRandomSerialNumber();
154 bool activate = false; 154 bool activate = false;
155 155
156 radio->setCdmaBroadcastActivation(serial, activate); 156 radio->setCdmaBroadcastActivation(serial, activate);
@@ -170,7 +170,7 @@ TEST_F(RadioHidlTest, setCdmaBroadcastActivation) {
170 * Test IRadio.setGsmBroadcastActivation() for the response returned. 170 * Test IRadio.setGsmBroadcastActivation() for the response returned.
171 */ 171 */
172TEST_F(RadioHidlTest, setGsmBroadcastActivation) { 172TEST_F(RadioHidlTest, setGsmBroadcastActivation) {
173 int serial = GetRandomSerialNumber(); 173 serial = GetRandomSerialNumber();
174 bool activate = false; 174 bool activate = false;
175 175
176 radio->setGsmBroadcastActivation(serial, activate); 176 radio->setGsmBroadcastActivation(serial, activate);
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_data.cpp b/radio/1.0/vts/functional/radio_hidl_hal_data.cpp
index 94966884..4f10f112 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_data.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_data.cpp
@@ -22,7 +22,7 @@ using namespace ::android::hardware::radio::V1_0;
22 * Test IRadio.getDataRegistrationState() for the response returned. 22 * Test IRadio.getDataRegistrationState() for the response returned.
23 */ 23 */
24TEST_F(RadioHidlTest, getDataRegistrationState) { 24TEST_F(RadioHidlTest, getDataRegistrationState) {
25 int serial = GetRandomSerialNumber(); 25 serial = GetRandomSerialNumber();
26 26
27 radio->getDataRegistrationState(serial); 27 radio->getDataRegistrationState(serial);
28 28
@@ -39,7 +39,7 @@ TEST_F(RadioHidlTest, getDataRegistrationState) {
39 * Test IRadio.setupDataCall() for the response returned. 39 * Test IRadio.setupDataCall() for the response returned.
40 */ 40 */
41TEST_F(RadioHidlTest, setupDataCall) { 41TEST_F(RadioHidlTest, setupDataCall) {
42 int serial = GetRandomSerialNumber(); 42 serial = GetRandomSerialNumber();
43 43
44 RadioTechnology radioTechnology = RadioTechnology::LTE; 44 RadioTechnology radioTechnology = RadioTechnology::LTE;
45 45
@@ -70,7 +70,7 @@ TEST_F(RadioHidlTest, setupDataCall) {
70 radio->setupDataCall(serial, radioTechnology, dataProfileInfo, modemCognitive, roamingAllowed, 70 radio->setupDataCall(serial, radioTechnology, dataProfileInfo, modemCognitive, roamingAllowed,
71 isRoaming); 71 isRoaming);
72 72
73 EXPECT_EQ(std::cv_status::no_timeout, wait()); 73 EXPECT_EQ(std::cv_status::no_timeout, wait(300));
74 EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type); 74 EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
75 EXPECT_EQ(serial, radioRsp->rspInfo.serial); 75 EXPECT_EQ(serial, radioRsp->rspInfo.serial);
76 76
@@ -87,7 +87,7 @@ TEST_F(RadioHidlTest, setupDataCall) {
87 * Test IRadio.deactivateDataCall() for the response returned. 87 * Test IRadio.deactivateDataCall() for the response returned.
88 */ 88 */
89TEST_F(RadioHidlTest, deactivateDataCall) { 89TEST_F(RadioHidlTest, deactivateDataCall) {
90 int serial = GetRandomSerialNumber(); 90 serial = GetRandomSerialNumber();
91 int cid = 1; 91 int cid = 1;
92 bool reasonRadioShutDown = false; 92 bool reasonRadioShutDown = false;
93 93
@@ -109,7 +109,7 @@ TEST_F(RadioHidlTest, deactivateDataCall) {
109 * Test IRadio.getDataCallList() for the response returned. 109 * Test IRadio.getDataCallList() for the response returned.
110 */ 110 */
111TEST_F(RadioHidlTest, getDataCallList) { 111TEST_F(RadioHidlTest, getDataCallList) {
112 int serial = GetRandomSerialNumber(); 112 serial = GetRandomSerialNumber();
113 113
114 radio->getDataCallList(serial); 114 radio->getDataCallList(serial);
115 115
@@ -128,7 +128,7 @@ TEST_F(RadioHidlTest, getDataCallList) {
128 * Test IRadio.setInitialAttachApn() for the response returned. 128 * Test IRadio.setInitialAttachApn() for the response returned.
129 */ 129 */
130TEST_F(RadioHidlTest, setInitialAttachApn) { 130TEST_F(RadioHidlTest, setInitialAttachApn) {
131 int serial = GetRandomSerialNumber(); 131 serial = GetRandomSerialNumber();
132 132
133 DataProfileInfo dataProfileInfo; 133 DataProfileInfo dataProfileInfo;
134 memset(&dataProfileInfo, 0, sizeof(dataProfileInfo)); 134 memset(&dataProfileInfo, 0, sizeof(dataProfileInfo));
@@ -171,7 +171,7 @@ TEST_F(RadioHidlTest, setInitialAttachApn) {
171 * Test IRadio.setDataAllowed() for the response returned. 171 * Test IRadio.setDataAllowed() for the response returned.
172 */ 172 */
173TEST_F(RadioHidlTest, setDataAllowed) { 173TEST_F(RadioHidlTest, setDataAllowed) {
174 int serial = GetRandomSerialNumber(); 174 serial = GetRandomSerialNumber();
175 bool allow = true; 175 bool allow = true;
176 176
177 radio->setDataAllowed(serial, allow); 177 radio->setDataAllowed(serial, allow);
@@ -189,7 +189,7 @@ TEST_F(RadioHidlTest, setDataAllowed) {
189 * Test IRadio.setDataProfile() for the response returned. 189 * Test IRadio.setDataProfile() for the response returned.
190 */ 190 */
191TEST_F(RadioHidlTest, setDataProfile) { 191TEST_F(RadioHidlTest, setDataProfile) {
192 int serial = GetRandomSerialNumber(); 192 serial = GetRandomSerialNumber();
193 193
194 // Create a dataProfileInfo 194 // Create a dataProfileInfo
195 DataProfileInfo dataProfileInfo; 195 DataProfileInfo dataProfileInfo;
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp b/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp
index 566a5166..b764b132 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp
@@ -30,7 +30,7 @@ TEST_F(RadioHidlTest, getIccCardStatus) {
30 * Test IRadio.supplyIccPinForApp() for the response returned 30 * Test IRadio.supplyIccPinForApp() for the response returned
31 */ 31 */
32TEST_F(RadioHidlTest, supplyIccPinForApp) { 32TEST_F(RadioHidlTest, supplyIccPinForApp) {
33 int serial = GetRandomSerialNumber(); 33 serial = GetRandomSerialNumber();
34 34
35 // Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and 35 // Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and
36 // 3GPP2 apps only 36 // 3GPP2 apps only
@@ -53,7 +53,7 @@ TEST_F(RadioHidlTest, supplyIccPinForApp) {
53 * Test IRadio.supplyIccPukForApp() for the response returned. 53 * Test IRadio.supplyIccPukForApp() for the response returned.
54 */ 54 */
55TEST_F(RadioHidlTest, supplyIccPukForApp) { 55TEST_F(RadioHidlTest, supplyIccPukForApp) {
56 int serial = GetRandomSerialNumber(); 56 serial = GetRandomSerialNumber();
57 57
58 // Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and 58 // Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and
59 // 3GPP2 apps only 59 // 3GPP2 apps only
@@ -76,7 +76,7 @@ TEST_F(RadioHidlTest, supplyIccPukForApp) {
76 * Test IRadio.supplyIccPin2ForApp() for the response returned. 76 * Test IRadio.supplyIccPin2ForApp() for the response returned.
77 */ 77 */
78TEST_F(RadioHidlTest, supplyIccPin2ForApp) { 78TEST_F(RadioHidlTest, supplyIccPin2ForApp) {
79 int serial = GetRandomSerialNumber(); 79 serial = GetRandomSerialNumber();
80 80
81 // Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and 81 // Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and
82 // 3GPP2 apps only 82 // 3GPP2 apps only
@@ -99,7 +99,7 @@ TEST_F(RadioHidlTest, supplyIccPin2ForApp) {
99 * Test IRadio.supplyIccPuk2ForApp() for the response returned. 99 * Test IRadio.supplyIccPuk2ForApp() for the response returned.
100 */ 100 */
101TEST_F(RadioHidlTest, supplyIccPuk2ForApp) { 101TEST_F(RadioHidlTest, supplyIccPuk2ForApp) {
102 int serial = GetRandomSerialNumber(); 102 serial = GetRandomSerialNumber();
103 103
104 // Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and 104 // Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and
105 // 3GPP2 apps only 105 // 3GPP2 apps only
@@ -122,7 +122,7 @@ TEST_F(RadioHidlTest, supplyIccPuk2ForApp) {
122 * Test IRadio.changeIccPinForApp() for the response returned. 122 * Test IRadio.changeIccPinForApp() for the response returned.
123 */ 123 */
124TEST_F(RadioHidlTest, changeIccPinForApp) { 124TEST_F(RadioHidlTest, changeIccPinForApp) {
125 int serial = GetRandomSerialNumber(); 125 serial = GetRandomSerialNumber();
126 126
127 // Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and 127 // Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and
128 // 3GPP2 apps only 128 // 3GPP2 apps only
@@ -145,7 +145,7 @@ TEST_F(RadioHidlTest, changeIccPinForApp) {
145 * Test IRadio.changeIccPin2ForApp() for the response returned. 145 * Test IRadio.changeIccPin2ForApp() for the response returned.
146 */ 146 */
147TEST_F(RadioHidlTest, changeIccPin2ForApp) { 147TEST_F(RadioHidlTest, changeIccPin2ForApp) {
148 int serial = GetRandomSerialNumber(); 148 serial = GetRandomSerialNumber();
149 149
150 // Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and 150 // Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and
151 // 3GPP2 apps only 151 // 3GPP2 apps only
@@ -168,7 +168,7 @@ TEST_F(RadioHidlTest, changeIccPin2ForApp) {
168 * Test IRadio.getImsiForApp() for the response returned. 168 * Test IRadio.getImsiForApp() for the response returned.
169 */ 169 */
170TEST_F(RadioHidlTest, getImsiForApp) { 170TEST_F(RadioHidlTest, getImsiForApp) {
171 int serial = GetRandomSerialNumber(); 171 serial = GetRandomSerialNumber();
172 172
173 // Check success returned while getting imsi for 3GPP and 3GPP2 apps only 173 // Check success returned while getting imsi for 3GPP and 3GPP2 apps only
174 for (int i = 0; i < (int)cardStatus.applications.size(); i++) { 174 for (int i = 0; i < (int)cardStatus.applications.size(); i++) {
@@ -196,7 +196,7 @@ TEST_F(RadioHidlTest, getImsiForApp) {
196 * Test IRadio.iccIOForApp() for the response returned. 196 * Test IRadio.iccIOForApp() for the response returned.
197 */ 197 */
198TEST_F(RadioHidlTest, iccIOForApp) { 198TEST_F(RadioHidlTest, iccIOForApp) {
199 int serial = GetRandomSerialNumber(); 199 serial = GetRandomSerialNumber();
200 200
201 for (int i = 0; i < (int)cardStatus.applications.size(); i++) { 201 for (int i = 0; i < (int)cardStatus.applications.size(); i++) {
202 IccIo iccIo; 202 IccIo iccIo;
@@ -221,7 +221,7 @@ TEST_F(RadioHidlTest, iccIOForApp) {
221 * Test IRadio.iccTransmitApduBasicChannel() for the response returned. 221 * Test IRadio.iccTransmitApduBasicChannel() for the response returned.
222 */ 222 */
223TEST_F(RadioHidlTest, iccTransmitApduBasicChannel) { 223TEST_F(RadioHidlTest, iccTransmitApduBasicChannel) {
224 int serial = GetRandomSerialNumber(); 224 serial = GetRandomSerialNumber();
225 SimApdu msg; 225 SimApdu msg;
226 memset(&msg, 0, sizeof(msg)); 226 memset(&msg, 0, sizeof(msg));
227 msg.data = hidl_string(); 227 msg.data = hidl_string();
@@ -238,7 +238,7 @@ TEST_F(RadioHidlTest, iccTransmitApduBasicChannel) {
238 * Test IRadio.iccOpenLogicalChannel() for the response returned. 238 * Test IRadio.iccOpenLogicalChannel() for the response returned.
239 */ 239 */
240TEST_F(RadioHidlTest, iccOpenLogicalChannel) { 240TEST_F(RadioHidlTest, iccOpenLogicalChannel) {
241 int serial = GetRandomSerialNumber(); 241 serial = GetRandomSerialNumber();
242 int p2 = 0x04; 242 int p2 = 0x04;
243 // Specified in ISO 7816-4 clause 7.1.1 0x04 means that FCP template is requested. 243 // Specified in ISO 7816-4 clause 7.1.1 0x04 means that FCP template is requested.
244 for (int i = 0; i < (int)cardStatus.applications.size(); i++) { 244 for (int i = 0; i < (int)cardStatus.applications.size(); i++) {
@@ -253,7 +253,7 @@ TEST_F(RadioHidlTest, iccOpenLogicalChannel) {
253 * Test IRadio.iccCloseLogicalChannel() for the response returned. 253 * Test IRadio.iccCloseLogicalChannel() for the response returned.
254 */ 254 */
255TEST_F(RadioHidlTest, iccCloseLogicalChannel) { 255TEST_F(RadioHidlTest, iccCloseLogicalChannel) {
256 int serial = GetRandomSerialNumber(); 256 serial = GetRandomSerialNumber();
257 // Try closing invalid channel and check INVALID_ARGUMENTS returned as error 257 // Try closing invalid channel and check INVALID_ARGUMENTS returned as error
258 radio->iccCloseLogicalChannel(serial, 0); 258 radio->iccCloseLogicalChannel(serial, 0);
259 EXPECT_EQ(std::cv_status::no_timeout, wait()); 259 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -267,7 +267,7 @@ TEST_F(RadioHidlTest, iccCloseLogicalChannel) {
267 * Test IRadio.iccTransmitApduLogicalChannel() for the response returned. 267 * Test IRadio.iccTransmitApduLogicalChannel() for the response returned.
268 */ 268 */
269TEST_F(RadioHidlTest, iccTransmitApduLogicalChannel) { 269TEST_F(RadioHidlTest, iccTransmitApduLogicalChannel) {
270 int serial = GetRandomSerialNumber(); 270 serial = GetRandomSerialNumber();
271 SimApdu msg; 271 SimApdu msg;
272 memset(&msg, 0, sizeof(msg)); 272 memset(&msg, 0, sizeof(msg));
273 msg.data = hidl_string(); 273 msg.data = hidl_string();
@@ -284,17 +284,18 @@ TEST_F(RadioHidlTest, iccTransmitApduLogicalChannel) {
284 * Test IRadio.requestIccSimAuthentication() for the response returned. 284 * Test IRadio.requestIccSimAuthentication() for the response returned.
285 */ 285 */
286TEST_F(RadioHidlTest, requestIccSimAuthentication) { 286TEST_F(RadioHidlTest, requestIccSimAuthentication) {
287 int serial = GetRandomSerialNumber(); 287 serial = GetRandomSerialNumber();
288 288
289 // Pass wrong challenge string and check RadioError::INVALID_ARGUMENTS 289 // Pass wrong challenge string and check RadioError::INVALID_ARGUMENTS
290 // returned as error. 290 // or REQUEST_NOT_SUPPORTED returned as error.
291 for (int i = 0; i < (int)cardStatus.applications.size(); i++) { 291 for (int i = 0; i < (int)cardStatus.applications.size(); i++) {
292 radio->requestIccSimAuthentication(serial, 0, hidl_string("test"), 292 radio->requestIccSimAuthentication(serial, 0, hidl_string("test"),
293 cardStatus.applications[i].aidPtr); 293 cardStatus.applications[i].aidPtr);
294 EXPECT_EQ(std::cv_status::no_timeout, wait()); 294 EXPECT_EQ(std::cv_status::no_timeout, wait());
295 EXPECT_EQ(serial, radioRsp->rspInfo.serial); 295 EXPECT_EQ(serial, radioRsp->rspInfo.serial);
296 EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type); 296 EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
297 EXPECT_EQ(RadioError::INVALID_ARGUMENTS, radioRsp->rspInfo.error); 297 ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::INVALID_ARGUMENTS,
298 RadioError::REQUEST_NOT_SUPPORTED}));
298 } 299 }
299} 300}
300 301
@@ -302,7 +303,7 @@ TEST_F(RadioHidlTest, requestIccSimAuthentication) {
302 * Test IRadio.supplyNetworkDepersonalization() for the response returned. 303 * Test IRadio.supplyNetworkDepersonalization() for the response returned.
303 */ 304 */
304TEST_F(RadioHidlTest, supplyNetworkDepersonalization) { 305TEST_F(RadioHidlTest, supplyNetworkDepersonalization) {
305 int serial = GetRandomSerialNumber(); 306 serial = GetRandomSerialNumber();
306 307
307 radio->supplyNetworkDepersonalization(serial, hidl_string("test")); 308 radio->supplyNetworkDepersonalization(serial, hidl_string("test"));
308 EXPECT_EQ(std::cv_status::no_timeout, wait()); 309 EXPECT_EQ(std::cv_status::no_timeout, wait());
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_ims.cpp b/radio/1.0/vts/functional/radio_hidl_hal_ims.cpp
index 45746784..4331c06c 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_ims.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_ims.cpp
@@ -22,7 +22,7 @@ using namespace ::android::hardware::radio::V1_0;
22 * Test IRadio.getClir() for the response returned. 22 * Test IRadio.getClir() for the response returned.
23 */ 23 */
24TEST_F(RadioHidlTest, getClir) { 24TEST_F(RadioHidlTest, getClir) {
25 int serial = GetRandomSerialNumber(); 25 serial = GetRandomSerialNumber();
26 26
27 radio->getClir(serial); 27 radio->getClir(serial);
28 28
@@ -40,7 +40,7 @@ TEST_F(RadioHidlTest, getClir) {
40 * Test IRadio.setClir() for the response returned. 40 * Test IRadio.setClir() for the response returned.
41 */ 41 */
42TEST_F(RadioHidlTest, setClir) { 42TEST_F(RadioHidlTest, setClir) {
43 int serial = GetRandomSerialNumber(); 43 serial = GetRandomSerialNumber();
44 int32_t status = 1; 44 int32_t status = 1;
45 45
46 radio->setClir(serial, status); 46 radio->setClir(serial, status);
@@ -58,7 +58,7 @@ TEST_F(RadioHidlTest, setClir) {
58 * Test IRadio.getFacilityLockForApp() for the response returned. 58 * Test IRadio.getFacilityLockForApp() for the response returned.
59 */ 59 */
60TEST_F(RadioHidlTest, getFacilityLockForApp) { 60TEST_F(RadioHidlTest, getFacilityLockForApp) {
61 int serial = GetRandomSerialNumber(); 61 serial = GetRandomSerialNumber();
62 std::string facility = ""; 62 std::string facility = "";
63 std::string password = ""; 63 std::string password = "";
64 int32_t serviceClass = 1; 64 int32_t serviceClass = 1;
@@ -81,7 +81,7 @@ TEST_F(RadioHidlTest, getFacilityLockForApp) {
81 * Test IRadio.setFacilityLockForApp() for the response returned. 81 * Test IRadio.setFacilityLockForApp() for the response returned.
82 */ 82 */
83TEST_F(RadioHidlTest, setFacilityLockForApp) { 83TEST_F(RadioHidlTest, setFacilityLockForApp) {
84 int serial = GetRandomSerialNumber(); 84 serial = GetRandomSerialNumber();
85 std::string facility = ""; 85 std::string facility = "";
86 bool lockState = false; 86 bool lockState = false;
87 std::string password = ""; 87 std::string password = "";
@@ -105,7 +105,7 @@ TEST_F(RadioHidlTest, setFacilityLockForApp) {
105 * Test IRadio.setBarringPassword() for the response returned. 105 * Test IRadio.setBarringPassword() for the response returned.
106 */ 106 */
107TEST_F(RadioHidlTest, setBarringPassword) { 107TEST_F(RadioHidlTest, setBarringPassword) {
108 int serial = GetRandomSerialNumber(); 108 serial = GetRandomSerialNumber();
109 std::string facility = ""; 109 std::string facility = "";
110 std::string oldPassword = ""; 110 std::string oldPassword = "";
111 std::string newPassword = ""; 111 std::string newPassword = "";
@@ -128,7 +128,7 @@ TEST_F(RadioHidlTest, setBarringPassword) {
128 * Test IRadio.getClip() for the response returned. 128 * Test IRadio.getClip() for the response returned.
129 */ 129 */
130TEST_F(RadioHidlTest, getClip) { 130TEST_F(RadioHidlTest, getClip) {
131 int serial = GetRandomSerialNumber(); 131 serial = GetRandomSerialNumber();
132 132
133 radio->getClip(serial); 133 radio->getClip(serial);
134 134
@@ -146,7 +146,7 @@ TEST_F(RadioHidlTest, getClip) {
146 * Test IRadio.setSuppServiceNotifications() for the response returned. 146 * Test IRadio.setSuppServiceNotifications() for the response returned.
147 */ 147 */
148TEST_F(RadioHidlTest, setSuppServiceNotifications) { 148TEST_F(RadioHidlTest, setSuppServiceNotifications) {
149 int serial = GetRandomSerialNumber(); 149 serial = GetRandomSerialNumber();
150 bool enable = false; 150 bool enable = false;
151 151
152 radio->setSuppServiceNotifications(serial, enable); 152 radio->setSuppServiceNotifications(serial, enable);
@@ -165,7 +165,7 @@ TEST_F(RadioHidlTest, setSuppServiceNotifications) {
165 * Test IRadio.requestIsimAuthentication() for the response returned. 165 * Test IRadio.requestIsimAuthentication() for the response returned.
166 */ 166 */
167TEST_F(RadioHidlTest, requestIsimAuthentication) { 167TEST_F(RadioHidlTest, requestIsimAuthentication) {
168 int serial = GetRandomSerialNumber(); 168 serial = GetRandomSerialNumber();
169 std::string challenge = ""; 169 std::string challenge = "";
170 170
171 radio->requestIsimAuthentication(serial, challenge); 171 radio->requestIsimAuthentication(serial, challenge);
@@ -187,7 +187,7 @@ TEST_F(RadioHidlTest, requestIsimAuthentication) {
187 * Test IRadio.getImsRegistrationState() for the response returned. 187 * Test IRadio.getImsRegistrationState() for the response returned.
188 */ 188 */
189TEST_F(RadioHidlTest, getImsRegistrationState) { 189TEST_F(RadioHidlTest, getImsRegistrationState) {
190 int serial = GetRandomSerialNumber(); 190 serial = GetRandomSerialNumber();
191 191
192 radio->getImsRegistrationState(serial); 192 radio->getImsRegistrationState(serial);
193 193
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp b/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp
index cb0a7302..bc03cf19 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp
@@ -20,7 +20,7 @@
20 * Test IRadio.getSignalStrength() for the response returned. 20 * Test IRadio.getSignalStrength() for the response returned.
21 */ 21 */
22TEST_F(RadioHidlTest, getSignalStrength) { 22TEST_F(RadioHidlTest, getSignalStrength) {
23 int serial = GetRandomSerialNumber(); 23 serial = GetRandomSerialNumber();
24 24
25 radio->getSignalStrength(serial); 25 radio->getSignalStrength(serial);
26 EXPECT_EQ(std::cv_status::no_timeout, wait()); 26 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -36,7 +36,7 @@ TEST_F(RadioHidlTest, getSignalStrength) {
36 * Test IRadio.getVoiceRegistrationState() for the response returned. 36 * Test IRadio.getVoiceRegistrationState() for the response returned.
37 */ 37 */
38TEST_F(RadioHidlTest, getVoiceRegistrationState) { 38TEST_F(RadioHidlTest, getVoiceRegistrationState) {
39 int serial = GetRandomSerialNumber(); 39 serial = GetRandomSerialNumber();
40 40
41 radio->getVoiceRegistrationState(serial); 41 radio->getVoiceRegistrationState(serial);
42 EXPECT_EQ(std::cv_status::no_timeout, wait()); 42 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -52,7 +52,7 @@ TEST_F(RadioHidlTest, getVoiceRegistrationState) {
52 * Test IRadio.getOperator() for the response returned. 52 * Test IRadio.getOperator() for the response returned.
53 */ 53 */
54TEST_F(RadioHidlTest, getOperator) { 54TEST_F(RadioHidlTest, getOperator) {
55 int serial = GetRandomSerialNumber(); 55 serial = GetRandomSerialNumber();
56 56
57 radio->getOperator(serial); 57 radio->getOperator(serial);
58 EXPECT_EQ(std::cv_status::no_timeout, wait()); 58 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -68,7 +68,7 @@ TEST_F(RadioHidlTest, getOperator) {
68 * Test IRadio.setRadioPower() for the response returned. 68 * Test IRadio.setRadioPower() for the response returned.
69 */ 69 */
70TEST_F(RadioHidlTest, setRadioPower) { 70TEST_F(RadioHidlTest, setRadioPower) {
71 int serial = GetRandomSerialNumber(); 71 serial = GetRandomSerialNumber();
72 72
73 radio->setRadioPower(serial, 1); 73 radio->setRadioPower(serial, 1);
74 EXPECT_EQ(std::cv_status::no_timeout, wait()); 74 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -84,7 +84,7 @@ TEST_F(RadioHidlTest, setRadioPower) {
84 * Test IRadio.getNetworkSelectionMode() for the response returned. 84 * Test IRadio.getNetworkSelectionMode() for the response returned.
85 */ 85 */
86TEST_F(RadioHidlTest, getNetworkSelectionMode) { 86TEST_F(RadioHidlTest, getNetworkSelectionMode) {
87 int serial = GetRandomSerialNumber(); 87 serial = GetRandomSerialNumber();
88 88
89 radio->getNetworkSelectionMode(serial); 89 radio->getNetworkSelectionMode(serial);
90 EXPECT_EQ(std::cv_status::no_timeout, wait()); 90 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -100,7 +100,7 @@ TEST_F(RadioHidlTest, getNetworkSelectionMode) {
100 * Test IRadio.setNetworkSelectionModeAutomatic() for the response returned. 100 * Test IRadio.setNetworkSelectionModeAutomatic() for the response returned.
101 */ 101 */
102TEST_F(RadioHidlTest, setNetworkSelectionModeAutomatic) { 102TEST_F(RadioHidlTest, setNetworkSelectionModeAutomatic) {
103 int serial = GetRandomSerialNumber(); 103 serial = GetRandomSerialNumber();
104 104
105 radio->setNetworkSelectionModeAutomatic(serial); 105 radio->setNetworkSelectionModeAutomatic(serial);
106 EXPECT_EQ(std::cv_status::no_timeout, wait()); 106 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -119,7 +119,7 @@ TEST_F(RadioHidlTest, setNetworkSelectionModeAutomatic) {
119 * Test IRadio.setNetworkSelectionModeManual() for the response returned. 119 * Test IRadio.setNetworkSelectionModeManual() for the response returned.
120 */ 120 */
121TEST_F(RadioHidlTest, setNetworkSelectionModeManual) { 121TEST_F(RadioHidlTest, setNetworkSelectionModeManual) {
122 int serial = GetRandomSerialNumber(); 122 serial = GetRandomSerialNumber();
123 123
124 radio->setNetworkSelectionModeManual(serial, "123456"); 124 radio->setNetworkSelectionModeManual(serial, "123456");
125 EXPECT_EQ(std::cv_status::no_timeout, wait()); 125 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -138,7 +138,7 @@ TEST_F(RadioHidlTest, setNetworkSelectionModeManual) {
138 * Test IRadio.getAvailableNetworks() for the response returned. 138 * Test IRadio.getAvailableNetworks() for the response returned.
139 */ 139 */
140TEST_F(RadioHidlTest, getAvailableNetworks) { 140TEST_F(RadioHidlTest, getAvailableNetworks) {
141 int serial = GetRandomSerialNumber(); 141 serial = GetRandomSerialNumber();
142 142
143 radio->getAvailableNetworks(serial); 143 radio->getAvailableNetworks(serial);
144 EXPECT_EQ(std::cv_status::no_timeout, wait(300)); 144 EXPECT_EQ(std::cv_status::no_timeout, wait(300));
@@ -159,7 +159,7 @@ TEST_F(RadioHidlTest, getAvailableNetworks) {
159 * Test IRadio.getBasebandVersion() for the response returned. 159 * Test IRadio.getBasebandVersion() for the response returned.
160 */ 160 */
161TEST_F(RadioHidlTest, getBasebandVersion) { 161TEST_F(RadioHidlTest, getBasebandVersion) {
162 int serial = GetRandomSerialNumber(); 162 serial = GetRandomSerialNumber();
163 163
164 radio->getBasebandVersion(serial); 164 radio->getBasebandVersion(serial);
165 EXPECT_EQ(std::cv_status::no_timeout, wait()); 165 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -175,7 +175,7 @@ TEST_F(RadioHidlTest, getBasebandVersion) {
175 * Test IRadio.setBandMode() for the response returned. 175 * Test IRadio.setBandMode() for the response returned.
176 */ 176 */
177TEST_F(RadioHidlTest, setBandMode) { 177TEST_F(RadioHidlTest, setBandMode) {
178 int serial = GetRandomSerialNumber(); 178 serial = GetRandomSerialNumber();
179 179
180 radio->setBandMode(serial, RadioBandMode::BAND_MODE_USA); 180 radio->setBandMode(serial, RadioBandMode::BAND_MODE_USA);
181 EXPECT_EQ(std::cv_status::no_timeout, wait()); 181 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -192,7 +192,7 @@ TEST_F(RadioHidlTest, setBandMode) {
192 * Test IRadio.getAvailableBandModes() for the response returned. 192 * Test IRadio.getAvailableBandModes() for the response returned.
193 */ 193 */
194TEST_F(RadioHidlTest, getAvailableBandModes) { 194TEST_F(RadioHidlTest, getAvailableBandModes) {
195 int serial = GetRandomSerialNumber(); 195 serial = GetRandomSerialNumber();
196 196
197 radio->getAvailableBandModes(serial); 197 radio->getAvailableBandModes(serial);
198 EXPECT_EQ(std::cv_status::no_timeout, wait()); 198 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -208,7 +208,7 @@ TEST_F(RadioHidlTest, getAvailableBandModes) {
208 * Test IRadio.setPreferredNetworkType() for the response returned. 208 * Test IRadio.setPreferredNetworkType() for the response returned.
209 */ 209 */
210TEST_F(RadioHidlTest, setPreferredNetworkType) { 210TEST_F(RadioHidlTest, setPreferredNetworkType) {
211 int serial = GetRandomSerialNumber(); 211 serial = GetRandomSerialNumber();
212 212
213 radio->setPreferredNetworkType(serial, PreferredNetworkType::GSM_ONLY); 213 radio->setPreferredNetworkType(serial, PreferredNetworkType::GSM_ONLY);
214 EXPECT_EQ(std::cv_status::no_timeout, wait()); 214 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -225,7 +225,7 @@ TEST_F(RadioHidlTest, setPreferredNetworkType) {
225 * Test IRadio.getPreferredNetworkType() for the response returned. 225 * Test IRadio.getPreferredNetworkType() for the response returned.
226 */ 226 */
227TEST_F(RadioHidlTest, getPreferredNetworkType) { 227TEST_F(RadioHidlTest, getPreferredNetworkType) {
228 int serial = GetRandomSerialNumber(); 228 serial = GetRandomSerialNumber();
229 229
230 radio->getPreferredNetworkType(serial); 230 radio->getPreferredNetworkType(serial);
231 EXPECT_EQ(std::cv_status::no_timeout, wait()); 231 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -241,7 +241,7 @@ TEST_F(RadioHidlTest, getPreferredNetworkType) {
241 * Test IRadio.getNeighboringCids() for the response returned. 241 * Test IRadio.getNeighboringCids() for the response returned.
242 */ 242 */
243TEST_F(RadioHidlTest, getNeighboringCids) { 243TEST_F(RadioHidlTest, getNeighboringCids) {
244 int serial = GetRandomSerialNumber(); 244 serial = GetRandomSerialNumber();
245 245
246 radio->getNeighboringCids(serial); 246 radio->getNeighboringCids(serial);
247 EXPECT_EQ(std::cv_status::no_timeout, wait()); 247 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -259,7 +259,7 @@ TEST_F(RadioHidlTest, getNeighboringCids) {
259 * Test IRadio.setLocationUpdates() for the response returned. 259 * Test IRadio.setLocationUpdates() for the response returned.
260 */ 260 */
261TEST_F(RadioHidlTest, setLocationUpdates) { 261TEST_F(RadioHidlTest, setLocationUpdates) {
262 int serial = GetRandomSerialNumber(); 262 serial = GetRandomSerialNumber();
263 263
264 radio->setLocationUpdates(serial, true); 264 radio->setLocationUpdates(serial, true);
265 EXPECT_EQ(std::cv_status::no_timeout, wait()); 265 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -276,7 +276,7 @@ TEST_F(RadioHidlTest, setLocationUpdates) {
276 * Test IRadio.setCdmaRoamingPreference() for the response returned. 276 * Test IRadio.setCdmaRoamingPreference() for the response returned.
277 */ 277 */
278TEST_F(RadioHidlTest, setCdmaRoamingPreference) { 278TEST_F(RadioHidlTest, setCdmaRoamingPreference) {
279 int serial = GetRandomSerialNumber(); 279 serial = GetRandomSerialNumber();
280 280
281 radio->setCdmaRoamingPreference(serial, CdmaRoamingType::HOME_NETWORK); 281 radio->setCdmaRoamingPreference(serial, CdmaRoamingType::HOME_NETWORK);
282 EXPECT_EQ(std::cv_status::no_timeout, wait()); 282 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -294,7 +294,7 @@ TEST_F(RadioHidlTest, setCdmaRoamingPreference) {
294 * Test IRadio.getCdmaRoamingPreference() for the response returned. 294 * Test IRadio.getCdmaRoamingPreference() for the response returned.
295 */ 295 */
296TEST_F(RadioHidlTest, getCdmaRoamingPreference) { 296TEST_F(RadioHidlTest, getCdmaRoamingPreference) {
297 int serial = GetRandomSerialNumber(); 297 serial = GetRandomSerialNumber();
298 298
299 radio->getCdmaRoamingPreference(serial); 299 radio->getCdmaRoamingPreference(serial);
300 EXPECT_EQ(std::cv_status::no_timeout, wait()); 300 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -313,7 +313,7 @@ TEST_F(RadioHidlTest, getCdmaRoamingPreference) {
313 * Test IRadio.getTTYMode() for the response returned. 313 * Test IRadio.getTTYMode() for the response returned.
314 */ 314 */
315TEST_F(RadioHidlTest, getTTYMode) { 315TEST_F(RadioHidlTest, getTTYMode) {
316 int serial = GetRandomSerialNumber(); 316 serial = GetRandomSerialNumber();
317 317
318 radio->getTTYMode(serial); 318 radio->getTTYMode(serial);
319 EXPECT_EQ(std::cv_status::no_timeout, wait()); 319 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -329,7 +329,7 @@ TEST_F(RadioHidlTest, getTTYMode) {
329 * Test IRadio.setTTYMode() for the response returned. 329 * Test IRadio.setTTYMode() for the response returned.
330 */ 330 */
331TEST_F(RadioHidlTest, setTTYMode) { 331TEST_F(RadioHidlTest, setTTYMode) {
332 int serial = GetRandomSerialNumber(); 332 serial = GetRandomSerialNumber();
333 333
334 radio->setTTYMode(serial, TtyMode::OFF); 334 radio->setTTYMode(serial, TtyMode::OFF);
335 EXPECT_EQ(std::cv_status::no_timeout, wait()); 335 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -345,7 +345,7 @@ TEST_F(RadioHidlTest, setTTYMode) {
345 * Test IRadio.setPreferredVoicePrivacy() for the response returned. 345 * Test IRadio.setPreferredVoicePrivacy() for the response returned.
346 */ 346 */
347TEST_F(RadioHidlTest, setPreferredVoicePrivacy) { 347TEST_F(RadioHidlTest, setPreferredVoicePrivacy) {
348 int serial = GetRandomSerialNumber(); 348 serial = GetRandomSerialNumber();
349 349
350 radio->setPreferredVoicePrivacy(serial, true); 350 radio->setPreferredVoicePrivacy(serial, true);
351 EXPECT_EQ(std::cv_status::no_timeout, wait()); 351 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -362,7 +362,7 @@ TEST_F(RadioHidlTest, setPreferredVoicePrivacy) {
362 * Test IRadio.getPreferredVoicePrivacy() for the response returned. 362 * Test IRadio.getPreferredVoicePrivacy() for the response returned.
363 */ 363 */
364TEST_F(RadioHidlTest, getPreferredVoicePrivacy) { 364TEST_F(RadioHidlTest, getPreferredVoicePrivacy) {
365 int serial = GetRandomSerialNumber(); 365 serial = GetRandomSerialNumber();
366 366
367 radio->getPreferredVoicePrivacy(serial); 367 radio->getPreferredVoicePrivacy(serial);
368 EXPECT_EQ(std::cv_status::no_timeout, wait()); 368 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -379,7 +379,7 @@ TEST_F(RadioHidlTest, getPreferredVoicePrivacy) {
379 * Test IRadio.getCDMASubscription() for the response returned. 379 * Test IRadio.getCDMASubscription() for the response returned.
380 */ 380 */
381TEST_F(RadioHidlTest, getCDMASubscription) { 381TEST_F(RadioHidlTest, getCDMASubscription) {
382 int serial = GetRandomSerialNumber(); 382 serial = GetRandomSerialNumber();
383 383
384 radio->getCDMASubscription(serial); 384 radio->getCDMASubscription(serial);
385 EXPECT_EQ(std::cv_status::no_timeout, wait()); 385 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -397,7 +397,7 @@ TEST_F(RadioHidlTest, getCDMASubscription) {
397 * Test IRadio.getDeviceIdentity() for the response returned. 397 * Test IRadio.getDeviceIdentity() for the response returned.
398 */ 398 */
399TEST_F(RadioHidlTest, getDeviceIdentity) { 399TEST_F(RadioHidlTest, getDeviceIdentity) {
400 int serial = GetRandomSerialNumber(); 400 serial = GetRandomSerialNumber();
401 401
402 radio->getDeviceIdentity(serial); 402 radio->getDeviceIdentity(serial);
403 EXPECT_EQ(std::cv_status::no_timeout, wait()); 403 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -414,7 +414,7 @@ TEST_F(RadioHidlTest, getDeviceIdentity) {
414 * Test IRadio.exitEmergencyCallbackMode() for the response returned. 414 * Test IRadio.exitEmergencyCallbackMode() for the response returned.
415 */ 415 */
416TEST_F(RadioHidlTest, exitEmergencyCallbackMode) { 416TEST_F(RadioHidlTest, exitEmergencyCallbackMode) {
417 int serial = GetRandomSerialNumber(); 417 serial = GetRandomSerialNumber();
418 418
419 radio->exitEmergencyCallbackMode(serial); 419 radio->exitEmergencyCallbackMode(serial);
420 EXPECT_EQ(std::cv_status::no_timeout, wait()); 420 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -432,7 +432,7 @@ TEST_F(RadioHidlTest, exitEmergencyCallbackMode) {
432 * Test IRadio.getCdmaSubscriptionSource() for the response returned. 432 * Test IRadio.getCdmaSubscriptionSource() for the response returned.
433 */ 433 */
434TEST_F(RadioHidlTest, getCdmaSubscriptionSource) { 434TEST_F(RadioHidlTest, getCdmaSubscriptionSource) {
435 int serial = GetRandomSerialNumber(); 435 serial = GetRandomSerialNumber();
436 436
437 radio->getCdmaSubscriptionSource(serial); 437 radio->getCdmaSubscriptionSource(serial);
438 EXPECT_EQ(std::cv_status::no_timeout, wait()); 438 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -450,7 +450,7 @@ TEST_F(RadioHidlTest, getCdmaSubscriptionSource) {
450 * Test IRadio.setCdmaSubscriptionSource() for the response returned. 450 * Test IRadio.setCdmaSubscriptionSource() for the response returned.
451 */ 451 */
452TEST_F(RadioHidlTest, setCdmaSubscriptionSource) { 452TEST_F(RadioHidlTest, setCdmaSubscriptionSource) {
453 int serial = GetRandomSerialNumber(); 453 serial = GetRandomSerialNumber();
454 454
455 radio->setCdmaSubscriptionSource(serial, CdmaSubscriptionSource::RUIM_SIM); 455 radio->setCdmaSubscriptionSource(serial, CdmaSubscriptionSource::RUIM_SIM);
456 EXPECT_EQ(std::cv_status::no_timeout, wait()); 456 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -469,7 +469,7 @@ TEST_F(RadioHidlTest, setCdmaSubscriptionSource) {
469 * Test IRadio.getVoiceRadioTechnology() for the response returned. 469 * Test IRadio.getVoiceRadioTechnology() for the response returned.
470 */ 470 */
471TEST_F(RadioHidlTest, getVoiceRadioTechnology) { 471TEST_F(RadioHidlTest, getVoiceRadioTechnology) {
472 int serial = GetRandomSerialNumber(); 472 serial = GetRandomSerialNumber();
473 473
474 radio->getVoiceRadioTechnology(serial); 474 radio->getVoiceRadioTechnology(serial);
475 EXPECT_EQ(std::cv_status::no_timeout, wait()); 475 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -485,7 +485,7 @@ TEST_F(RadioHidlTest, getVoiceRadioTechnology) {
485 * Test IRadio.getCellInfoList() for the response returned. 485 * Test IRadio.getCellInfoList() for the response returned.
486 */ 486 */
487TEST_F(RadioHidlTest, getCellInfoList) { 487TEST_F(RadioHidlTest, getCellInfoList) {
488 int serial = GetRandomSerialNumber(); 488 serial = GetRandomSerialNumber();
489 489
490 radio->getCellInfoList(serial); 490 radio->getCellInfoList(serial);
491 EXPECT_EQ(std::cv_status::no_timeout, wait()); 491 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -503,7 +503,7 @@ TEST_F(RadioHidlTest, getCellInfoList) {
503 * Test IRadio.setCellInfoListRate() for the response returned. 503 * Test IRadio.setCellInfoListRate() for the response returned.
504 */ 504 */
505TEST_F(RadioHidlTest, setCellInfoListRate) { 505TEST_F(RadioHidlTest, setCellInfoListRate) {
506 int serial = GetRandomSerialNumber(); 506 serial = GetRandomSerialNumber();
507 507
508 // TODO(sanketpadawe): RIL crashes with value of rate = 10 508 // TODO(sanketpadawe): RIL crashes with value of rate = 10
509 radio->setCellInfoListRate(serial, 10); 509 radio->setCellInfoListRate(serial, 10);
@@ -521,7 +521,7 @@ TEST_F(RadioHidlTest, setCellInfoListRate) {
521 * Test IRadio.nvReadItem() for the response returned. 521 * Test IRadio.nvReadItem() for the response returned.
522 */ 522 */
523TEST_F(RadioHidlTest, nvReadItem) { 523TEST_F(RadioHidlTest, nvReadItem) {
524 int serial = GetRandomSerialNumber(); 524 serial = GetRandomSerialNumber();
525 525
526 radio->nvReadItem(serial, NvItem::LTE_BAND_ENABLE_25); 526 radio->nvReadItem(serial, NvItem::LTE_BAND_ENABLE_25);
527 EXPECT_EQ(std::cv_status::no_timeout, wait()); 527 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -538,7 +538,7 @@ TEST_F(RadioHidlTest, nvReadItem) {
538 * Test IRadio.nvWriteItem() for the response returned. 538 * Test IRadio.nvWriteItem() for the response returned.
539 */ 539 */
540TEST_F(RadioHidlTest, nvWriteItem) { 540TEST_F(RadioHidlTest, nvWriteItem) {
541 int serial = GetRandomSerialNumber(); 541 serial = GetRandomSerialNumber();
542 NvWriteItem item; 542 NvWriteItem item;
543 memset(&item, 0, sizeof(item)); 543 memset(&item, 0, sizeof(item));
544 item.value = hidl_string(); 544 item.value = hidl_string();
@@ -558,7 +558,7 @@ TEST_F(RadioHidlTest, nvWriteItem) {
558 * Test IRadio.nvWriteCdmaPrl() for the response returned. 558 * Test IRadio.nvWriteCdmaPrl() for the response returned.
559 */ 559 */
560TEST_F(RadioHidlTest, nvWriteCdmaPrl) { 560TEST_F(RadioHidlTest, nvWriteCdmaPrl) {
561 int serial = GetRandomSerialNumber(); 561 serial = GetRandomSerialNumber();
562 std::vector<uint8_t> prl = {1, 2, 3, 4, 5}; 562 std::vector<uint8_t> prl = {1, 2, 3, 4, 5};
563 563
564 radio->nvWriteCdmaPrl(serial, hidl_vec<uint8_t>(prl)); 564 radio->nvWriteCdmaPrl(serial, hidl_vec<uint8_t>(prl));
@@ -576,9 +576,9 @@ TEST_F(RadioHidlTest, nvWriteCdmaPrl) {
576 * Test IRadio.nvResetConfig() for the response returned. 576 * Test IRadio.nvResetConfig() for the response returned.
577 */ 577 */
578TEST_F(RadioHidlTest, nvResetConfig) { 578TEST_F(RadioHidlTest, nvResetConfig) {
579 int serial = GetRandomSerialNumber(); 579 serial = GetRandomSerialNumber();
580 580
581 radio->nvResetConfig(++serial, ResetNvType::ERASE); 581 radio->nvResetConfig(serial, ResetNvType::ERASE);
582 EXPECT_EQ(std::cv_status::no_timeout, wait()); 582 EXPECT_EQ(std::cv_status::no_timeout, wait());
583 EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type); 583 EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
584 EXPECT_EQ(serial, radioRsp->rspInfo.serial); 584 EXPECT_EQ(serial, radioRsp->rspInfo.serial);
@@ -593,7 +593,7 @@ TEST_F(RadioHidlTest, nvResetConfig) {
593 * Test IRadio.setUiccSubscription() for the response returned. 593 * Test IRadio.setUiccSubscription() for the response returned.
594 */ 594 */
595TEST_F(RadioHidlTest, setUiccSubscription) { 595TEST_F(RadioHidlTest, setUiccSubscription) {
596 int serial = GetRandomSerialNumber(); 596 serial = GetRandomSerialNumber();
597 SelectUiccSub item; 597 SelectUiccSub item;
598 memset(&item, 0, sizeof(item)); 598 memset(&item, 0, sizeof(item));
599 599
@@ -615,7 +615,7 @@ TEST_F(RadioHidlTest, setUiccSubscription) {
615 * Test IRadio.getHardwareConfig() for the response returned. 615 * Test IRadio.getHardwareConfig() for the response returned.
616 */ 616 */
617TEST_F(RadioHidlTest, getHardwareConfig) { 617TEST_F(RadioHidlTest, getHardwareConfig) {
618 int serial = GetRandomSerialNumber(); 618 serial = GetRandomSerialNumber();
619 619
620 radio->getHardwareConfig(serial); 620 radio->getHardwareConfig(serial);
621 EXPECT_EQ(std::cv_status::no_timeout, wait()); 621 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -632,7 +632,7 @@ TEST_F(RadioHidlTest, getHardwareConfig) {
632 * Test IRadio.requestShutdown() for the response returned. 632 * Test IRadio.requestShutdown() for the response returned.
633 */ 633 */
634TEST_F(RadioHidlTest, requestShutdown) { 634TEST_F(RadioHidlTest, requestShutdown) {
635 int serial = GetRandomSerialNumber(); 635 serial = GetRandomSerialNumber();
636 636
637 radio->requestShutdown(serial); 637 radio->requestShutdown(serial);
638 EXPECT_EQ(std::cv_status::no_timeout, wait()); 638 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -649,7 +649,7 @@ TEST_F(RadioHidlTest, requestShutdown) {
649 * Test IRadio.getRadioCapability() for the response returned. 649 * Test IRadio.getRadioCapability() for the response returned.
650 */ 650 */
651TEST_F(RadioHidlTest, getRadioCapability) { 651TEST_F(RadioHidlTest, getRadioCapability) {
652 int serial = GetRandomSerialNumber(); 652 serial = GetRandomSerialNumber();
653 653
654 radio->getRadioCapability(serial); 654 radio->getRadioCapability(serial);
655 EXPECT_EQ(std::cv_status::no_timeout, wait()); 655 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -665,7 +665,7 @@ TEST_F(RadioHidlTest, getRadioCapability) {
665 * Test IRadio.setRadioCapability() for the response returned. 665 * Test IRadio.setRadioCapability() for the response returned.
666 */ 666 */
667TEST_F(RadioHidlTest, setRadioCapability) { 667TEST_F(RadioHidlTest, setRadioCapability) {
668 int serial = GetRandomSerialNumber(); 668 serial = GetRandomSerialNumber();
669 RadioCapability rc; 669 RadioCapability rc;
670 memset(&rc, 0, sizeof(rc)); 670 memset(&rc, 0, sizeof(rc));
671 rc.logicalModemUuid = hidl_string(); 671 rc.logicalModemUuid = hidl_string();
@@ -686,7 +686,7 @@ TEST_F(RadioHidlTest, setRadioCapability) {
686 * Test IRadio.startLceService() for the response returned. 686 * Test IRadio.startLceService() for the response returned.
687 */ 687 */
688TEST_F(RadioHidlTest, startLceService) { 688TEST_F(RadioHidlTest, startLceService) {
689 int serial = GetRandomSerialNumber(); 689 serial = GetRandomSerialNumber();
690 690
691 radio->startLceService(serial, 5, true); 691 radio->startLceService(serial, 5, true);
692 EXPECT_EQ(std::cv_status::no_timeout, wait()); 692 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -704,7 +704,7 @@ TEST_F(RadioHidlTest, startLceService) {
704 * Test IRadio.stopLceService() for the response returned. 704 * Test IRadio.stopLceService() for the response returned.
705 */ 705 */
706TEST_F(RadioHidlTest, stopLceService) { 706TEST_F(RadioHidlTest, stopLceService) {
707 int serial = GetRandomSerialNumber(); 707 serial = GetRandomSerialNumber();
708 708
709 radio->stopLceService(serial); 709 radio->stopLceService(serial);
710 EXPECT_EQ(std::cv_status::no_timeout, wait()); 710 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -722,7 +722,7 @@ TEST_F(RadioHidlTest, stopLceService) {
722 * Test IRadio.pullLceData() for the response returned. 722 * Test IRadio.pullLceData() for the response returned.
723 */ 723 */
724TEST_F(RadioHidlTest, pullLceData) { 724TEST_F(RadioHidlTest, pullLceData) {
725 int serial = GetRandomSerialNumber(); 725 serial = GetRandomSerialNumber();
726 726
727 radio->pullLceData(serial); 727 radio->pullLceData(serial);
728 EXPECT_EQ(std::cv_status::no_timeout, wait()); 728 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -741,7 +741,7 @@ TEST_F(RadioHidlTest, pullLceData) {
741 * Test IRadio.getModemActivityInfo() for the response returned. 741 * Test IRadio.getModemActivityInfo() for the response returned.
742 */ 742 */
743TEST_F(RadioHidlTest, getModemActivityInfo) { 743TEST_F(RadioHidlTest, getModemActivityInfo) {
744 int serial = GetRandomSerialNumber(); 744 serial = GetRandomSerialNumber();
745 745
746 radio->getModemActivityInfo(serial); 746 radio->getModemActivityInfo(serial);
747 EXPECT_EQ(std::cv_status::no_timeout, wait()); 747 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -758,7 +758,7 @@ TEST_F(RadioHidlTest, getModemActivityInfo) {
758 * Test IRadio.setAllowedCarriers() for the response returned. 758 * Test IRadio.setAllowedCarriers() for the response returned.
759 */ 759 */
760TEST_F(RadioHidlTest, setAllowedCarriers) { 760TEST_F(RadioHidlTest, setAllowedCarriers) {
761 int serial = GetRandomSerialNumber(); 761 serial = GetRandomSerialNumber();
762 CarrierRestrictions carriers; 762 CarrierRestrictions carriers;
763 memset(&carriers, 0, sizeof(carriers)); 763 memset(&carriers, 0, sizeof(carriers));
764 carriers.allowedCarriers.resize(1); 764 carriers.allowedCarriers.resize(1);
@@ -778,12 +778,26 @@ TEST_F(RadioHidlTest, setAllowedCarriers) {
778 {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED})); 778 {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
779 } 779 }
780 780
781 /* Setting to carrier restriction needs some time */
782 updateSimCardStatus();
783 auto startTime = std::chrono::system_clock::now();
784 while (cardStatus.cardState != CardState::RESTRICTED &&
785 std::chrono::duration_cast<chrono::seconds>(std::chrono::system_clock::now() - startTime)
786 .count() < 10) {
787 /* Set 2 seconds as interval to check card status */
788 sleep(2);
789 updateSimCardStatus();
790 }
791 EXPECT_EQ(CardState::RESTRICTED, cardStatus.cardState);
792 sleep(10);
793
781 /* Reset back to no carrier restriction */ 794 /* Reset back to no carrier restriction */
782 memset(&carriers, 0, sizeof(carriers)); 795 memset(&carriers, 0, sizeof(carriers));
783 carriers.allowedCarriers.resize(0); 796 carriers.allowedCarriers.resize(0);
784 carriers.excludedCarriers.resize(0); 797 carriers.excludedCarriers.resize(0);
785 798
786 radio->setAllowedCarriers(++serial, true, carriers); 799 serial = GetRandomSerialNumber();
800 radio->setAllowedCarriers(serial, true, carriers);
787 EXPECT_EQ(std::cv_status::no_timeout, wait()); 801 EXPECT_EQ(std::cv_status::no_timeout, wait());
788 EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type); 802 EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
789 EXPECT_EQ(serial, radioRsp->rspInfo.serial); 803 EXPECT_EQ(serial, radioRsp->rspInfo.serial);
@@ -792,13 +806,26 @@ TEST_F(RadioHidlTest, setAllowedCarriers) {
792 ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error, 806 ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
793 {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED})); 807 {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
794 } 808 }
809
810 /* Resetting back to no carrier restriction needs some time */
811 updateSimCardStatus();
812 startTime = std::chrono::system_clock::now();
813 while (cardStatus.cardState == CardState::RESTRICTED &&
814 std::chrono::duration_cast<chrono::seconds>(std::chrono::system_clock::now() - startTime)
815 .count() < 10) {
816 /* Set 2 seconds as interval to check card status */
817 sleep(2);
818 updateSimCardStatus();
819 }
820 EXPECT_NE(CardState::RESTRICTED, cardStatus.cardState);
821 sleep(10);
795} 822}
796 823
797/* 824/*
798 * Test IRadio.getAllowedCarriers() for the response returned. 825 * Test IRadio.getAllowedCarriers() for the response returned.
799 */ 826 */
800TEST_F(RadioHidlTest, getAllowedCarriers) { 827TEST_F(RadioHidlTest, getAllowedCarriers) {
801 int serial = GetRandomSerialNumber(); 828 serial = GetRandomSerialNumber();
802 829
803 radio->getAllowedCarriers(serial); 830 radio->getAllowedCarriers(serial);
804 EXPECT_EQ(std::cv_status::no_timeout, wait()); 831 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -815,7 +842,7 @@ TEST_F(RadioHidlTest, getAllowedCarriers) {
815 * Test IRadio.sendDeviceState() for the response returned. 842 * Test IRadio.sendDeviceState() for the response returned.
816 */ 843 */
817TEST_F(RadioHidlTest, sendDeviceState) { 844TEST_F(RadioHidlTest, sendDeviceState) {
818 int serial = GetRandomSerialNumber(); 845 serial = GetRandomSerialNumber();
819 846
820 radio->sendDeviceState(serial, DeviceStateType::POWER_SAVE_MODE, true); 847 radio->sendDeviceState(serial, DeviceStateType::POWER_SAVE_MODE, true);
821 EXPECT_EQ(std::cv_status::no_timeout, wait()); 848 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -834,7 +861,7 @@ TEST_F(RadioHidlTest, sendDeviceState) {
834 * Test IRadio.setIndicationFilter() for the response returned. 861 * Test IRadio.setIndicationFilter() for the response returned.
835 */ 862 */
836TEST_F(RadioHidlTest, setIndicationFilter) { 863TEST_F(RadioHidlTest, setIndicationFilter) {
837 int serial = GetRandomSerialNumber(); 864 serial = GetRandomSerialNumber();
838 865
839 radio->setIndicationFilter(serial, 1); 866 radio->setIndicationFilter(serial, 1);
840 EXPECT_EQ(std::cv_status::no_timeout, wait()); 867 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -853,7 +880,7 @@ TEST_F(RadioHidlTest, setIndicationFilter) {
853 * Test IRadio.setSimCardPower() for the response returned. 880 * Test IRadio.setSimCardPower() for the response returned.
854 */ 881 */
855TEST_F(RadioHidlTest, setSimCardPower) { 882TEST_F(RadioHidlTest, setSimCardPower) {
856 int serial = GetRandomSerialNumber(); 883 serial = GetRandomSerialNumber();
857 884
858 radio->setSimCardPower(serial, true); 885 radio->setSimCardPower(serial, true);
859 EXPECT_EQ(std::cv_status::no_timeout, wait()); 886 EXPECT_EQ(std::cv_status::no_timeout, wait());
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_sms.cpp b/radio/1.0/vts/functional/radio_hidl_hal_sms.cpp
index 469f03ae..9e414296 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_sms.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_sms.cpp
@@ -22,14 +22,14 @@ using namespace ::android::hardware::radio::V1_0;
22 * Test IRadio.sendSms() for the response returned. 22 * Test IRadio.sendSms() for the response returned.
23 */ 23 */
24TEST_F(RadioHidlTest, sendSms) { 24TEST_F(RadioHidlTest, sendSms) {
25 int serial = GetRandomSerialNumber(); 25 serial = GetRandomSerialNumber();
26 GsmSmsMessage msg; 26 GsmSmsMessage msg;
27 msg.smscPdu = ""; 27 msg.smscPdu = "";
28 msg.pdu = "01000b916105770203f3000006d4f29c3e9b01"; 28 msg.pdu = "01000b916105770203f3000006d4f29c3e9b01";
29 29
30 radio->sendSms(serial, msg); 30 radio->sendSms(serial, msg);
31 31
32 EXPECT_EQ(std::cv_status::no_timeout, wait()); 32 EXPECT_EQ(std::cv_status::no_timeout, wait(300));
33 EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type); 33 EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
34 EXPECT_EQ(serial, radioRsp->rspInfo.serial); 34 EXPECT_EQ(serial, radioRsp->rspInfo.serial);
35 35
@@ -46,7 +46,7 @@ TEST_F(RadioHidlTest, sendSms) {
46 * Test IRadio.sendSMSExpectMore() for the response returned. 46 * Test IRadio.sendSMSExpectMore() for the response returned.
47 */ 47 */
48TEST_F(RadioHidlTest, sendSMSExpectMore) { 48TEST_F(RadioHidlTest, sendSMSExpectMore) {
49 int serial = GetRandomSerialNumber(); 49 serial = GetRandomSerialNumber();
50 GsmSmsMessage msg; 50 GsmSmsMessage msg;
51 msg.smscPdu = ""; 51 msg.smscPdu = "";
52 msg.pdu = "01000b916105770203f3000006d4f29c3e9b01"; 52 msg.pdu = "01000b916105770203f3000006d4f29c3e9b01";
@@ -56,7 +56,7 @@ TEST_F(RadioHidlTest, sendSMSExpectMore) {
56 // TODO(shuoq): add more test for this API when inserted sim card is 56 // TODO(shuoq): add more test for this API when inserted sim card is
57 // considered 57 // considered
58 58
59 EXPECT_EQ(std::cv_status::no_timeout, wait()); 59 EXPECT_EQ(std::cv_status::no_timeout, wait(300));
60 EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type); 60 EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
61 EXPECT_EQ(serial, radioRsp->rspInfo.serial); 61 EXPECT_EQ(serial, radioRsp->rspInfo.serial);
62 62
@@ -72,7 +72,7 @@ TEST_F(RadioHidlTest, sendSMSExpectMore) {
72 * Test IRadio.acknowledgeLastIncomingGsmSms() for the response returned. 72 * Test IRadio.acknowledgeLastIncomingGsmSms() for the response returned.
73 */ 73 */
74TEST_F(RadioHidlTest, acknowledgeLastIncomingGsmSms) { 74TEST_F(RadioHidlTest, acknowledgeLastIncomingGsmSms) {
75 int serial = GetRandomSerialNumber(); 75 serial = GetRandomSerialNumber();
76 bool success = true; 76 bool success = true;
77 77
78 radio->acknowledgeLastIncomingGsmSms(serial, success, 78 radio->acknowledgeLastIncomingGsmSms(serial, success,
@@ -93,7 +93,7 @@ TEST_F(RadioHidlTest, acknowledgeLastIncomingGsmSms) {
93 * Test IRadio.acknowledgeIncomingGsmSmsWithPdu() for the response returned. 93 * Test IRadio.acknowledgeIncomingGsmSmsWithPdu() for the response returned.
94 */ 94 */
95TEST_F(RadioHidlTest, acknowledgeIncomingGsmSmsWithPdu) { 95TEST_F(RadioHidlTest, acknowledgeIncomingGsmSmsWithPdu) {
96 int serial = GetRandomSerialNumber(); 96 serial = GetRandomSerialNumber();
97 bool success = true; 97 bool success = true;
98 std::string ackPdu = ""; 98 std::string ackPdu = "";
99 99
@@ -112,7 +112,7 @@ TEST_F(RadioHidlTest, acknowledgeIncomingGsmSmsWithPdu) {
112 * Test IRadio.sendCdmaSms() for the response returned. 112 * Test IRadio.sendCdmaSms() for the response returned.
113 */ 113 */
114TEST_F(RadioHidlTest, sendCdmaSms) { 114TEST_F(RadioHidlTest, sendCdmaSms) {
115 int serial = GetRandomSerialNumber(); 115 serial = GetRandomSerialNumber();
116 116
117 // Create a CdmaSmsAddress 117 // Create a CdmaSmsAddress
118 CdmaSmsAddress cdmaSmsAddress; 118 CdmaSmsAddress cdmaSmsAddress;
@@ -156,7 +156,7 @@ TEST_F(RadioHidlTest, sendCdmaSms) {
156 * Test IRadio.acknowledgeLastIncomingCdmaSms() for the response returned. 156 * Test IRadio.acknowledgeLastIncomingCdmaSms() for the response returned.
157 */ 157 */
158TEST_F(RadioHidlTest, acknowledgeLastIncomingCdmaSms) { 158TEST_F(RadioHidlTest, acknowledgeLastIncomingCdmaSms) {
159 int serial = GetRandomSerialNumber(); 159 serial = GetRandomSerialNumber();
160 160
161 // Create a CdmaSmsAck 161 // Create a CdmaSmsAck
162 CdmaSmsAck cdmaSmsAck; 162 CdmaSmsAck cdmaSmsAck;
@@ -180,7 +180,7 @@ TEST_F(RadioHidlTest, acknowledgeLastIncomingCdmaSms) {
180 * Test IRadio.sendImsSms() for the response returned. 180 * Test IRadio.sendImsSms() for the response returned.
181 */ 181 */
182TEST_F(RadioHidlTest, sendImsSms) { 182TEST_F(RadioHidlTest, sendImsSms) {
183 int serial = GetRandomSerialNumber(); 183 serial = GetRandomSerialNumber();
184 184
185 // Create a CdmaSmsAddress 185 // Create a CdmaSmsAddress
186 CdmaSmsAddress cdmaSmsAddress; 186 CdmaSmsAddress cdmaSmsAddress;
@@ -230,7 +230,7 @@ TEST_F(RadioHidlTest, sendImsSms) {
230 * Test IRadio.getSmscAddress() for the response returned. 230 * Test IRadio.getSmscAddress() for the response returned.
231 */ 231 */
232TEST_F(RadioHidlTest, getSmscAddress) { 232TEST_F(RadioHidlTest, getSmscAddress) {
233 int serial = GetRandomSerialNumber(); 233 serial = GetRandomSerialNumber();
234 234
235 radio->getSmscAddress(serial); 235 radio->getSmscAddress(serial);
236 236
@@ -250,7 +250,7 @@ TEST_F(RadioHidlTest, getSmscAddress) {
250 * Test IRadio.setSmscAddress() for the response returned. 250 * Test IRadio.setSmscAddress() for the response returned.
251 */ 251 */
252TEST_F(RadioHidlTest, setSmscAddress) { 252TEST_F(RadioHidlTest, setSmscAddress) {
253 int serial = GetRandomSerialNumber(); 253 serial = GetRandomSerialNumber();
254 hidl_string address = hidl_string("smscAddress"); 254 hidl_string address = hidl_string("smscAddress");
255 255
256 radio->setSmscAddress(serial, address); 256 radio->setSmscAddress(serial, address);
@@ -271,7 +271,7 @@ TEST_F(RadioHidlTest, setSmscAddress) {
271 * Test IRadio.writeSmsToSim() for the response returned. 271 * Test IRadio.writeSmsToSim() for the response returned.
272 */ 272 */
273TEST_F(RadioHidlTest, writeSmsToSim) { 273TEST_F(RadioHidlTest, writeSmsToSim) {
274 int serial = GetRandomSerialNumber(); 274 serial = GetRandomSerialNumber();
275 SmsWriteArgs smsWriteArgs; 275 SmsWriteArgs smsWriteArgs;
276 smsWriteArgs.status = SmsWriteArgsStatus::REC_UNREAD; 276 smsWriteArgs.status = SmsWriteArgsStatus::REC_UNREAD;
277 smsWriteArgs.smsc = ""; 277 smsWriteArgs.smsc = "";
@@ -297,7 +297,7 @@ TEST_F(RadioHidlTest, writeSmsToSim) {
297 * Test IRadio.deleteSmsOnSim() for the response returned. 297 * Test IRadio.deleteSmsOnSim() for the response returned.
298 */ 298 */
299TEST_F(RadioHidlTest, deleteSmsOnSim) { 299TEST_F(RadioHidlTest, deleteSmsOnSim) {
300 int serial = GetRandomSerialNumber(); 300 serial = GetRandomSerialNumber();
301 int index = 1; 301 int index = 1;
302 302
303 radio->deleteSmsOnSim(serial, index); 303 radio->deleteSmsOnSim(serial, index);
@@ -320,7 +320,7 @@ TEST_F(RadioHidlTest, deleteSmsOnSim) {
320 * Test IRadio.writeSmsToRuim() for the response returned. 320 * Test IRadio.writeSmsToRuim() for the response returned.
321 */ 321 */
322TEST_F(RadioHidlTest, writeSmsToRuim) { 322TEST_F(RadioHidlTest, writeSmsToRuim) {
323 int serial = GetRandomSerialNumber(); 323 serial = GetRandomSerialNumber();
324 324
325 // Create a CdmaSmsAddress 325 // Create a CdmaSmsAddress
326 CdmaSmsAddress cdmaSmsAddress; 326 CdmaSmsAddress cdmaSmsAddress;
@@ -371,7 +371,7 @@ TEST_F(RadioHidlTest, writeSmsToRuim) {
371 * Test IRadio.deleteSmsOnRuim() for the response returned. 371 * Test IRadio.deleteSmsOnRuim() for the response returned.
372 */ 372 */
373TEST_F(RadioHidlTest, deleteSmsOnRuim) { 373TEST_F(RadioHidlTest, deleteSmsOnRuim) {
374 int serial = GetRandomSerialNumber(); 374 serial = GetRandomSerialNumber();
375 int index = 1; 375 int index = 1;
376 376
377 // Create a CdmaSmsAddress 377 // Create a CdmaSmsAddress
@@ -422,7 +422,7 @@ TEST_F(RadioHidlTest, deleteSmsOnRuim) {
422 * Test IRadio.reportSmsMemoryStatus() for the response returned. 422 * Test IRadio.reportSmsMemoryStatus() for the response returned.
423 */ 423 */
424TEST_F(RadioHidlTest, reportSmsMemoryStatus) { 424TEST_F(RadioHidlTest, reportSmsMemoryStatus) {
425 int serial = GetRandomSerialNumber(); 425 serial = GetRandomSerialNumber();
426 bool available = true; 426 bool available = true;
427 427
428 radio->reportSmsMemoryStatus(serial, available); 428 radio->reportSmsMemoryStatus(serial, available);
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_stk.cpp b/radio/1.0/vts/functional/radio_hidl_hal_stk.cpp
index 411d74c2..a3b5029f 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_stk.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_stk.cpp
@@ -22,7 +22,7 @@ using namespace ::android::hardware::radio::V1_0;
22 * Test IRadio.sendEnvelope() for the response returned. 22 * Test IRadio.sendEnvelope() for the response returned.
23 */ 23 */
24TEST_F(RadioHidlTest, sendEnvelope) { 24TEST_F(RadioHidlTest, sendEnvelope) {
25 int serial = GetRandomSerialNumber(); 25 serial = GetRandomSerialNumber();
26 26
27 // Test with sending empty string 27 // Test with sending empty string
28 std::string content = ""; 28 std::string content = "";
@@ -45,7 +45,7 @@ TEST_F(RadioHidlTest, sendEnvelope) {
45 * Test IRadio.sendTerminalResponseToSim() for the response returned. 45 * Test IRadio.sendTerminalResponseToSim() for the response returned.
46 */ 46 */
47TEST_F(RadioHidlTest, sendTerminalResponseToSim) { 47TEST_F(RadioHidlTest, sendTerminalResponseToSim) {
48 int serial = GetRandomSerialNumber(); 48 serial = GetRandomSerialNumber();
49 49
50 // Test with sending empty string 50 // Test with sending empty string
51 std::string commandResponse = ""; 51 std::string commandResponse = "";
@@ -68,7 +68,7 @@ TEST_F(RadioHidlTest, sendTerminalResponseToSim) {
68 * Test IRadio.handleStkCallSetupRequestFromSim() for the response returned. 68 * Test IRadio.handleStkCallSetupRequestFromSim() for the response returned.
69 */ 69 */
70TEST_F(RadioHidlTest, handleStkCallSetupRequestFromSim) { 70TEST_F(RadioHidlTest, handleStkCallSetupRequestFromSim) {
71 int serial = GetRandomSerialNumber(); 71 serial = GetRandomSerialNumber();
72 bool accept = false; 72 bool accept = false;
73 73
74 radio->handleStkCallSetupRequestFromSim(serial, accept); 74 radio->handleStkCallSetupRequestFromSim(serial, accept);
@@ -89,7 +89,7 @@ TEST_F(RadioHidlTest, handleStkCallSetupRequestFromSim) {
89 * Test IRadio.reportStkServiceIsRunning() for the response returned. 89 * Test IRadio.reportStkServiceIsRunning() for the response returned.
90 */ 90 */
91TEST_F(RadioHidlTest, reportStkServiceIsRunning) { 91TEST_F(RadioHidlTest, reportStkServiceIsRunning) {
92 int serial = GetRandomSerialNumber(); 92 serial = GetRandomSerialNumber();
93 93
94 radio->reportStkServiceIsRunning(serial); 94 radio->reportStkServiceIsRunning(serial);
95 95
@@ -108,7 +108,7 @@ TEST_F(RadioHidlTest, reportStkServiceIsRunning) {
108 * string. 108 * string.
109 */ 109 */
110TEST_F(RadioHidlTest, sendEnvelopeWithStatus) { 110TEST_F(RadioHidlTest, sendEnvelopeWithStatus) {
111 int serial = GetRandomSerialNumber(); 111 serial = GetRandomSerialNumber();
112 112
113 // Test with sending empty string 113 // Test with sending empty string
114 std::string contents = ""; 114 std::string contents = "";
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_test.cpp b/radio/1.0/vts/functional/radio_hidl_hal_test.cpp
index d9c00cee..96719d6d 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_test.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_test.cpp
@@ -37,22 +37,21 @@ void RadioHidlTest::SetUp() {
37 37
38 radio->setResponseFunctions(radioRsp, radioInd); 38 radio->setResponseFunctions(radioRsp, radioInd);
39 39
40 int serial = GetRandomSerialNumber(); 40 updateSimCardStatus();
41 radio->getIccCardStatus(serial);
42 EXPECT_EQ(std::cv_status::no_timeout, wait());
43 EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type); 41 EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
44 EXPECT_EQ(serial, radioRsp->rspInfo.serial); 42 EXPECT_EQ(serial, radioRsp->rspInfo.serial);
45 EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error); 43 EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
46 44
47 /* Vts Testing with Sim Absent only. This needs to be removed later in P when sim present 45 /* Enforce Vts Testing with Sim Status Present only. */
48 * scenarios will be tested. */ 46 EXPECT_EQ(CardState::PRESENT, cardStatus.cardState);
49 EXPECT_EQ(CardState::ABSENT, cardStatus.cardState);
50} 47}
51 48
52void RadioHidlTest::notify() { 49void RadioHidlTest::notify(int receivedSerial) {
53 std::unique_lock<std::mutex> lock(mtx); 50 std::unique_lock<std::mutex> lock(mtx);
54 count++; 51 if (serial == receivedSerial) {
55 cv.notify_one(); 52 count++;
53 cv.notify_one();
54 }
56} 55}
57 56
58std::cv_status RadioHidlTest::wait(int sec) { 57std::cv_status RadioHidlTest::wait(int sec) {
@@ -69,3 +68,9 @@ std::cv_status RadioHidlTest::wait(int sec) {
69 count--; 68 count--;
70 return status; 69 return status;
71} 70}
71
72void RadioHidlTest::updateSimCardStatus() {
73 serial = GetRandomSerialNumber();
74 radio->getIccCardStatus(serial);
75 EXPECT_EQ(std::cv_status::no_timeout, wait());
76} \ No newline at end of file
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_utils_v1_0.h b/radio/1.0/vts/functional/radio_hidl_hal_utils_v1_0.h
index 15ac0b85..f5ce072e 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_utils_v1_0.h
+++ b/radio/1.0/vts/functional/radio_hidl_hal_utils_v1_0.h
@@ -533,11 +533,17 @@ class RadioHidlTest : public ::testing::VtsHalHidlTargetTestBase {
533 std::condition_variable cv; 533 std::condition_variable cv;
534 int count; 534 int count;
535 535
536 /* Serial number for radio request */
537 int serial;
538
539 /* Update Sim Card Status */
540 void updateSimCardStatus();
541
536 public: 542 public:
537 virtual void SetUp() override; 543 virtual void SetUp() override;
538 544
539 /* Used as a mechanism to inform the test about data/event callback */ 545 /* Used as a mechanism to inform the test about data/event callback */
540 void notify(); 546 void notify(int receivedSerial);
541 547
542 /* Test code calls this function to wait for response */ 548 /* Test code calls this function to wait for response */
543 std::cv_status wait(int sec = TIMEOUT_PERIOD); 549 std::cv_status wait(int sec = TIMEOUT_PERIOD);
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_voice.cpp b/radio/1.0/vts/functional/radio_hidl_hal_voice.cpp
index d0320b9e..1fce4705 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_voice.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_voice.cpp
@@ -20,7 +20,7 @@
20 * Test IRadio.getCurrentCalls() for the response returned. 20 * Test IRadio.getCurrentCalls() for the response returned.
21 */ 21 */
22TEST_F(RadioHidlTest, getCurrentCalls) { 22TEST_F(RadioHidlTest, getCurrentCalls) {
23 int serial = GetRandomSerialNumber(); 23 serial = GetRandomSerialNumber();
24 24
25 radio->getCurrentCalls(serial); 25 radio->getCurrentCalls(serial);
26 EXPECT_EQ(std::cv_status::no_timeout, wait()); 26 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -36,7 +36,7 @@ TEST_F(RadioHidlTest, getCurrentCalls) {
36 * Test IRadio.dial() for the response returned. 36 * Test IRadio.dial() for the response returned.
37 */ 37 */
38TEST_F(RadioHidlTest, dial) { 38TEST_F(RadioHidlTest, dial) {
39 int serial = GetRandomSerialNumber(); 39 serial = GetRandomSerialNumber();
40 40
41 Dial dialInfo; 41 Dial dialInfo;
42 memset(&dialInfo, 0, sizeof(dialInfo)); 42 memset(&dialInfo, 0, sizeof(dialInfo));
@@ -63,7 +63,7 @@ TEST_F(RadioHidlTest, dial) {
63 * Test IRadio.hangup() for the response returned. 63 * Test IRadio.hangup() for the response returned.
64 */ 64 */
65TEST_F(RadioHidlTest, hangup) { 65TEST_F(RadioHidlTest, hangup) {
66 int serial = GetRandomSerialNumber(); 66 serial = GetRandomSerialNumber();
67 67
68 radio->hangup(serial, 1); 68 radio->hangup(serial, 1);
69 EXPECT_EQ(std::cv_status::no_timeout, wait()); 69 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -82,7 +82,7 @@ TEST_F(RadioHidlTest, hangup) {
82 * Test IRadio.hangupWaitingOrBackground() for the response returned. 82 * Test IRadio.hangupWaitingOrBackground() for the response returned.
83 */ 83 */
84TEST_F(RadioHidlTest, hangupWaitingOrBackground) { 84TEST_F(RadioHidlTest, hangupWaitingOrBackground) {
85 int serial = GetRandomSerialNumber(); 85 serial = GetRandomSerialNumber();
86 86
87 radio->hangupWaitingOrBackground(serial); 87 radio->hangupWaitingOrBackground(serial);
88 EXPECT_EQ(std::cv_status::no_timeout, wait()); 88 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -100,7 +100,7 @@ TEST_F(RadioHidlTest, hangupWaitingOrBackground) {
100 * Test IRadio.hangupForegroundResumeBackground() for the response returned. 100 * Test IRadio.hangupForegroundResumeBackground() for the response returned.
101 */ 101 */
102TEST_F(RadioHidlTest, hangupForegroundResumeBackground) { 102TEST_F(RadioHidlTest, hangupForegroundResumeBackground) {
103 int serial = GetRandomSerialNumber(); 103 serial = GetRandomSerialNumber();
104 104
105 radio->hangupForegroundResumeBackground(serial); 105 radio->hangupForegroundResumeBackground(serial);
106 EXPECT_EQ(std::cv_status::no_timeout, wait()); 106 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -118,7 +118,7 @@ TEST_F(RadioHidlTest, hangupForegroundResumeBackground) {
118 * Test IRadio.switchWaitingOrHoldingAndActive() for the response returned. 118 * Test IRadio.switchWaitingOrHoldingAndActive() for the response returned.
119 */ 119 */
120TEST_F(RadioHidlTest, switchWaitingOrHoldingAndActive) { 120TEST_F(RadioHidlTest, switchWaitingOrHoldingAndActive) {
121 int serial = GetRandomSerialNumber(); 121 serial = GetRandomSerialNumber();
122 122
123 radio->switchWaitingOrHoldingAndActive(serial); 123 radio->switchWaitingOrHoldingAndActive(serial);
124 EXPECT_EQ(std::cv_status::no_timeout, wait()); 124 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -136,7 +136,7 @@ TEST_F(RadioHidlTest, switchWaitingOrHoldingAndActive) {
136 * Test IRadio.conference() for the response returned. 136 * Test IRadio.conference() for the response returned.
137 */ 137 */
138TEST_F(RadioHidlTest, conference) { 138TEST_F(RadioHidlTest, conference) {
139 int serial = GetRandomSerialNumber(); 139 serial = GetRandomSerialNumber();
140 140
141 radio->conference(serial); 141 radio->conference(serial);
142 EXPECT_EQ(std::cv_status::no_timeout, wait()); 142 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -154,7 +154,7 @@ TEST_F(RadioHidlTest, conference) {
154 * Test IRadio.rejectCall() for the response returned. 154 * Test IRadio.rejectCall() for the response returned.
155 */ 155 */
156TEST_F(RadioHidlTest, rejectCall) { 156TEST_F(RadioHidlTest, rejectCall) {
157 int serial = GetRandomSerialNumber(); 157 serial = GetRandomSerialNumber();
158 158
159 radio->rejectCall(serial); 159 radio->rejectCall(serial);
160 EXPECT_EQ(std::cv_status::no_timeout, wait()); 160 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -172,7 +172,7 @@ TEST_F(RadioHidlTest, rejectCall) {
172 * Test IRadio.getLastCallFailCause() for the response returned. 172 * Test IRadio.getLastCallFailCause() for the response returned.
173 */ 173 */
174TEST_F(RadioHidlTest, getLastCallFailCause) { 174TEST_F(RadioHidlTest, getLastCallFailCause) {
175 int serial = GetRandomSerialNumber(); 175 serial = GetRandomSerialNumber();
176 176
177 radio->getLastCallFailCause(serial); 177 radio->getLastCallFailCause(serial);
178 EXPECT_EQ(std::cv_status::no_timeout, wait()); 178 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -189,7 +189,7 @@ TEST_F(RadioHidlTest, getLastCallFailCause) {
189 * Test IRadio.sendUssd() for the response returned. 189 * Test IRadio.sendUssd() for the response returned.
190 */ 190 */
191TEST_F(RadioHidlTest, sendUssd) { 191TEST_F(RadioHidlTest, sendUssd) {
192 int serial = GetRandomSerialNumber(); 192 serial = GetRandomSerialNumber();
193 radio->sendUssd(serial, hidl_string("test")); 193 radio->sendUssd(serial, hidl_string("test"));
194 EXPECT_EQ(std::cv_status::no_timeout, wait()); 194 EXPECT_EQ(std::cv_status::no_timeout, wait());
195 EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type); 195 EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
@@ -207,7 +207,7 @@ TEST_F(RadioHidlTest, sendUssd) {
207 * Test IRadio.cancelPendingUssd() for the response returned. 207 * Test IRadio.cancelPendingUssd() for the response returned.
208 */ 208 */
209TEST_F(RadioHidlTest, cancelPendingUssd) { 209TEST_F(RadioHidlTest, cancelPendingUssd) {
210 int serial = GetRandomSerialNumber(); 210 serial = GetRandomSerialNumber();
211 211
212 radio->cancelPendingUssd(serial); 212 radio->cancelPendingUssd(serial);
213 EXPECT_EQ(std::cv_status::no_timeout, wait()); 213 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -226,7 +226,7 @@ TEST_F(RadioHidlTest, cancelPendingUssd) {
226 * Test IRadio.getCallForwardStatus() for the response returned. 226 * Test IRadio.getCallForwardStatus() for the response returned.
227 */ 227 */
228TEST_F(RadioHidlTest, getCallForwardStatus) { 228TEST_F(RadioHidlTest, getCallForwardStatus) {
229 int serial = GetRandomSerialNumber(); 229 serial = GetRandomSerialNumber();
230 CallForwardInfo callInfo; 230 CallForwardInfo callInfo;
231 memset(&callInfo, 0, sizeof(callInfo)); 231 memset(&callInfo, 0, sizeof(callInfo));
232 callInfo.number = hidl_string(); 232 callInfo.number = hidl_string();
@@ -248,7 +248,7 @@ TEST_F(RadioHidlTest, getCallForwardStatus) {
248 * Test IRadio.setCallForward() for the response returned. 248 * Test IRadio.setCallForward() for the response returned.
249 */ 249 */
250TEST_F(RadioHidlTest, setCallForward) { 250TEST_F(RadioHidlTest, setCallForward) {
251 int serial = GetRandomSerialNumber(); 251 serial = GetRandomSerialNumber();
252 CallForwardInfo callInfo; 252 CallForwardInfo callInfo;
253 memset(&callInfo, 0, sizeof(callInfo)); 253 memset(&callInfo, 0, sizeof(callInfo));
254 callInfo.number = hidl_string(); 254 callInfo.number = hidl_string();
@@ -270,7 +270,7 @@ TEST_F(RadioHidlTest, setCallForward) {
270 * Test IRadio.getCallWaiting() for the response returned. 270 * Test IRadio.getCallWaiting() for the response returned.
271 */ 271 */
272TEST_F(RadioHidlTest, getCallWaiting) { 272TEST_F(RadioHidlTest, getCallWaiting) {
273 int serial = GetRandomSerialNumber(); 273 serial = GetRandomSerialNumber();
274 274
275 radio->getCallWaiting(serial, 1); 275 radio->getCallWaiting(serial, 1);
276 EXPECT_EQ(std::cv_status::no_timeout, wait()); 276 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -289,7 +289,7 @@ TEST_F(RadioHidlTest, getCallWaiting) {
289 * Test IRadio.setCallWaiting() for the response returned. 289 * Test IRadio.setCallWaiting() for the response returned.
290 */ 290 */
291TEST_F(RadioHidlTest, setCallWaiting) { 291TEST_F(RadioHidlTest, setCallWaiting) {
292 int serial = GetRandomSerialNumber(); 292 serial = GetRandomSerialNumber();
293 293
294 radio->setCallWaiting(serial, true, 1); 294 radio->setCallWaiting(serial, true, 1);
295 EXPECT_EQ(std::cv_status::no_timeout, wait()); 295 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -308,7 +308,7 @@ TEST_F(RadioHidlTest, setCallWaiting) {
308 * Test IRadio.acceptCall() for the response returned. 308 * Test IRadio.acceptCall() for the response returned.
309 */ 309 */
310TEST_F(RadioHidlTest, acceptCall) { 310TEST_F(RadioHidlTest, acceptCall) {
311 int serial = GetRandomSerialNumber(); 311 serial = GetRandomSerialNumber();
312 312
313 radio->acceptCall(serial); 313 radio->acceptCall(serial);
314 EXPECT_EQ(std::cv_status::no_timeout, wait()); 314 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -326,7 +326,7 @@ TEST_F(RadioHidlTest, acceptCall) {
326 * Test IRadio.separateConnection() for the response returned. 326 * Test IRadio.separateConnection() for the response returned.
327 */ 327 */
328TEST_F(RadioHidlTest, separateConnection) { 328TEST_F(RadioHidlTest, separateConnection) {
329 int serial = GetRandomSerialNumber(); 329 serial = GetRandomSerialNumber();
330 330
331 radio->separateConnection(serial, 1); 331 radio->separateConnection(serial, 1);
332 EXPECT_EQ(std::cv_status::no_timeout, wait()); 332 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -345,7 +345,7 @@ TEST_F(RadioHidlTest, separateConnection) {
345 * Test IRadio.explicitCallTransfer() for the response returned. 345 * Test IRadio.explicitCallTransfer() for the response returned.
346 */ 346 */
347TEST_F(RadioHidlTest, explicitCallTransfer) { 347TEST_F(RadioHidlTest, explicitCallTransfer) {
348 int serial = GetRandomSerialNumber(); 348 serial = GetRandomSerialNumber();
349 349
350 radio->explicitCallTransfer(serial); 350 radio->explicitCallTransfer(serial);
351 EXPECT_EQ(std::cv_status::no_timeout, wait()); 351 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -363,7 +363,7 @@ TEST_F(RadioHidlTest, explicitCallTransfer) {
363 * Test IRadio.sendCDMAFeatureCode() for the response returned. 363 * Test IRadio.sendCDMAFeatureCode() for the response returned.
364 */ 364 */
365TEST_F(RadioHidlTest, sendCDMAFeatureCode) { 365TEST_F(RadioHidlTest, sendCDMAFeatureCode) {
366 int serial = GetRandomSerialNumber(); 366 serial = GetRandomSerialNumber();
367 367
368 radio->sendCDMAFeatureCode(serial, hidl_string()); 368 radio->sendCDMAFeatureCode(serial, hidl_string());
369 EXPECT_EQ(std::cv_status::no_timeout, wait()); 369 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -383,7 +383,7 @@ TEST_F(RadioHidlTest, sendCDMAFeatureCode) {
383 * Test IRadio.sendDtmf() for the response returned. 383 * Test IRadio.sendDtmf() for the response returned.
384 */ 384 */
385TEST_F(RadioHidlTest, sendDtmf) { 385TEST_F(RadioHidlTest, sendDtmf) {
386 int serial = GetRandomSerialNumber(); 386 serial = GetRandomSerialNumber();
387 387
388 radio->sendDtmf(serial, "1"); 388 radio->sendDtmf(serial, "1");
389 EXPECT_EQ(std::cv_status::no_timeout, wait()); 389 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -403,7 +403,7 @@ TEST_F(RadioHidlTest, sendDtmf) {
403 * Test IRadio.startDtmf() for the response returned. 403 * Test IRadio.startDtmf() for the response returned.
404 */ 404 */
405TEST_F(RadioHidlTest, startDtmf) { 405TEST_F(RadioHidlTest, startDtmf) {
406 int serial = GetRandomSerialNumber(); 406 serial = GetRandomSerialNumber();
407 407
408 radio->startDtmf(serial, "1"); 408 radio->startDtmf(serial, "1");
409 EXPECT_EQ(std::cv_status::no_timeout, wait()); 409 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -423,7 +423,7 @@ TEST_F(RadioHidlTest, startDtmf) {
423 * Test IRadio.stopDtmf() for the response returned. 423 * Test IRadio.stopDtmf() for the response returned.
424 */ 424 */
425TEST_F(RadioHidlTest, stopDtmf) { 425TEST_F(RadioHidlTest, stopDtmf) {
426 int serial = GetRandomSerialNumber(); 426 serial = GetRandomSerialNumber();
427 427
428 radio->stopDtmf(serial); 428 radio->stopDtmf(serial);
429 EXPECT_EQ(std::cv_status::no_timeout, wait()); 429 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -442,7 +442,7 @@ TEST_F(RadioHidlTest, stopDtmf) {
442 * Test IRadio.setMute() for the response returned. 442 * Test IRadio.setMute() for the response returned.
443 */ 443 */
444TEST_F(RadioHidlTest, setMute) { 444TEST_F(RadioHidlTest, setMute) {
445 int serial = GetRandomSerialNumber(); 445 serial = GetRandomSerialNumber();
446 446
447 radio->setMute(serial, true); 447 radio->setMute(serial, true);
448 EXPECT_EQ(std::cv_status::no_timeout, wait()); 448 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -460,7 +460,7 @@ TEST_F(RadioHidlTest, setMute) {
460 * Test IRadio.getMute() for the response returned. 460 * Test IRadio.getMute() for the response returned.
461 */ 461 */
462TEST_F(RadioHidlTest, getMute) { 462TEST_F(RadioHidlTest, getMute) {
463 int serial = GetRandomSerialNumber(); 463 serial = GetRandomSerialNumber();
464 464
465 radio->getMute(serial); 465 radio->getMute(serial);
466 EXPECT_EQ(std::cv_status::no_timeout, wait()); 466 EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -476,7 +476,7 @@ TEST_F(RadioHidlTest, getMute) {
476 * Test IRadio.sendBurstDtmf() for the response returned. 476 * Test IRadio.sendBurstDtmf() for the response returned.
477 */ 477 */
478TEST_F(RadioHidlTest, sendBurstDtmf) { 478TEST_F(RadioHidlTest, sendBurstDtmf) {
479 int serial = GetRandomSerialNumber(); 479 serial = GetRandomSerialNumber();
480 480
481 radio->sendBurstDtmf(serial, "1", 0, 0); 481 radio->sendBurstDtmf(serial, "1", 0, 0);
482 EXPECT_EQ(std::cv_status::no_timeout, wait()); 482 EXPECT_EQ(std::cv_status::no_timeout, wait());
diff --git a/radio/1.0/vts/functional/radio_response.cpp b/radio/1.0/vts/functional/radio_response.cpp
index 434d488f..93d5557d 100644
--- a/radio/1.0/vts/functional/radio_response.cpp
+++ b/radio/1.0/vts/functional/radio_response.cpp
@@ -24,69 +24,69 @@ Return<void> RadioResponse::getIccCardStatusResponse(const RadioResponseInfo& in
24 const CardStatus& card_status) { 24 const CardStatus& card_status) {
25 rspInfo = info; 25 rspInfo = info;
26 cardStatus = card_status; 26 cardStatus = card_status;
27 parent.notify(); 27 parent.notify(info.serial);
28 return Void(); 28 return Void();
29} 29}
30 30
31Return<void> RadioResponse::supplyIccPinForAppResponse(const RadioResponseInfo& info, 31Return<void> RadioResponse::supplyIccPinForAppResponse(const RadioResponseInfo& info,
32 int32_t /*remainingRetries*/) { 32 int32_t /*remainingRetries*/) {
33 rspInfo = info; 33 rspInfo = info;
34 parent.notify(); 34 parent.notify(info.serial);
35 return Void(); 35 return Void();
36} 36}
37 37
38Return<void> RadioResponse::supplyIccPukForAppResponse(const RadioResponseInfo& info, 38Return<void> RadioResponse::supplyIccPukForAppResponse(const RadioResponseInfo& info,
39 int32_t /*remainingRetries*/) { 39 int32_t /*remainingRetries*/) {
40 rspInfo = info; 40 rspInfo = info;
41 parent.notify(); 41 parent.notify(info.serial);
42 return Void(); 42 return Void();
43} 43}
44 44
45Return<void> RadioResponse::supplyIccPin2ForAppResponse(const RadioResponseInfo& info, 45Return<void> RadioResponse::supplyIccPin2ForAppResponse(const RadioResponseInfo& info,
46 int32_t /*remainingRetries*/) { 46 int32_t /*remainingRetries*/) {
47 rspInfo = info; 47 rspInfo = info;
48 parent.notify(); 48 parent.notify(info.serial);
49 return Void(); 49 return Void();
50} 50}
51 51
52Return<void> RadioResponse::supplyIccPuk2ForAppResponse(const RadioResponseInfo& info, 52Return<void> RadioResponse::supplyIccPuk2ForAppResponse(const RadioResponseInfo& info,
53 int32_t /*remainingRetries*/) { 53 int32_t /*remainingRetries*/) {
54 rspInfo = info; 54 rspInfo = info;
55 parent.notify(); 55 parent.notify(info.serial);
56 return Void(); 56 return Void();
57} 57}
58 58
59Return<void> RadioResponse::changeIccPinForAppResponse(const RadioResponseInfo& info, 59Return<void> RadioResponse::changeIccPinForAppResponse(const RadioResponseInfo& info,
60 int32_t /*remainingRetries*/) { 60 int32_t /*remainingRetries*/) {
61 rspInfo = info; 61 rspInfo = info;
62 parent.notify(); 62 parent.notify(info.serial);
63 return Void(); 63 return Void();
64} 64}
65 65
66Return<void> RadioResponse::changeIccPin2ForAppResponse(const RadioResponseInfo& info, 66Return<void> RadioResponse::changeIccPin2ForAppResponse(const RadioResponseInfo& info,
67 int32_t /*remainingRetries*/) { 67 int32_t /*remainingRetries*/) {
68 rspInfo = info; 68 rspInfo = info;
69 parent.notify(); 69 parent.notify(info.serial);
70 return Void(); 70 return Void();
71} 71}
72 72
73Return<void> RadioResponse::supplyNetworkDepersonalizationResponse(const RadioResponseInfo& info, 73Return<void> RadioResponse::supplyNetworkDepersonalizationResponse(const RadioResponseInfo& info,
74 int32_t /*remainingRetries*/) { 74 int32_t /*remainingRetries*/) {
75 rspInfo = info; 75 rspInfo = info;
76 parent.notify(); 76 parent.notify(info.serial);
77 return Void(); 77 return Void();
78} 78}
79 79
80Return<void> RadioResponse::getCurrentCallsResponse( 80Return<void> RadioResponse::getCurrentCallsResponse(
81 const RadioResponseInfo& info, const ::android::hardware::hidl_vec<Call>& /*calls*/) { 81 const RadioResponseInfo& info, const ::android::hardware::hidl_vec<Call>& /*calls*/) {
82 rspInfo = info; 82 rspInfo = info;
83 parent.notify(); 83 parent.notify(info.serial);
84 return Void(); 84 return Void();
85} 85}
86 86
87Return<void> RadioResponse::dialResponse(const RadioResponseInfo& info) { 87Return<void> RadioResponse::dialResponse(const RadioResponseInfo& info) {
88 rspInfo = info; 88 rspInfo = info;
89 parent.notify(); 89 parent.notify(info.serial);
90 return Void(); 90 return Void();
91} 91}
92 92
@@ -94,72 +94,72 @@ Return<void> RadioResponse::getIMSIForAppResponse(const RadioResponseInfo& info,
94 const ::android::hardware::hidl_string& imsi) { 94 const ::android::hardware::hidl_string& imsi) {
95 rspInfo = info; 95 rspInfo = info;
96 this->imsi = imsi; 96 this->imsi = imsi;
97 parent.notify(); 97 parent.notify(info.serial);
98 return Void(); 98 return Void();
99} 99}
100 100
101Return<void> RadioResponse::hangupConnectionResponse(const RadioResponseInfo& info) { 101Return<void> RadioResponse::hangupConnectionResponse(const RadioResponseInfo& info) {
102 rspInfo = info; 102 rspInfo = info;
103 parent.notify(); 103 parent.notify(info.serial);
104 return Void(); 104 return Void();
105} 105}
106 106
107Return<void> RadioResponse::hangupWaitingOrBackgroundResponse(const RadioResponseInfo& info) { 107Return<void> RadioResponse::hangupWaitingOrBackgroundResponse(const RadioResponseInfo& info) {
108 rspInfo = info; 108 rspInfo = info;
109 parent.notify(); 109 parent.notify(info.serial);
110 return Void(); 110 return Void();
111} 111}
112 112
113Return<void> RadioResponse::hangupForegroundResumeBackgroundResponse( 113Return<void> RadioResponse::hangupForegroundResumeBackgroundResponse(
114 const RadioResponseInfo& info) { 114 const RadioResponseInfo& info) {
115 rspInfo = info; 115 rspInfo = info;
116 parent.notify(); 116 parent.notify(info.serial);
117 return Void(); 117 return Void();
118} 118}
119 119
120Return<void> RadioResponse::switchWaitingOrHoldingAndActiveResponse(const RadioResponseInfo& info) { 120Return<void> RadioResponse::switchWaitingOrHoldingAndActiveResponse(const RadioResponseInfo& info) {
121 rspInfo = info; 121 rspInfo = info;
122 parent.notify(); 122 parent.notify(info.serial);
123 return Void(); 123 return Void();
124} 124}
125 125
126Return<void> RadioResponse::conferenceResponse(const RadioResponseInfo& info) { 126Return<void> RadioResponse::conferenceResponse(const RadioResponseInfo& info) {
127 rspInfo = info; 127 rspInfo = info;
128 parent.notify(); 128 parent.notify(info.serial);
129 return Void(); 129 return Void();
130} 130}
131 131
132Return<void> RadioResponse::rejectCallResponse(const RadioResponseInfo& info) { 132Return<void> RadioResponse::rejectCallResponse(const RadioResponseInfo& info) {
133 rspInfo = info; 133 rspInfo = info;
134 parent.notify(); 134 parent.notify(info.serial);
135 return Void(); 135 return Void();
136} 136}
137 137
138Return<void> RadioResponse::getLastCallFailCauseResponse( 138Return<void> RadioResponse::getLastCallFailCauseResponse(
139 const RadioResponseInfo& info, const LastCallFailCauseInfo& /*failCauseInfo*/) { 139 const RadioResponseInfo& info, const LastCallFailCauseInfo& /*failCauseInfo*/) {
140 rspInfo = info; 140 rspInfo = info;
141 parent.notify(); 141 parent.notify(info.serial);
142 return Void(); 142 return Void();
143} 143}
144 144
145Return<void> RadioResponse::getSignalStrengthResponse(const RadioResponseInfo& info, 145Return<void> RadioResponse::getSignalStrengthResponse(const RadioResponseInfo& info,
146 const SignalStrength& /*sig_strength*/) { 146 const SignalStrength& /*sig_strength*/) {
147 rspInfo = info; 147 rspInfo = info;
148 parent.notify(); 148 parent.notify(info.serial);
149 return Void(); 149 return Void();
150} 150}
151 151
152Return<void> RadioResponse::getVoiceRegistrationStateResponse( 152Return<void> RadioResponse::getVoiceRegistrationStateResponse(
153 const RadioResponseInfo& info, const VoiceRegStateResult& /*voiceRegResponse*/) { 153 const RadioResponseInfo& info, const VoiceRegStateResult& /*voiceRegResponse*/) {
154 rspInfo = info; 154 rspInfo = info;
155 parent.notify(); 155 parent.notify(info.serial);
156 return Void(); 156 return Void();
157} 157}
158 158
159Return<void> RadioResponse::getDataRegistrationStateResponse( 159Return<void> RadioResponse::getDataRegistrationStateResponse(
160 const RadioResponseInfo& info, const DataRegStateResult& /*dataRegResponse*/) { 160 const RadioResponseInfo& info, const DataRegStateResult& /*dataRegResponse*/) {
161 rspInfo = info; 161 rspInfo = info;
162 parent.notify(); 162 parent.notify(info.serial);
163 return Void(); 163 return Void();
164} 164}
165 165
@@ -168,19 +168,19 @@ Return<void> RadioResponse::getOperatorResponse(
168 const ::android::hardware::hidl_string& /*shortName*/, 168 const ::android::hardware::hidl_string& /*shortName*/,
169 const ::android::hardware::hidl_string& /*numeric*/) { 169 const ::android::hardware::hidl_string& /*numeric*/) {
170 rspInfo = info; 170 rspInfo = info;
171 parent.notify(); 171 parent.notify(info.serial);
172 return Void(); 172 return Void();
173} 173}
174 174
175Return<void> RadioResponse::setRadioPowerResponse(const RadioResponseInfo& info) { 175Return<void> RadioResponse::setRadioPowerResponse(const RadioResponseInfo& info) {
176 rspInfo = info; 176 rspInfo = info;
177 parent.notify(); 177 parent.notify(info.serial);
178 return Void(); 178 return Void();
179} 179}
180 180
181Return<void> RadioResponse::sendDtmfResponse(const RadioResponseInfo& info) { 181Return<void> RadioResponse::sendDtmfResponse(const RadioResponseInfo& info) {
182 rspInfo = info; 182 rspInfo = info;
183 parent.notify(); 183 parent.notify(info.serial);
184 return Void(); 184 return Void();
185} 185}
186 186
@@ -188,7 +188,7 @@ Return<void> RadioResponse::sendSmsResponse(const RadioResponseInfo& info,
188 const SendSmsResult& sms) { 188 const SendSmsResult& sms) {
189 rspInfo = info; 189 rspInfo = info;
190 sendSmsResult = sms; 190 sendSmsResult = sms;
191 parent.notify(); 191 parent.notify(info.serial);
192 return Void(); 192 return Void();
193} 193}
194 194
@@ -196,14 +196,14 @@ Return<void> RadioResponse::sendSMSExpectMoreResponse(const RadioResponseInfo& i
196 const SendSmsResult& sms) { 196 const SendSmsResult& sms) {
197 rspInfo = info; 197 rspInfo = info;
198 sendSmsResult = sms; 198 sendSmsResult = sms;
199 parent.notify(); 199 parent.notify(info.serial);
200 return Void(); 200 return Void();
201} 201}
202 202
203Return<void> RadioResponse::setupDataCallResponse(const RadioResponseInfo& info, 203Return<void> RadioResponse::setupDataCallResponse(const RadioResponseInfo& info,
204 const SetupDataCallResult& /*dcResponse*/) { 204 const SetupDataCallResult& /*dcResponse*/) {
205 rspInfo = info; 205 rspInfo = info;
206 parent.notify(); 206 parent.notify(info.serial);
207 return Void(); 207 return Void();
208} 208}
209 209
@@ -211,32 +211,32 @@ Return<void> RadioResponse::iccIOForAppResponse(const RadioResponseInfo& info,
211 const IccIoResult& iccIo) { 211 const IccIoResult& iccIo) {
212 rspInfo = info; 212 rspInfo = info;
213 this->iccIoResult = iccIo; 213 this->iccIoResult = iccIo;
214 parent.notify(); 214 parent.notify(info.serial);
215 return Void(); 215 return Void();
216} 216}
217 217
218Return<void> RadioResponse::sendUssdResponse(const RadioResponseInfo& info) { 218Return<void> RadioResponse::sendUssdResponse(const RadioResponseInfo& info) {
219 rspInfo = info; 219 rspInfo = info;
220 parent.notify(); 220 parent.notify(info.serial);
221 return Void(); 221 return Void();
222} 222}
223 223
224Return<void> RadioResponse::cancelPendingUssdResponse(const RadioResponseInfo& info) { 224Return<void> RadioResponse::cancelPendingUssdResponse(const RadioResponseInfo& info) {
225 rspInfo = info; 225 rspInfo = info;
226 parent.notify(); 226 parent.notify(info.serial);
227 return Void(); 227 return Void();
228} 228}
229 229
230Return<void> RadioResponse::getClirResponse(const RadioResponseInfo& info, int32_t /*n*/, 230Return<void> RadioResponse::getClirResponse(const RadioResponseInfo& info, int32_t /*n*/,
231 int32_t /*m*/) { 231 int32_t /*m*/) {
232 rspInfo = info; 232 rspInfo = info;
233 parent.notify(); 233 parent.notify(info.serial);
234 return Void(); 234 return Void();
235} 235}
236 236
237Return<void> RadioResponse::setClirResponse(const RadioResponseInfo& info) { 237Return<void> RadioResponse::setClirResponse(const RadioResponseInfo& info) {
238 rspInfo = info; 238 rspInfo = info;
239 parent.notify(); 239 parent.notify(info.serial);
240 return Void(); 240 return Void();
241} 241}
242 242
@@ -244,84 +244,84 @@ Return<void> RadioResponse::getCallForwardStatusResponse(
244 const RadioResponseInfo& info, const ::android::hardware::hidl_vec<CallForwardInfo>& 244 const RadioResponseInfo& info, const ::android::hardware::hidl_vec<CallForwardInfo>&
245 /*callForwardInfos*/) { 245 /*callForwardInfos*/) {
246 rspInfo = info; 246 rspInfo = info;
247 parent.notify(); 247 parent.notify(info.serial);
248 return Void(); 248 return Void();
249} 249}
250 250
251Return<void> RadioResponse::setCallForwardResponse(const RadioResponseInfo& info) { 251Return<void> RadioResponse::setCallForwardResponse(const RadioResponseInfo& info) {
252 rspInfo = info; 252 rspInfo = info;
253 parent.notify(); 253 parent.notify(info.serial);
254 return Void(); 254 return Void();
255} 255}
256 256
257Return<void> RadioResponse::getCallWaitingResponse(const RadioResponseInfo& info, bool /*enable*/, 257Return<void> RadioResponse::getCallWaitingResponse(const RadioResponseInfo& info, bool /*enable*/,
258 int32_t /*serviceClass*/) { 258 int32_t /*serviceClass*/) {
259 rspInfo = info; 259 rspInfo = info;
260 parent.notify(); 260 parent.notify(info.serial);
261 return Void(); 261 return Void();
262} 262}
263 263
264Return<void> RadioResponse::setCallWaitingResponse(const RadioResponseInfo& info) { 264Return<void> RadioResponse::setCallWaitingResponse(const RadioResponseInfo& info) {
265 rspInfo = info; 265 rspInfo = info;
266 parent.notify(); 266 parent.notify(info.serial);
267 return Void(); 267 return Void();
268} 268}
269 269
270Return<void> RadioResponse::acknowledgeLastIncomingGsmSmsResponse(const RadioResponseInfo& info) { 270Return<void> RadioResponse::acknowledgeLastIncomingGsmSmsResponse(const RadioResponseInfo& info) {
271 rspInfo = info; 271 rspInfo = info;
272 parent.notify(); 272 parent.notify(info.serial);
273 return Void(); 273 return Void();
274} 274}
275 275
276Return<void> RadioResponse::acceptCallResponse(const RadioResponseInfo& info) { 276Return<void> RadioResponse::acceptCallResponse(const RadioResponseInfo& info) {
277 rspInfo = info; 277 rspInfo = info;
278 parent.notify(); 278 parent.notify(info.serial);
279 return Void(); 279 return Void();
280} 280}
281 281
282Return<void> RadioResponse::deactivateDataCallResponse(const RadioResponseInfo& info) { 282Return<void> RadioResponse::deactivateDataCallResponse(const RadioResponseInfo& info) {
283 rspInfo = info; 283 rspInfo = info;
284 parent.notify(); 284 parent.notify(info.serial);
285 return Void(); 285 return Void();
286} 286}
287 287
288Return<void> RadioResponse::getFacilityLockForAppResponse(const RadioResponseInfo& info, 288Return<void> RadioResponse::getFacilityLockForAppResponse(const RadioResponseInfo& info,
289 int32_t /*response*/) { 289 int32_t /*response*/) {
290 rspInfo = info; 290 rspInfo = info;
291 parent.notify(); 291 parent.notify(info.serial);
292 return Void(); 292 return Void();
293} 293}
294 294
295Return<void> RadioResponse::setFacilityLockForAppResponse(const RadioResponseInfo& info, 295Return<void> RadioResponse::setFacilityLockForAppResponse(const RadioResponseInfo& info,
296 int32_t /*retry*/) { 296 int32_t /*retry*/) {
297 rspInfo = info; 297 rspInfo = info;
298 parent.notify(); 298 parent.notify(info.serial);
299 return Void(); 299 return Void();
300} 300}
301 301
302Return<void> RadioResponse::setBarringPasswordResponse(const RadioResponseInfo& info) { 302Return<void> RadioResponse::setBarringPasswordResponse(const RadioResponseInfo& info) {
303 rspInfo = info; 303 rspInfo = info;
304 parent.notify(); 304 parent.notify(info.serial);
305 return Void(); 305 return Void();
306} 306}
307 307
308Return<void> RadioResponse::getNetworkSelectionModeResponse(const RadioResponseInfo& info, 308Return<void> RadioResponse::getNetworkSelectionModeResponse(const RadioResponseInfo& info,
309 bool /*manual*/) { 309 bool /*manual*/) {
310 rspInfo = info; 310 rspInfo = info;
311 parent.notify(); 311 parent.notify(info.serial);
312 return Void(); 312 return Void();
313} 313}
314 314
315Return<void> RadioResponse::setNetworkSelectionModeAutomaticResponse( 315Return<void> RadioResponse::setNetworkSelectionModeAutomaticResponse(
316 const RadioResponseInfo& info) { 316 const RadioResponseInfo& info) {
317 rspInfo = info; 317 rspInfo = info;
318 parent.notify(); 318 parent.notify(info.serial);
319 return Void(); 319 return Void();
320} 320}
321 321
322Return<void> RadioResponse::setNetworkSelectionModeManualResponse(const RadioResponseInfo& info) { 322Return<void> RadioResponse::setNetworkSelectionModeManualResponse(const RadioResponseInfo& info) {
323 rspInfo = info; 323 rspInfo = info;
324 parent.notify(); 324 parent.notify(info.serial);
325 return Void(); 325 return Void();
326} 326}
327 327
@@ -329,50 +329,50 @@ Return<void> RadioResponse::getAvailableNetworksResponse(
329 const RadioResponseInfo& info, 329 const RadioResponseInfo& info,
330 const ::android::hardware::hidl_vec<OperatorInfo>& /*networkInfos*/) { 330 const ::android::hardware::hidl_vec<OperatorInfo>& /*networkInfos*/) {
331 rspInfo = info; 331 rspInfo = info;
332 parent.notify(); 332 parent.notify(info.serial);
333 return Void(); 333 return Void();
334} 334}
335 335
336Return<void> RadioResponse::startDtmfResponse(const RadioResponseInfo& info) { 336Return<void> RadioResponse::startDtmfResponse(const RadioResponseInfo& info) {
337 rspInfo = info; 337 rspInfo = info;
338 parent.notify(); 338 parent.notify(info.serial);
339 return Void(); 339 return Void();
340} 340}
341 341
342Return<void> RadioResponse::stopDtmfResponse(const RadioResponseInfo& info) { 342Return<void> RadioResponse::stopDtmfResponse(const RadioResponseInfo& info) {
343 rspInfo = info; 343 rspInfo = info;
344 parent.notify(); 344 parent.notify(info.serial);
345 return Void(); 345 return Void();
346} 346}
347 347
348Return<void> RadioResponse::getBasebandVersionResponse( 348Return<void> RadioResponse::getBasebandVersionResponse(
349 const RadioResponseInfo& info, const ::android::hardware::hidl_string& /*version*/) { 349 const RadioResponseInfo& info, const ::android::hardware::hidl_string& /*version*/) {
350 rspInfo = info; 350 rspInfo = info;
351 parent.notify(); 351 parent.notify(info.serial);
352 return Void(); 352 return Void();
353} 353}
354 354
355Return<void> RadioResponse::separateConnectionResponse(const RadioResponseInfo& info) { 355Return<void> RadioResponse::separateConnectionResponse(const RadioResponseInfo& info) {
356 rspInfo = info; 356 rspInfo = info;
357 parent.notify(); 357 parent.notify(info.serial);
358 return Void(); 358 return Void();
359} 359}
360 360
361Return<void> RadioResponse::setMuteResponse(const RadioResponseInfo& info) { 361Return<void> RadioResponse::setMuteResponse(const RadioResponseInfo& info) {
362 rspInfo = info; 362 rspInfo = info;
363 parent.notify(); 363 parent.notify(info.serial);
364 return Void(); 364 return Void();
365} 365}
366 366
367Return<void> RadioResponse::getMuteResponse(const RadioResponseInfo& info, bool /*enable*/) { 367Return<void> RadioResponse::getMuteResponse(const RadioResponseInfo& info, bool /*enable*/) {
368 rspInfo = info; 368 rspInfo = info;
369 parent.notify(); 369 parent.notify(info.serial);
370 return Void(); 370 return Void();
371} 371}
372 372
373Return<void> RadioResponse::getClipResponse(const RadioResponseInfo& info, ClipStatus /*status*/) { 373Return<void> RadioResponse::getClipResponse(const RadioResponseInfo& info, ClipStatus /*status*/) {
374 rspInfo = info; 374 rspInfo = info;
375 parent.notify(); 375 parent.notify(info.serial);
376 return Void(); 376 return Void();
377} 377}
378 378
@@ -380,7 +380,7 @@ Return<void> RadioResponse::getDataCallListResponse(
380 const RadioResponseInfo& info, 380 const RadioResponseInfo& info,
381 const ::android::hardware::hidl_vec<SetupDataCallResult>& /*dcResponse*/) { 381 const ::android::hardware::hidl_vec<SetupDataCallResult>& /*dcResponse*/) {
382 rspInfo = info; 382 rspInfo = info;
383 parent.notify(); 383 parent.notify(info.serial);
384 return Void(); 384 return Void();
385} 385}
386 386
@@ -397,26 +397,26 @@ Return<void> RadioResponse::sendOemRilRequestStringsResponse(
397 397
398Return<void> RadioResponse::setSuppServiceNotificationsResponse(const RadioResponseInfo& info) { 398Return<void> RadioResponse::setSuppServiceNotificationsResponse(const RadioResponseInfo& info) {
399 rspInfo = info; 399 rspInfo = info;
400 parent.notify(); 400 parent.notify(info.serial);
401 return Void(); 401 return Void();
402} 402}
403 403
404Return<void> RadioResponse::writeSmsToSimResponse(const RadioResponseInfo& info, int32_t index) { 404Return<void> RadioResponse::writeSmsToSimResponse(const RadioResponseInfo& info, int32_t index) {
405 rspInfo = info; 405 rspInfo = info;
406 writeSmsToSimIndex = index; 406 writeSmsToSimIndex = index;
407 parent.notify(); 407 parent.notify(info.serial);
408 return Void(); 408 return Void();
409} 409}
410 410
411Return<void> RadioResponse::deleteSmsOnSimResponse(const RadioResponseInfo& info) { 411Return<void> RadioResponse::deleteSmsOnSimResponse(const RadioResponseInfo& info) {
412 rspInfo = info; 412 rspInfo = info;
413 parent.notify(); 413 parent.notify(info.serial);
414 return Void(); 414 return Void();
415} 415}
416 416
417Return<void> RadioResponse::setBandModeResponse(const RadioResponseInfo& info) { 417Return<void> RadioResponse::setBandModeResponse(const RadioResponseInfo& info) {
418 rspInfo = info; 418 rspInfo = info;
419 parent.notify(); 419 parent.notify(info.serial);
420 return Void(); 420 return Void();
421} 421}
422 422
@@ -424,46 +424,46 @@ Return<void> RadioResponse::getAvailableBandModesResponse(
424 const RadioResponseInfo& info, 424 const RadioResponseInfo& info,
425 const ::android::hardware::hidl_vec<RadioBandMode>& /*bandModes*/) { 425 const ::android::hardware::hidl_vec<RadioBandMode>& /*bandModes*/) {
426 rspInfo = info; 426 rspInfo = info;
427 parent.notify(); 427 parent.notify(info.serial);
428 return Void(); 428 return Void();
429} 429}
430 430
431Return<void> RadioResponse::sendEnvelopeResponse( 431Return<void> RadioResponse::sendEnvelopeResponse(
432 const RadioResponseInfo& info, const ::android::hardware::hidl_string& /*commandResponse*/) { 432 const RadioResponseInfo& info, const ::android::hardware::hidl_string& /*commandResponse*/) {
433 rspInfo = info; 433 rspInfo = info;
434 parent.notify(); 434 parent.notify(info.serial);
435 return Void(); 435 return Void();
436} 436}
437 437
438Return<void> RadioResponse::sendTerminalResponseToSimResponse(const RadioResponseInfo& info) { 438Return<void> RadioResponse::sendTerminalResponseToSimResponse(const RadioResponseInfo& info) {
439 rspInfo = info; 439 rspInfo = info;
440 parent.notify(); 440 parent.notify(info.serial);
441 return Void(); 441 return Void();
442} 442}
443 443
444Return<void> RadioResponse::handleStkCallSetupRequestFromSimResponse( 444Return<void> RadioResponse::handleStkCallSetupRequestFromSimResponse(
445 const RadioResponseInfo& info) { 445 const RadioResponseInfo& info) {
446 rspInfo = info; 446 rspInfo = info;
447 parent.notify(); 447 parent.notify(info.serial);
448 return Void(); 448 return Void();
449} 449}
450 450
451Return<void> RadioResponse::explicitCallTransferResponse(const RadioResponseInfo& info) { 451Return<void> RadioResponse::explicitCallTransferResponse(const RadioResponseInfo& info) {
452 rspInfo = info; 452 rspInfo = info;
453 parent.notify(); 453 parent.notify(info.serial);
454 return Void(); 454 return Void();
455} 455}
456 456
457Return<void> RadioResponse::setPreferredNetworkTypeResponse(const RadioResponseInfo& info) { 457Return<void> RadioResponse::setPreferredNetworkTypeResponse(const RadioResponseInfo& info) {
458 rspInfo = info; 458 rspInfo = info;
459 parent.notify(); 459 parent.notify(info.serial);
460 return Void(); 460 return Void();
461} 461}
462 462
463Return<void> RadioResponse::getPreferredNetworkTypeResponse(const RadioResponseInfo& info, 463Return<void> RadioResponse::getPreferredNetworkTypeResponse(const RadioResponseInfo& info,
464 PreferredNetworkType /*nw_type*/) { 464 PreferredNetworkType /*nw_type*/) {
465 rspInfo = info; 465 rspInfo = info;
466 parent.notify(); 466 parent.notify(info.serial);
467 return Void(); 467 return Void();
468} 468}
469 469
@@ -471,69 +471,69 @@ Return<void> RadioResponse::getNeighboringCidsResponse(
471 const RadioResponseInfo& info, 471 const RadioResponseInfo& info,
472 const ::android::hardware::hidl_vec<NeighboringCell>& /*cells*/) { 472 const ::android::hardware::hidl_vec<NeighboringCell>& /*cells*/) {
473 rspInfo = info; 473 rspInfo = info;
474 parent.notify(); 474 parent.notify(info.serial);
475 return Void(); 475 return Void();
476} 476}
477 477
478Return<void> RadioResponse::setLocationUpdatesResponse(const RadioResponseInfo& info) { 478Return<void> RadioResponse::setLocationUpdatesResponse(const RadioResponseInfo& info) {
479 rspInfo = info; 479 rspInfo = info;
480 parent.notify(); 480 parent.notify(info.serial);
481 return Void(); 481 return Void();
482} 482}
483 483
484Return<void> RadioResponse::setCdmaSubscriptionSourceResponse(const RadioResponseInfo& info) { 484Return<void> RadioResponse::setCdmaSubscriptionSourceResponse(const RadioResponseInfo& info) {
485 rspInfo = info; 485 rspInfo = info;
486 parent.notify(); 486 parent.notify(info.serial);
487 return Void(); 487 return Void();
488} 488}
489 489
490Return<void> RadioResponse::setCdmaRoamingPreferenceResponse(const RadioResponseInfo& info) { 490Return<void> RadioResponse::setCdmaRoamingPreferenceResponse(const RadioResponseInfo& info) {
491 rspInfo = info; 491 rspInfo = info;
492 parent.notify(); 492 parent.notify(info.serial);
493 return Void(); 493 return Void();
494} 494}
495 495
496Return<void> RadioResponse::getCdmaRoamingPreferenceResponse(const RadioResponseInfo& info, 496Return<void> RadioResponse::getCdmaRoamingPreferenceResponse(const RadioResponseInfo& info,
497 CdmaRoamingType /*type*/) { 497 CdmaRoamingType /*type*/) {
498 rspInfo = info; 498 rspInfo = info;
499 parent.notify(); 499 parent.notify(info.serial);
500 return Void(); 500 return Void();
501} 501}
502 502
503Return<void> RadioResponse::setTTYModeResponse(const RadioResponseInfo& info) { 503Return<void> RadioResponse::setTTYModeResponse(const RadioResponseInfo& info) {
504 rspInfo = info; 504 rspInfo = info;
505 parent.notify(); 505 parent.notify(info.serial);
506 return Void(); 506 return Void();
507} 507}
508 508
509Return<void> RadioResponse::getTTYModeResponse(const RadioResponseInfo& info, TtyMode /*mode*/) { 509Return<void> RadioResponse::getTTYModeResponse(const RadioResponseInfo& info, TtyMode /*mode*/) {
510 rspInfo = info; 510 rspInfo = info;
511 parent.notify(); 511 parent.notify(info.serial);
512 return Void(); 512 return Void();
513} 513}
514 514
515Return<void> RadioResponse::setPreferredVoicePrivacyResponse(const RadioResponseInfo& info) { 515Return<void> RadioResponse::setPreferredVoicePrivacyResponse(const RadioResponseInfo& info) {
516 rspInfo = info; 516 rspInfo = info;
517 parent.notify(); 517 parent.notify(info.serial);
518 return Void(); 518 return Void();
519} 519}
520 520
521Return<void> RadioResponse::getPreferredVoicePrivacyResponse(const RadioResponseInfo& info, 521Return<void> RadioResponse::getPreferredVoicePrivacyResponse(const RadioResponseInfo& info,
522 bool /*enable*/) { 522 bool /*enable*/) {
523 rspInfo = info; 523 rspInfo = info;
524 parent.notify(); 524 parent.notify(info.serial);
525 return Void(); 525 return Void();
526} 526}
527 527
528Return<void> RadioResponse::sendCDMAFeatureCodeResponse(const RadioResponseInfo& info) { 528Return<void> RadioResponse::sendCDMAFeatureCodeResponse(const RadioResponseInfo& info) {
529 rspInfo = info; 529 rspInfo = info;
530 parent.notify(); 530 parent.notify(info.serial);
531 return Void(); 531 return Void();
532} 532}
533 533
534Return<void> RadioResponse::sendBurstDtmfResponse(const RadioResponseInfo& info) { 534Return<void> RadioResponse::sendBurstDtmfResponse(const RadioResponseInfo& info) {
535 rspInfo = info; 535 rspInfo = info;
536 parent.notify(); 536 parent.notify(info.serial);
537 return Void(); 537 return Void();
538} 538}
539 539
@@ -541,13 +541,13 @@ Return<void> RadioResponse::sendCdmaSmsResponse(const RadioResponseInfo& info,
541 const SendSmsResult& sms) { 541 const SendSmsResult& sms) {
542 rspInfo = info; 542 rspInfo = info;
543 sendSmsResult = sms; 543 sendSmsResult = sms;
544 parent.notify(); 544 parent.notify(info.serial);
545 return Void(); 545 return Void();
546} 546}
547 547
548Return<void> RadioResponse::acknowledgeLastIncomingCdmaSmsResponse(const RadioResponseInfo& info) { 548Return<void> RadioResponse::acknowledgeLastIncomingCdmaSmsResponse(const RadioResponseInfo& info) {
549 rspInfo = info; 549 rspInfo = info;
550 parent.notify(); 550 parent.notify(info.serial);
551 return Void(); 551 return Void();
552} 552}
553 553
@@ -555,19 +555,19 @@ Return<void> RadioResponse::getGsmBroadcastConfigResponse(
555 const RadioResponseInfo& info, 555 const RadioResponseInfo& info,
556 const ::android::hardware::hidl_vec<GsmBroadcastSmsConfigInfo>& /*configs*/) { 556 const ::android::hardware::hidl_vec<GsmBroadcastSmsConfigInfo>& /*configs*/) {
557 rspInfo = info; 557 rspInfo = info;
558 parent.notify(); 558 parent.notify(info.serial);
559 return Void(); 559 return Void();
560} 560}
561 561
562Return<void> RadioResponse::setGsmBroadcastConfigResponse(const RadioResponseInfo& info) { 562Return<void> RadioResponse::setGsmBroadcastConfigResponse(const RadioResponseInfo& info) {
563 rspInfo = info; 563 rspInfo = info;
564 parent.notify(); 564 parent.notify(info.serial);
565 return Void(); 565 return Void();
566} 566}
567 567
568Return<void> RadioResponse::setGsmBroadcastActivationResponse(const RadioResponseInfo& info) { 568Return<void> RadioResponse::setGsmBroadcastActivationResponse(const RadioResponseInfo& info) {
569 rspInfo = info; 569 rspInfo = info;
570 parent.notify(); 570 parent.notify(info.serial);
571 return Void(); 571 return Void();
572} 572}
573 573
@@ -575,19 +575,19 @@ Return<void> RadioResponse::getCdmaBroadcastConfigResponse(
575 const RadioResponseInfo& info, 575 const RadioResponseInfo& info,
576 const ::android::hardware::hidl_vec<CdmaBroadcastSmsConfigInfo>& /*configs*/) { 576 const ::android::hardware::hidl_vec<CdmaBroadcastSmsConfigInfo>& /*configs*/) {
577 rspInfo = info; 577 rspInfo = info;
578 parent.notify(); 578 parent.notify(info.serial);
579 return Void(); 579 return Void();
580} 580}
581 581
582Return<void> RadioResponse::setCdmaBroadcastConfigResponse(const RadioResponseInfo& info) { 582Return<void> RadioResponse::setCdmaBroadcastConfigResponse(const RadioResponseInfo& info) {
583 rspInfo = info; 583 rspInfo = info;
584 parent.notify(); 584 parent.notify(info.serial);
585 return Void(); 585 return Void();
586} 586}
587 587
588Return<void> RadioResponse::setCdmaBroadcastActivationResponse(const RadioResponseInfo& info) { 588Return<void> RadioResponse::setCdmaBroadcastActivationResponse(const RadioResponseInfo& info) {
589 rspInfo = info; 589 rspInfo = info;
590 parent.notify(); 590 parent.notify(info.serial);
591 return Void(); 591 return Void();
592} 592}
593 593
@@ -598,20 +598,20 @@ Return<void> RadioResponse::getCDMASubscriptionResponse(
598 const ::android::hardware::hidl_string& /*min*/, 598 const ::android::hardware::hidl_string& /*min*/,
599 const ::android::hardware::hidl_string& /*prl*/) { 599 const ::android::hardware::hidl_string& /*prl*/) {
600 rspInfo = info; 600 rspInfo = info;
601 parent.notify(); 601 parent.notify(info.serial);
602 return Void(); 602 return Void();
603} 603}
604 604
605Return<void> RadioResponse::writeSmsToRuimResponse(const RadioResponseInfo& info, uint32_t index) { 605Return<void> RadioResponse::writeSmsToRuimResponse(const RadioResponseInfo& info, uint32_t index) {
606 rspInfo = info; 606 rspInfo = info;
607 writeSmsToRuimIndex = index; 607 writeSmsToRuimIndex = index;
608 parent.notify(); 608 parent.notify(info.serial);
609 return Void(); 609 return Void();
610} 610}
611 611
612Return<void> RadioResponse::deleteSmsOnRuimResponse(const RadioResponseInfo& info) { 612Return<void> RadioResponse::deleteSmsOnRuimResponse(const RadioResponseInfo& info) {
613 rspInfo = info; 613 rspInfo = info;
614 parent.notify(); 614 parent.notify(info.serial);
615 return Void(); 615 return Void();
616} 616}
617 617
@@ -621,13 +621,13 @@ Return<void> RadioResponse::getDeviceIdentityResponse(
621 const ::android::hardware::hidl_string& /*esn*/, 621 const ::android::hardware::hidl_string& /*esn*/,
622 const ::android::hardware::hidl_string& /*meid*/) { 622 const ::android::hardware::hidl_string& /*meid*/) {
623 rspInfo = info; 623 rspInfo = info;
624 parent.notify(); 624 parent.notify(info.serial);
625 return Void(); 625 return Void();
626} 626}
627 627
628Return<void> RadioResponse::exitEmergencyCallbackModeResponse(const RadioResponseInfo& info) { 628Return<void> RadioResponse::exitEmergencyCallbackModeResponse(const RadioResponseInfo& info) {
629 rspInfo = info; 629 rspInfo = info;
630 parent.notify(); 630 parent.notify(info.serial);
631 return Void(); 631 return Void();
632} 632}
633 633
@@ -635,79 +635,79 @@ Return<void> RadioResponse::getSmscAddressResponse(const RadioResponseInfo& info
635 const ::android::hardware::hidl_string& smsc) { 635 const ::android::hardware::hidl_string& smsc) {
636 rspInfo = info; 636 rspInfo = info;
637 smscAddress = smsc; 637 smscAddress = smsc;
638 parent.notify(); 638 parent.notify(info.serial);
639 return Void(); 639 return Void();
640} 640}
641 641
642Return<void> RadioResponse::setSmscAddressResponse(const RadioResponseInfo& info) { 642Return<void> RadioResponse::setSmscAddressResponse(const RadioResponseInfo& info) {
643 rspInfo = info; 643 rspInfo = info;
644 parent.notify(); 644 parent.notify(info.serial);
645 return Void(); 645 return Void();
646} 646}
647 647
648Return<void> RadioResponse::reportSmsMemoryStatusResponse(const RadioResponseInfo& info) { 648Return<void> RadioResponse::reportSmsMemoryStatusResponse(const RadioResponseInfo& info) {
649 rspInfo = info; 649 rspInfo = info;
650 parent.notify(); 650 parent.notify(info.serial);
651 return Void(); 651 return Void();
652} 652}
653 653
654Return<void> RadioResponse::reportStkServiceIsRunningResponse(const RadioResponseInfo& info) { 654Return<void> RadioResponse::reportStkServiceIsRunningResponse(const RadioResponseInfo& info) {
655 rspInfo = info; 655 rspInfo = info;
656 parent.notify(); 656 parent.notify(info.serial);
657 return Void(); 657 return Void();
658} 658}
659 659
660Return<void> RadioResponse::getCdmaSubscriptionSourceResponse(const RadioResponseInfo& info, 660Return<void> RadioResponse::getCdmaSubscriptionSourceResponse(const RadioResponseInfo& info,
661 CdmaSubscriptionSource /*source*/) { 661 CdmaSubscriptionSource /*source*/) {
662 rspInfo = info; 662 rspInfo = info;
663 parent.notify(); 663 parent.notify(info.serial);
664 return Void(); 664 return Void();
665} 665}
666 666
667Return<void> RadioResponse::requestIsimAuthenticationResponse( 667Return<void> RadioResponse::requestIsimAuthenticationResponse(
668 const RadioResponseInfo& info, const ::android::hardware::hidl_string& /*response*/) { 668 const RadioResponseInfo& info, const ::android::hardware::hidl_string& /*response*/) {
669 rspInfo = info; 669 rspInfo = info;
670 parent.notify(); 670 parent.notify(info.serial);
671 return Void(); 671 return Void();
672} 672}
673 673
674Return<void> RadioResponse::acknowledgeIncomingGsmSmsWithPduResponse( 674Return<void> RadioResponse::acknowledgeIncomingGsmSmsWithPduResponse(
675 const RadioResponseInfo& info) { 675 const RadioResponseInfo& info) {
676 rspInfo = info; 676 rspInfo = info;
677 parent.notify(); 677 parent.notify(info.serial);
678 return Void(); 678 return Void();
679} 679}
680 680
681Return<void> RadioResponse::sendEnvelopeWithStatusResponse(const RadioResponseInfo& info, 681Return<void> RadioResponse::sendEnvelopeWithStatusResponse(const RadioResponseInfo& info,
682 const IccIoResult& /*iccIo*/) { 682 const IccIoResult& /*iccIo*/) {
683 rspInfo = info; 683 rspInfo = info;
684 parent.notify(); 684 parent.notify(info.serial);
685 return Void(); 685 return Void();
686} 686}
687 687
688Return<void> RadioResponse::getVoiceRadioTechnologyResponse(const RadioResponseInfo& info, 688Return<void> RadioResponse::getVoiceRadioTechnologyResponse(const RadioResponseInfo& info,
689 RadioTechnology /*rat*/) { 689 RadioTechnology /*rat*/) {
690 rspInfo = info; 690 rspInfo = info;
691 parent.notify(); 691 parent.notify(info.serial);
692 return Void(); 692 return Void();
693} 693}
694 694
695Return<void> RadioResponse::getCellInfoListResponse( 695Return<void> RadioResponse::getCellInfoListResponse(
696 const RadioResponseInfo& info, const ::android::hardware::hidl_vec<CellInfo>& /*cellInfo*/) { 696 const RadioResponseInfo& info, const ::android::hardware::hidl_vec<CellInfo>& /*cellInfo*/) {
697 rspInfo = info; 697 rspInfo = info;
698 parent.notify(); 698 parent.notify(info.serial);
699 return Void(); 699 return Void();
700} 700}
701 701
702Return<void> RadioResponse::setCellInfoListRateResponse(const RadioResponseInfo& info) { 702Return<void> RadioResponse::setCellInfoListRateResponse(const RadioResponseInfo& info) {
703 rspInfo = info; 703 rspInfo = info;
704 parent.notify(); 704 parent.notify(info.serial);
705 return Void(); 705 return Void();
706} 706}
707 707
708Return<void> RadioResponse::setInitialAttachApnResponse(const RadioResponseInfo& info) { 708Return<void> RadioResponse::setInitialAttachApnResponse(const RadioResponseInfo& info) {
709 rspInfo = info; 709 rspInfo = info;
710 parent.notify(); 710 parent.notify(info.serial);
711 return Void(); 711 return Void();
712} 712}
713 713
@@ -715,7 +715,7 @@ Return<void> RadioResponse::getImsRegistrationStateResponse(const RadioResponseI
715 bool /*isRegistered*/, 715 bool /*isRegistered*/,
716 RadioTechnologyFamily /*ratFamily*/) { 716 RadioTechnologyFamily /*ratFamily*/) {
717 rspInfo = info; 717 rspInfo = info;
718 parent.notify(); 718 parent.notify(info.serial);
719 return Void(); 719 return Void();
720} 720}
721 721
@@ -723,7 +723,7 @@ Return<void> RadioResponse::sendImsSmsResponse(const RadioResponseInfo& info,
723 const SendSmsResult& sms) { 723 const SendSmsResult& sms) {
724 rspInfo = info; 724 rspInfo = info;
725 sendSmsResult = sms; 725 sendSmsResult = sms;
726 parent.notify(); 726 parent.notify(info.serial);
727 return Void(); 727 return Void();
728} 728}
729 729
@@ -731,7 +731,7 @@ Return<void> RadioResponse::iccTransmitApduBasicChannelResponse(const RadioRespo
731 const IccIoResult& result) { 731 const IccIoResult& result) {
732 rspInfo = info; 732 rspInfo = info;
733 this->iccIoResult = result; 733 this->iccIoResult = result;
734 parent.notify(); 734 parent.notify(info.serial);
735 return Void(); 735 return Void();
736} 736}
737 737
@@ -740,13 +740,13 @@ Return<void> RadioResponse::iccOpenLogicalChannelResponse(
740 const ::android::hardware::hidl_vec<int8_t>& /*selectResponse*/) { 740 const ::android::hardware::hidl_vec<int8_t>& /*selectResponse*/) {
741 rspInfo = info; 741 rspInfo = info;
742 this->channelId = channelId; 742 this->channelId = channelId;
743 parent.notify(); 743 parent.notify(info.serial);
744 return Void();