diff options
author | android-build-team Robot | 2018-04-22 02:28:49 -0500 |
---|---|---|
committer | android-build-team Robot | 2018-04-22 02:28:49 -0500 |
commit | d89f95414fc715c0e89b4a5da47aa9bd277736a1 (patch) | |
tree | 3b4f0777b35824e0b89ea70d35a7dcf3eb1f8af9 | |
parent | cb0ee29e765a3f5076b90019f1c22636979ea2f4 (diff) | |
parent | 63abd8fdbc05ba5534141ae93816572e24b33289 (diff) | |
download | platform-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
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 | ||
27 | using ::android::hardware::audio::common::AUDIO_HAL_VERSION::HidlUtils; | 27 | using ::android::hardware::audio::common::AUDIO_HAL_VERSION::HidlUtils; |
28 | using ::android::hardware::audio::all_versions::implementation::isGainNormalized; | ||
29 | 28 | ||
30 | namespace android { | 29 | namespace android { |
31 | namespace hardware { | 30 | namespace 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 | ||
150 | Result ParametersUtil::setParams(const AudioParameter& param) { | 150 | Result 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. |
162 | Return<Result> PrimaryDevice::setVoiceVolume(float volume) { | 162 | Return<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 | } |
250 | Return<Result> PrimaryDevice::setBtHfpVolume(float volume) { | 250 | Return<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 |
41 | Result Stream::analyzeStatus(const char* funcName, int status) { | 41 | Result 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 | ||
46 | template <typename T> | ||
47 | inline 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 |
52 | Result Stream::analyzeStatus(const char* funcName, int status, | 47 | Result 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 | ||
73 | char* Stream::halGetParameters(const char* keys) { | 52 | char* 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 | ||
27 | using ::android::hardware::audio::AUDIO_HAL_VERSION::MessageQueueFlagBits; | 27 | using ::android::hardware::audio::AUDIO_HAL_VERSION::MessageQueueFlagBits; |
28 | using ::android::hardware::audio::all_versions::implementation::isGainNormalized; | ||
29 | #include "Conversions.h" | 28 | #include "Conversions.h" |
30 | #include "Util.h" | ||
31 | 29 | ||
32 | namespace android { | 30 | namespace android { |
33 | namespace hardware { | 31 | namespace 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 { | |||
32 | namespace implementation { | 32 | namespace implementation { |
33 | 33 | ||
34 | using ::android::hardware::audio::common::AUDIO_HAL_VERSION::ThreadInfo; | 34 | using ::android::hardware::audio::common::AUDIO_HAL_VERSION::ThreadInfo; |
35 | using ::android::hardware::audio::all_versions::implementation::isGainNormalized; | ||
36 | 35 | ||
37 | namespace { | 36 | namespace { |
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 | ||
20 | namespace android { | 24 | namespace android { |
21 | namespace hardware { | 25 | namespace hardware { |
22 | namespace audio { | 26 | namespace audio { |
23 | namespace all_versions { | 27 | namespace AUDIO_HAL_VERSION { |
24 | namespace implementation { | 28 | namespace implementation { |
25 | 29 | ||
30 | using ::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. */ |
27 | constexpr bool isGainNormalized(float gain) { | 33 | constexpr bool isGainNormalized(float gain) { |
28 | return gain >= 0.0 && gain <= 1.0; | 34 | return gain >= 0.0 && gain <= 1.0; |
29 | } | 35 | } |
30 | 36 | ||
37 | namespace util { | ||
38 | |||
39 | template <typename T> | ||
40 | inline bool element_in(T e, const std::vector<T>& v) { | ||
41 | return std::find(v.begin(), v.end(), e) != v.end(); | ||
42 | } | ||
43 | |||
44 | static 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 | |||
61 | static 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 |
2 | butlermichael@google.com | 2 | butlermichael@google.com |
3 | dgross@google.com | 3 | dgross@google.com |
4 | ijsung@google.com | ||
5 | jeanluc@google.com | 4 | jeanluc@google.com |
6 | miaowang@google.com | 5 | miaowang@google.com |
7 | yangni@google.com | 6 | mikie@google.com |
7 | pszczepaniak@google.com | ||
8 | 8 | ||
9 | # VTS team | 9 | # VTS team |
10 | yim@google.com | 10 | yim@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 | |||
3 | dgross@google.com | 3 | dgross@google.com |
4 | jeanluc@google.com | 4 | jeanluc@google.com |
5 | miaowang@google.com | 5 | miaowang@google.com |
6 | yangni@google.com | 6 | mikie@google.com |
7 | pszczepaniak@google.com | ||
7 | 8 | ||
8 | # VTS team | 9 | # VTS team |
9 | yim@google.com | 10 | yim@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 | */ |
24 | TEST_F(RadioHidlTest, setGsmBroadcastConfig) { | 24 | TEST_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 | */ |
87 | TEST_F(RadioHidlTest, getGsmBroadcastConfig) { | 87 | TEST_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 | */ |
107 | TEST_F(RadioHidlTest, setCdmaBroadcastConfig) { | 107 | TEST_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 | */ |
134 | TEST_F(RadioHidlTest, getCdmaBroadcastConfig) { | 134 | TEST_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 | */ |
152 | TEST_F(RadioHidlTest, setCdmaBroadcastActivation) { | 152 | TEST_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 | */ |
172 | TEST_F(RadioHidlTest, setGsmBroadcastActivation) { | 172 | TEST_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 | */ |
24 | TEST_F(RadioHidlTest, getDataRegistrationState) { | 24 | TEST_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 | */ |
41 | TEST_F(RadioHidlTest, setupDataCall) { | 41 | TEST_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 | */ |
89 | TEST_F(RadioHidlTest, deactivateDataCall) { | 89 | TEST_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 | */ |
111 | TEST_F(RadioHidlTest, getDataCallList) { | 111 | TEST_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 | */ |
130 | TEST_F(RadioHidlTest, setInitialAttachApn) { | 130 | TEST_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 | */ |
173 | TEST_F(RadioHidlTest, setDataAllowed) { | 173 | TEST_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 | */ |
191 | TEST_F(RadioHidlTest, setDataProfile) { | 191 | TEST_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 | */ |
32 | TEST_F(RadioHidlTest, supplyIccPinForApp) { | 32 | TEST_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 | */ |
55 | TEST_F(RadioHidlTest, supplyIccPukForApp) { | 55 | TEST_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 | */ |
78 | TEST_F(RadioHidlTest, supplyIccPin2ForApp) { | 78 | TEST_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 | */ |
101 | TEST_F(RadioHidlTest, supplyIccPuk2ForApp) { | 101 | TEST_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 | */ |
124 | TEST_F(RadioHidlTest, changeIccPinForApp) { | 124 | TEST_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 | */ |
147 | TEST_F(RadioHidlTest, changeIccPin2ForApp) { | 147 | TEST_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 | */ |
170 | TEST_F(RadioHidlTest, getImsiForApp) { | 170 | TEST_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 | */ |
198 | TEST_F(RadioHidlTest, iccIOForApp) { | 198 | TEST_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 | */ |
223 | TEST_F(RadioHidlTest, iccTransmitApduBasicChannel) { | 223 | TEST_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 | */ |
240 | TEST_F(RadioHidlTest, iccOpenLogicalChannel) { | 240 | TEST_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 | */ |
255 | TEST_F(RadioHidlTest, iccCloseLogicalChannel) { | 255 | TEST_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 | */ |
269 | TEST_F(RadioHidlTest, iccTransmitApduLogicalChannel) { | 269 | TEST_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 | */ |
286 | TEST_F(RadioHidlTest, requestIccSimAuthentication) { | 286 | TEST_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 | */ |
304 | TEST_F(RadioHidlTest, supplyNetworkDepersonalization) { | 305 | TEST_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 | */ |
24 | TEST_F(RadioHidlTest, getClir) { | 24 | TEST_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 | */ |
42 | TEST_F(RadioHidlTest, setClir) { | 42 | TEST_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 | */ |
60 | TEST_F(RadioHidlTest, getFacilityLockForApp) { | 60 | TEST_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 | */ |
83 | TEST_F(RadioHidlTest, setFacilityLockForApp) { | 83 | TEST_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 | */ |
107 | TEST_F(RadioHidlTest, setBarringPassword) { | 107 | TEST_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 | */ |
130 | TEST_F(RadioHidlTest, getClip) { | 130 | TEST_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 | */ |
148 | TEST_F(RadioHidlTest, setSuppServiceNotifications) { | 148 | TEST_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 | */ |
167 | TEST_F(RadioHidlTest, requestIsimAuthentication) { | 167 | TEST_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 | */ |
189 | TEST_F(RadioHidlTest, getImsRegistrationState) { | 189 | TEST_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 | */ |
22 | TEST_F(RadioHidlTest, getSignalStrength) { | 22 | TEST_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 | */ |
38 | TEST_F(RadioHidlTest, getVoiceRegistrationState) { | 38 | TEST_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 | */ |
54 | TEST_F(RadioHidlTest, getOperator) { | 54 | TEST_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 | */ |
70 | TEST_F(RadioHidlTest, setRadioPower) { | 70 | TEST_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 | */ |
86 | TEST_F(RadioHidlTest, getNetworkSelectionMode) { | 86 | TEST_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 | */ |
102 | TEST_F(RadioHidlTest, setNetworkSelectionModeAutomatic) { | 102 | TEST_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 | */ |
121 | TEST_F(RadioHidlTest, setNetworkSelectionModeManual) { | 121 | TEST_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 | */ |
140 | TEST_F(RadioHidlTest, getAvailableNetworks) { | 140 | TEST_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 | */ |
161 | TEST_F(RadioHidlTest, getBasebandVersion) { | 161 | TEST_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 | */ |
177 | TEST_F(RadioHidlTest, setBandMode) { | 177 | TEST_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 | */ |
194 | TEST_F(RadioHidlTest, getAvailableBandModes) { | 194 | TEST_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 | */ |
210 | TEST_F(RadioHidlTest, setPreferredNetworkType) { | 210 | TEST_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 | */ |
227 | TEST_F(RadioHidlTest, getPreferredNetworkType) { | 227 | TEST_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 | */ |
243 | TEST_F(RadioHidlTest, getNeighboringCids) { | 243 | TEST_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 | */ |
261 | TEST_F(RadioHidlTest, setLocationUpdates) { | 261 | TEST_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 | */ |
278 | TEST_F(RadioHidlTest, setCdmaRoamingPreference) { | 278 | TEST_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 | */ |
296 | TEST_F(RadioHidlTest, getCdmaRoamingPreference) { | 296 | TEST_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 | */ |
315 | TEST_F(RadioHidlTest, getTTYMode) { | 315 | TEST_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 | */ |
331 | TEST_F(RadioHidlTest, setTTYMode) { | 331 | TEST_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 | */ |
347 | TEST_F(RadioHidlTest, setPreferredVoicePrivacy) { | 347 | TEST_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 | */ |
364 | TEST_F(RadioHidlTest, getPreferredVoicePrivacy) { | 364 | TEST_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 | */ |
381 | TEST_F(RadioHidlTest, getCDMASubscription) { | 381 | TEST_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 | */ |
399 | TEST_F(RadioHidlTest, getDeviceIdentity) { | 399 | TEST_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 | */ |
416 | TEST_F(RadioHidlTest, exitEmergencyCallbackMode) { | 416 | TEST_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 | */ |
434 | TEST_F(RadioHidlTest, getCdmaSubscriptionSource) { | 434 | TEST_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 | */ |
452 | TEST_F(RadioHidlTest, setCdmaSubscriptionSource) { | 452 | TEST_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 | */ |
471 | TEST_F(RadioHidlTest, getVoiceRadioTechnology) { | 471 | TEST_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 | */ |
487 | TEST_F(RadioHidlTest, getCellInfoList) { | 487 | TEST_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 | */ |
505 | TEST_F(RadioHidlTest, setCellInfoListRate) { | 505 | TEST_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 | */ |
523 | TEST_F(RadioHidlTest, nvReadItem) { | 523 | TEST_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 | */ |
540 | TEST_F(RadioHidlTest, nvWriteItem) { | 540 | TEST_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 | */ |
560 | TEST_F(RadioHidlTest, nvWriteCdmaPrl) { | 560 | TEST_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 | */ |
578 | TEST_F(RadioHidlTest, nvResetConfig) { | 578 | TEST_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 | */ |
595 | TEST_F(RadioHidlTest, setUiccSubscription) { | 595 | TEST_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 | */ |
617 | TEST_F(RadioHidlTest, getHardwareConfig) { | 617 | TEST_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 | */ |
634 | TEST_F(RadioHidlTest, requestShutdown) { | 634 | TEST_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 | */ |
651 | TEST_F(RadioHidlTest, getRadioCapability) { | 651 | TEST_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 | */ |
667 | TEST_F(RadioHidlTest, setRadioCapability) { | 667 | TEST_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 | */ |
688 | TEST_F(RadioHidlTest, startLceService) { | 688 | TEST_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 | */ |
706 | TEST_F(RadioHidlTest, stopLceService) { | 706 | TEST_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 | */ |
724 | TEST_F(RadioHidlTest, pullLceData) { | 724 | TEST_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 | */ |
743 | TEST_F(RadioHidlTest, getModemActivityInfo) { | 743 | TEST_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 | */ |
760 | TEST_F(RadioHidlTest, setAllowedCarriers) { | 760 | TEST_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 | */ |
800 | TEST_F(RadioHidlTest, getAllowedCarriers) { | 827 | TEST_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 | */ |
817 | TEST_F(RadioHidlTest, sendDeviceState) { | 844 | TEST_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 | */ |
836 | TEST_F(RadioHidlTest, setIndicationFilter) { | 863 | TEST_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 | */ |
855 | TEST_F(RadioHidlTest, setSimCardPower) { | 882 | TEST_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 | */ |
24 | TEST_F(RadioHidlTest, sendSms) { | 24 | TEST_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 | */ |
48 | TEST_F(RadioHidlTest, sendSMSExpectMore) { | 48 | TEST_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 | */ |
74 | TEST_F(RadioHidlTest, acknowledgeLastIncomingGsmSms) { | 74 | TEST_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 | */ |
95 | TEST_F(RadioHidlTest, acknowledgeIncomingGsmSmsWithPdu) { | 95 | TEST_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 | */ |
114 | TEST_F(RadioHidlTest, sendCdmaSms) { | 114 | TEST_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 | */ |
158 | TEST_F(RadioHidlTest, acknowledgeLastIncomingCdmaSms) { | 158 | TEST_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 | */ |
182 | TEST_F(RadioHidlTest, sendImsSms) { | 182 | TEST_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 | */ |
232 | TEST_F(RadioHidlTest, getSmscAddress) { | 232 | TEST_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 | */ |
252 | TEST_F(RadioHidlTest, setSmscAddress) { | 252 | TEST_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 | */ |
273 | TEST_F(RadioHidlTest, writeSmsToSim) { | 273 | TEST_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 | */ |
299 | TEST_F(RadioHidlTest, deleteSmsOnSim) { | 299 | TEST_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 | */ |
322 | TEST_F(RadioHidlTest, writeSmsToRuim) { | 322 | TEST_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 | */ |
373 | TEST_F(RadioHidlTest, deleteSmsOnRuim) { | 373 | TEST_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 | */ |
424 | TEST_F(RadioHidlTest, reportSmsMemoryStatus) { | 424 | TEST_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 | */ |
24 | TEST_F(RadioHidlTest, sendEnvelope) { | 24 | TEST_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 | */ |
47 | TEST_F(RadioHidlTest, sendTerminalResponseToSim) { | 47 | TEST_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 | */ |
70 | TEST_F(RadioHidlTest, handleStkCallSetupRequestFromSim) { | 70 | TEST_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 | */ |
91 | TEST_F(RadioHidlTest, reportStkServiceIsRunning) { | 91 | TEST_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 | */ |
110 | TEST_F(RadioHidlTest, sendEnvelopeWithStatus) { | 110 | TEST_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 | ||
52 | void RadioHidlTest::notify() { | 49 | void 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 | ||
58 | std::cv_status RadioHidlTest::wait(int sec) { | 57 | std::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 | |||
72 | void 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 | */ |
22 | TEST_F(RadioHidlTest, getCurrentCalls) { | 22 | TEST_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 | */ |
38 | TEST_F(RadioHidlTest, dial) { | 38 | TEST_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 | */ |
65 | TEST_F(RadioHidlTest, hangup) { | 65 | TEST_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 | */ |
84 | TEST_F(RadioHidlTest, hangupWaitingOrBackground) { | 84 | TEST_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 | */ |
102 | TEST_F(RadioHidlTest, hangupForegroundResumeBackground) { | 102 | TEST_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 | */ |
120 | TEST_F(RadioHidlTest, switchWaitingOrHoldingAndActive) { | 120 | TEST_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 | */ |
138 | TEST_F(RadioHidlTest, conference) { | 138 | TEST_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 | */ |
156 | TEST_F(RadioHidlTest, rejectCall) { | 156 | TEST_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 | */ |
174 | TEST_F(RadioHidlTest, getLastCallFailCause) { | 174 | TEST_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 | */ |
191 | TEST_F(RadioHidlTest, sendUssd) { | 191 | TEST_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 | */ |
209 | TEST_F(RadioHidlTest, cancelPendingUssd) { | 209 | TEST_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 | */ |
228 | TEST_F(RadioHidlTest, getCallForwardStatus) { | 228 | TEST_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 | */ |
250 | TEST_F(RadioHidlTest, setCallForward) { | 250 | TEST_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 | */ |
272 | TEST_F(RadioHidlTest, getCallWaiting) { | 272 | TEST_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 | */ |
291 | TEST_F(RadioHidlTest, setCallWaiting) { | 291 | TEST_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 | */ |
310 | TEST_F(RadioHidlTest, acceptCall) { | 310 | TEST_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 | */ |
328 | TEST_F(RadioHidlTest, separateConnection) { | 328 | TEST_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 | */ |
347 | TEST_F(RadioHidlTest, explicitCallTransfer) { | 347 | TEST_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 | */ |
365 | TEST_F(RadioHidlTest, sendCDMAFeatureCode) { | 365 | TEST_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 | */ |
385 | TEST_F(RadioHidlTest, sendDtmf) { | 385 | TEST_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 | */ |
405 | TEST_F(RadioHidlTest, startDtmf) { | 405 | TEST_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 | */ |
425 | TEST_F(RadioHidlTest, stopDtmf) { | 425 | TEST_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 | */ |
444 | TEST_F(RadioHidlTest, setMute) { | 444 | TEST_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 | */ |
462 | TEST_F(RadioHidlTest, getMute) { | 462 | TEST_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 | */ |
478 | TEST_F(RadioHidlTest, sendBurstDtmf) { | 478 | TEST_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 | ||
31 | Return<void> RadioResponse::supplyIccPinForAppResponse(const RadioResponseInfo& info, | 31 | Return<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 | ||
38 | Return<void> RadioResponse::supplyIccPukForAppResponse(const RadioResponseInfo& info, | 38 | Return<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 | ||
45 | Return<void> RadioResponse::supplyIccPin2ForAppResponse(const RadioResponseInfo& info, | 45 | Return<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 | ||
52 | Return<void> RadioResponse::supplyIccPuk2ForAppResponse(const RadioResponseInfo& info, | 52 | Return<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 | ||
59 | Return<void> RadioResponse::changeIccPinForAppResponse(const RadioResponseInfo& info, | 59 | Return<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 | ||
66 | Return<void> RadioResponse::changeIccPin2ForAppResponse(const RadioResponseInfo& info, | 66 | Return<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 | ||
73 | Return<void> RadioResponse::supplyNetworkDepersonalizationResponse(const RadioResponseInfo& info, | 73 | Return<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 | ||
80 | Return<void> RadioResponse::getCurrentCallsResponse( | 80 | Return<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 | ||
87 | Return<void> RadioResponse::dialResponse(const RadioResponseInfo& info) { | 87 | Return<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 | ||
101 | Return<void> RadioResponse::hangupConnectionResponse(const RadioResponseInfo& info) { | 101 | Return<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 | ||
107 | Return<void> RadioResponse::hangupWaitingOrBackgroundResponse(const RadioResponseInfo& info) { | 107 | Return<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 | ||
113 | Return<void> RadioResponse::hangupForegroundResumeBackgroundResponse( | 113 | Return<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 | ||
120 | Return<void> RadioResponse::switchWaitingOrHoldingAndActiveResponse(const RadioResponseInfo& info) { | 120 | Return<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 | ||
126 | Return<void> RadioResponse::conferenceResponse(const RadioResponseInfo& info) { | 126 | Return<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 | ||
132 | Return<void> RadioResponse::rejectCallResponse(const RadioResponseInfo& info) { | 132 | Return<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 | ||
138 | Return<void> RadioResponse::getLastCallFailCauseResponse( | 138 | Return<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 | ||
145 | Return<void> RadioResponse::getSignalStrengthResponse(const RadioResponseInfo& info, | 145 | Return<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 | ||
152 | Return<void> RadioResponse::getVoiceRegistrationStateResponse( | 152 | Return<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 | ||
159 | Return<void> RadioResponse::getDataRegistrationStateResponse( | 159 | Return<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 | ||
175 | Return<void> RadioResponse::setRadioPowerResponse(const RadioResponseInfo& info) { | 175 | Return<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 | ||
181 | Return<void> RadioResponse::sendDtmfResponse(const RadioResponseInfo& info) { | 181 | Return<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 | ||
203 | Return<void> RadioResponse::setupDataCallResponse(const RadioResponseInfo& info, | 203 | Return<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 | ||
218 | Return<void> RadioResponse::sendUssdResponse(const RadioResponseInfo& info) { | 218 | Return<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 | ||
224 | Return<void> RadioResponse::cancelPendingUssdResponse(const RadioResponseInfo& info) { | 224 | Return<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 | ||
230 | Return<void> RadioResponse::getClirResponse(const RadioResponseInfo& info, int32_t /*n*/, | 230 | Return<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 | ||
237 | Return<void> RadioResponse::setClirResponse(const RadioResponseInfo& info) { | 237 | Return<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 | ||
251 | Return<void> RadioResponse::setCallForwardResponse(const RadioResponseInfo& info) { | 251 | Return<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 | ||
257 | Return<void> RadioResponse::getCallWaitingResponse(const RadioResponseInfo& info, bool /*enable*/, | 257 | Return<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 | ||
264 | Return<void> RadioResponse::setCallWaitingResponse(const RadioResponseInfo& info) { | 264 | Return<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 | ||
270 | Return<void> RadioResponse::acknowledgeLastIncomingGsmSmsResponse(const RadioResponseInfo& info) { | 270 | Return<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 | ||
276 | Return<void> RadioResponse::acceptCallResponse(const RadioResponseInfo& info) { | 276 | Return<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 | ||
282 | Return<void> RadioResponse::deactivateDataCallResponse(const RadioResponseInfo& info) { | 282 | Return<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 | ||
288 | Return<void> RadioResponse::getFacilityLockForAppResponse(const RadioResponseInfo& info, | 288 | Return<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 | ||
295 | Return<void> RadioResponse::setFacilityLockForAppResponse(const RadioResponseInfo& info, | 295 | Return<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 | ||
302 | Return<void> RadioResponse::setBarringPasswordResponse(const RadioResponseInfo& info) { | 302 | Return<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 | ||
308 | Return<void> RadioResponse::getNetworkSelectionModeResponse(const RadioResponseInfo& info, | 308 | Return<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 | ||
315 | Return<void> RadioResponse::setNetworkSelectionModeAutomaticResponse( | 315 | Return<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 | ||
322 | Return<void> RadioResponse::setNetworkSelectionModeManualResponse(const RadioResponseInfo& info) { | 322 | Return<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 | ||
336 | Return<void> RadioResponse::startDtmfResponse(const RadioResponseInfo& info) { | 336 | Return<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 | ||
342 | Return<void> RadioResponse::stopDtmfResponse(const RadioResponseInfo& info) { | 342 | Return<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 | ||
348 | Return<void> RadioResponse::getBasebandVersionResponse( | 348 | Return<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 | ||
355 | Return<void> RadioResponse::separateConnectionResponse(const RadioResponseInfo& info) { | 355 | Return<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 | ||
361 | Return<void> RadioResponse::setMuteResponse(const RadioResponseInfo& info) { | 361 | Return<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 | ||
367 | Return<void> RadioResponse::getMuteResponse(const RadioResponseInfo& info, bool /*enable*/) { | 367 | Return<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 | ||
373 | Return<void> RadioResponse::getClipResponse(const RadioResponseInfo& info, ClipStatus /*status*/) { | 373 | Return<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 | ||
398 | Return<void> RadioResponse::setSuppServiceNotificationsResponse(const RadioResponseInfo& info) { | 398 | Return<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 | ||
404 | Return<void> RadioResponse::writeSmsToSimResponse(const RadioResponseInfo& info, int32_t index) { | 404 | Return<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 | ||
411 | Return<void> RadioResponse::deleteSmsOnSimResponse(const RadioResponseInfo& info) { | 411 | Return<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 | ||
417 | Return<void> RadioResponse::setBandModeResponse(const RadioResponseInfo& info) { | 417 | Return<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 | ||
431 | Return<void> RadioResponse::sendEnvelopeResponse( | 431 | Return<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 | ||
438 | Return<void> RadioResponse::sendTerminalResponseToSimResponse(const RadioResponseInfo& info) { | 438 | Return<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 | ||
444 | Return<void> RadioResponse::handleStkCallSetupRequestFromSimResponse( | 444 | Return<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 | ||
451 | Return<void> RadioResponse::explicitCallTransferResponse(const RadioResponseInfo& info) { | 451 | Return<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 | ||
457 | Return<void> RadioResponse::setPreferredNetworkTypeResponse(const RadioResponseInfo& info) { | 457 | Return<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 | ||
463 | Return<void> RadioResponse::getPreferredNetworkTypeResponse(const RadioResponseInfo& info, | 463 | Return<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 | ||
478 | Return<void> RadioResponse::setLocationUpdatesResponse(const RadioResponseInfo& info) { | 478 | Return<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 | ||
484 | Return<void> RadioResponse::setCdmaSubscriptionSourceResponse(const RadioResponseInfo& info) { | 484 | Return<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 | ||
490 | Return<void> RadioResponse::setCdmaRoamingPreferenceResponse(const RadioResponseInfo& info) { | 490 | Return<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 | ||
496 | Return<void> RadioResponse::getCdmaRoamingPreferenceResponse(const RadioResponseInfo& info, | 496 | Return<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 | ||
503 | Return<void> RadioResponse::setTTYModeResponse(const RadioResponseInfo& info) { | 503 | Return<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 | ||
509 | Return<void> RadioResponse::getTTYModeResponse(const RadioResponseInfo& info, TtyMode /*mode*/) { | 509 | Return<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 | ||
515 | Return<void> RadioResponse::setPreferredVoicePrivacyResponse(const RadioResponseInfo& info) { | 515 | Return<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 | ||
521 | Return<void> RadioResponse::getPreferredVoicePrivacyResponse(const RadioResponseInfo& info, | 521 | Return<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 | ||
528 | Return<void> RadioResponse::sendCDMAFeatureCodeResponse(const RadioResponseInfo& info) { | 528 | Return<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 | ||
534 | Return<void> RadioResponse::sendBurstDtmfResponse(const RadioResponseInfo& info) { | 534 | Return<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 | ||
548 | Return<void> RadioResponse::acknowledgeLastIncomingCdmaSmsResponse(const RadioResponseInfo& info) { | 548 | Return<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 | ||
562 | Return<void> RadioResponse::setGsmBroadcastConfigResponse(const RadioResponseInfo& info) { | 562 | Return<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 | ||
568 | Return<void> RadioResponse::setGsmBroadcastActivationResponse(const RadioResponseInfo& info) { | 568 | Return<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 | ||
582 | Return<void> RadioResponse::setCdmaBroadcastConfigResponse(const RadioResponseInfo& info) { | 582 | Return<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 | ||
588 | Return<void> RadioResponse::setCdmaBroadcastActivationResponse(const RadioResponseInfo& info) { | 588 | Return<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 | ||
605 | Return<void> RadioResponse::writeSmsToRuimResponse(const RadioResponseInfo& info, uint32_t index) { | 605 | Return<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 | ||
612 | Return<void> RadioResponse::deleteSmsOnRuimResponse(const RadioResponseInfo& info) { | 612 | Return<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 | ||
628 | Return<void> RadioResponse::exitEmergencyCallbackModeResponse(const RadioResponseInfo& info) { | 628 | Return<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 | ||
642 | Return<void> RadioResponse::setSmscAddressResponse(const RadioResponseInfo& info) { | 642 | Return<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 | ||
648 | Return<void> RadioResponse::reportSmsMemoryStatusResponse(const RadioResponseInfo& info) { | 648 | Return<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 | ||
654 | Return<void> RadioResponse::reportStkServiceIsRunningResponse(const RadioResponseInfo& info) { | 654 | Return<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 | ||
660 | Return<void> RadioResponse::getCdmaSubscriptionSourceResponse(const RadioResponseInfo& info, | 660 | Return<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 | ||
667 | Return<void> RadioResponse::requestIsimAuthenticationResponse( | 667 | Return<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 | ||
674 | Return<void> RadioResponse::acknowledgeIncomingGsmSmsWithPduResponse( | 674 | Return<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 | ||
681 | Return<void> RadioResponse::sendEnvelopeWithStatusResponse(const RadioResponseInfo& info, | 681 | Return<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 | ||
688 | Return<void> RadioResponse::getVoiceRadioTechnologyResponse(const RadioResponseInfo& info, | 688 | Return<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 | ||
695 | Return<void> RadioResponse::getCellInfoListResponse( | 695 | Return<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 | ||
702 | Return<void> RadioResponse::setCellInfoListRateResponse(const RadioResponseInfo& info) { | 702 | Return<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 | ||
708 | Return<void> RadioResponse::setInitialAttachApnResponse(const RadioResponseInfo& info) { | 708 | Return<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(); | 744 | return Void(); |
745 | } | 745 | } |
746 | 746 | ||
747 | Return<void> RadioResponse::iccCloseLogicalChannelResponse(const RadioResponseInfo& info) { | 747 | Return<void> RadioResponse::iccCloseLogicalChannelResponse(const RadioResponseInfo& info) { |
748 | rspInfo = info; | 748 | rspInfo = info; |
749 | parent.notify(); | 749 | parent.notify(info.serial); |
750 | return Void(); | 750 | return Void(); |
751 | } | 751 | } |
752 | 752 | ||
@@ -754,44 +754,44 @@ Return<void> RadioResponse::iccTransmitApduLogicalChannelResponse(const RadioRes | |||
754 | const IccIoResult& result) { | 754 | const IccIoResult& result) { |
755 | rspInfo = info; | 755 | rspInfo = info; |
756 | this->iccIoResult = result; | 756 | this->iccIoResult = result; |
757 | parent.notify(); | 757 | parent.notify(info.serial); |
758 | return Void(); | 758 | return Void(); |
759 | } | 759 | } |
760 | 760 | ||
761 | Return<void> RadioResponse::nvReadItemResponse(const RadioResponseInfo& info, | 761 | Return<void> RadioResponse::nvReadItemResponse(const RadioResponseInfo& info, |
762 | const ::android::hardware::hidl_string& /*result*/) { | 762 | const ::android::hardware::hidl_string& /*result*/) { |
763 | rspInfo = info; | 763 | rspInfo = info; |
764 | parent.notify(); | 764 | parent.notify(info.serial); |
765 | return Void(); | 765 | return Void(); |
766 | } | 766 | } |
767 | 767 | ||
768 | Return<void> RadioResponse::nvWriteItemResponse(const RadioResponseInfo& info) { | 768 | Return<void> RadioResponse::nvWriteItemResponse(const RadioResponseInfo& info) { |
769 | rspInfo = info; | 769 | rspInfo = info; |
770 | parent.notify(); | 770 | parent.notify(info.serial); |
771 | return Void(); | 771 | return Void(); |
772 | } | 772 | } |
773 | 773 | ||
774 | Return<void> RadioResponse::nvWriteCdmaPrlResponse(const RadioResponseInfo& info) { | 774 | Return<void> RadioResponse::nvWriteCdmaPrlResponse(const RadioResponseInfo& info) { |
775 | rspInfo = info; | 775 | rspInfo = info; |
776 | parent.notify(); | 776 | parent.notify(info.serial); |
777 | return Void(); | 777 | return Void(); |
778 | } | 778 | } |
779 | 779 | ||
780 | Return<void> RadioResponse::nvResetConfigResponse(const RadioResponseInfo& info) { | 780 | Return<void> RadioResponse::nvResetConfigResponse(const RadioResponseInfo& info) { |
781 | rspInfo = info; | 781 | rspInfo = info; |
782 | parent.notify(); | 782 | parent.notify(info.serial); |
783 | return Void(); | 783 | return Void(); |
784 | } | 784 | } |
785 | 785 | ||
786 | Return<void> RadioResponse::setUiccSubscriptionResponse(const RadioResponseInfo& info) { | 786 | Return<void> RadioResponse::setUiccSubscriptionResponse(const RadioResponseInfo& info) { |
787 | rspInfo = info; | 787 | rspInfo = info; |
788 | parent.notify(); | 788 | parent.notify(info.serial); |
789 | return Void(); | 789 | return Void(); |
790 | } | 790 | } |
791 | 791 | ||
792 | Return<void> RadioResponse::setDataAllowedResponse(const RadioResponseInfo& info) { | 792 | Return<void> RadioResponse::setDataAllowedResponse(const RadioResponseInfo& info) { |
793 | rspInfo = info; | 793 | rspInfo = info; |
794 | parent.notify(); | 794 | parent.notify(info.serial); |
795 | return Void(); | 795 | return Void(); |
796 | } | 796 | } |
797 | 797 | ||
@@ -799,7 +799,7 @@ Return<void> RadioResponse::getHardwareConfigResponse( | |||
799 | const RadioResponseInfo& info, | 799 | const RadioResponseInfo& info, |
800 | const ::android::hardware::hidl_vec<HardwareConfig>& /*config*/) { | 800 | const ::android::hardware::hidl_vec<HardwareConfig>& /*config*/) { |
801 | rspInfo = info; | 801 | rspInfo = info; |
802 | parent.notify(); | 802 | parent.notify(info.serial); |
803 | return Void(); | 803 | return Void(); |
804 | } | 804 | } |
805 | 805 | ||
@@ -807,68 +807,68 @@ Return<void> RadioResponse::requestIccSimAuthenticationResponse(const RadioRespo | |||
807 | const IccIoResult& result) { | 807 | const IccIoResult& result) { |
808 | rspInfo = info; | 808 | rspInfo = info; |
809 | this->iccIoResult = result; | 809 | this->iccIoResult = result; |
810 | parent.notify(); | 810 | parent.notify(info.serial); |
811 | return Void(); | 811 | return Void(); |
812 | } | 812 | } |
813 | 813 | ||
814 | Return<void> RadioResponse::setDataProfileResponse(const RadioResponseInfo& info) { | 814 | Return<void> RadioResponse::setDataProfileResponse(const RadioResponseInfo& info) { |
815 | rspInfo = info; | 815 | rspInfo = info; |
816 | parent.notify(); | 816 | parent.notify(info.serial); |
817 | return Void(); | 817 | return Void(); |
818 | } | 818 | } |
819 | 819 | ||
820 | Return<void> RadioResponse::requestShutdownResponse(const RadioResponseInfo& info) { | 820 | Return<void> RadioResponse::requestShutdownResponse(const RadioResponseInfo& info) { |
821 | rspInfo = info; | 821 | rspInfo = info; |
822 | parent.notify(); | 822 | parent.notify(info.serial); |
823 | return Void(); | 823 | return Void(); |
824 | } | 824 | } |
825 | 825 | ||
826 | Return<void> RadioResponse::getRadioCapabilityResponse(const RadioResponseInfo& info, | 826 | Return<void> RadioResponse::getRadioCapabilityResponse(const RadioResponseInfo& info, |
827 | const RadioCapability& /*rc*/) { | 827 | const RadioCapability& /*rc*/) { |
828 | rspInfo = info; | 828 | rspInfo = info; |
829 | parent.notify(); | 829 | parent.notify(info.serial); |
830 | return Void(); | 830 | return Void(); |
831 | } | 831 | } |
832 | 832 | ||
833 | Return<void> RadioResponse::setRadioCapabilityResponse(const RadioResponseInfo& info, | 833 | Return<void> RadioResponse::setRadioCapabilityResponse(const RadioResponseInfo& info, |
834 | const RadioCapability& /*rc*/) { | 834 | const RadioCapability& /*rc*/) { |
835 | rspInfo = info; | 835 | rspInfo = info; |
836 | parent.notify(); | 836 | parent.notify(info.serial); |
837 | return Void(); | 837 | return Void(); |
838 | } | 838 | } |
839 | 839 | ||
840 | Return<void> RadioResponse::startLceServiceResponse(const RadioResponseInfo& info, | 840 | Return<void> RadioResponse::startLceServiceResponse(const RadioResponseInfo& info, |
841 | const LceStatusInfo& /*statusInfo*/) { | 841 | const LceStatusInfo& /*statusInfo*/) { |
842 | rspInfo = info; | 842 | rspInfo = info; |
843 | parent.notify(); | 843 | parent.notify(info.serial); |
844 | return Void(); | 844 | return Void(); |
845 | } | 845 | } |
846 | 846 | ||
847 | Return<void> RadioResponse::stopLceServiceResponse(const RadioResponseInfo& info, | 847 | Return<void> RadioResponse::stopLceServiceResponse(const RadioResponseInfo& info, |
848 | const LceStatusInfo& /*statusInfo*/) { | 848 | const LceStatusInfo& /*statusInfo*/) { |
849 | rspInfo = info; | 849 | rspInfo = info; |
850 | parent.notify(); | 850 | parent.notify(info.serial); |
851 | return Void(); | 851 | return Void(); |
852 | } | 852 | } |
853 | 853 | ||
854 | Return<void> RadioResponse::pullLceDataResponse(const RadioResponseInfo& info, | 854 | Return<void> RadioResponse::pullLceDataResponse(const RadioResponseInfo& info, |
855 | const LceDataInfo& /*lceInfo*/) { | 855 | const LceDataInfo& /*lceInfo*/) { |
856 | rspInfo = info; | 856 | rspInfo = info; |
857 | parent.notify(); | 857 | parent.notify(info.serial); |
858 | return Void(); | 858 | return Void(); |
859 | } | 859 | } |
860 | 860 | ||
861 | Return<void> RadioResponse::getModemActivityInfoResponse( | 861 | Return<void> RadioResponse::getModemActivityInfoResponse( |
862 | const RadioResponseInfo& info, const ActivityStatsInfo& /*activityInfo*/) { | 862 | const RadioResponseInfo& info, const ActivityStatsInfo& /*activityInfo*/) { |
863 | rspInfo = info; | 863 | rspInfo = info; |
864 | parent.notify(); | 864 | parent.notify(info.serial); |
865 | return Void(); | 865 | return Void(); |
866 | } | 866 | } |
867 | 867 | ||
868 | Return<void> RadioResponse::setAllowedCarriersResponse(const RadioResponseInfo& info, | 868 | Return<void> RadioResponse::setAllowedCarriersResponse(const RadioResponseInfo& info, |
869 | int32_t /*numAllowed*/) { | 869 | int32_t /*numAllowed*/) { |
870 | rspInfo = info; | 870 | rspInfo = info; |
871 | parent.notify(); | 871 | parent.notify(info.serial); |
872 | return Void(); | 872 | return Void(); |
873 | } | 873 | } |
874 | 874 | ||
@@ -876,25 +876,25 @@ Return<void> RadioResponse::getAllowedCarriersResponse(const RadioResponseInfo& | |||
876 | bool /*allAllowed*/, | 876 | bool /*allAllowed*/, |
877 | const CarrierRestrictions& /*carriers*/) { | 877 | const CarrierRestrictions& /*carriers*/) { |
878 | rspInfo = info; | 878 | rspInfo = info; |
879 | parent.notify(); | 879 | parent.notify(info.serial); |
880 | return Void(); | 880 | return Void(); |
881 | } | 881 | } |
882 | 882 | ||
883 | Return<void> RadioResponse::sendDeviceStateResponse(const RadioResponseInfo& info) { | 883 | Return<void> RadioResponse::sendDeviceStateResponse(const RadioResponseInfo& info) { |
884 | rspInfo = info; | 884 | rspInfo = info; |
885 | parent.notify(); | 885 | parent.notify(info.serial); |
886 | return Void(); | 886 | return Void(); |
887 | } | 887 | } |
888 | 888 | ||
889 | Return<void> RadioResponse::setIndicationFilterResponse(const RadioResponseInfo& info) { | 889 | Return<void> RadioResponse::setIndicationFilterResponse(const RadioResponseInfo& info) { |
890 | rspInfo = info; | 890 | rspInfo = info; |
891 | parent.notify(); | 891 | parent.notify(info.serial); |
892 | return Void(); | 892 | return Void(); |
893 | } | 893 | } |
894 | 894 | ||
895 | Return<void> RadioResponse::setSimCardPowerResponse(const RadioResponseInfo& info) { | 895 | Return<void> RadioResponse::setSimCardPowerResponse(const RadioResponseInfo& info) { |
896 | rspInfo = info; | 896 | rspInfo = info; |
897 | parent.notify(); | 897 | parent.notify(info.serial); |
898 | return Void(); | 898 | return Void(); |
899 | } | 899 | } |
900 | 900 | ||
diff --git a/radio/1.0/vts/functional/sap_callback.cpp b/radio/1.0/vts/functional/sap_callback.cpp index fdcc15c3..cce69d5f 100644 --- a/radio/1.0/vts/functional/sap_callback.cpp +++ b/radio/1.0/vts/functional/sap_callback.cpp | |||
@@ -21,13 +21,13 @@ SapCallback::SapCallback(SapHidlTest& parent) : parent(parent) {} | |||
21 | Return<void> SapCallback::connectResponse(int32_t token, SapConnectRsp /*sapConnectRsp*/, | 21 | Return<void> SapCallback::connectResponse(int32_t token, SapConnectRsp /*sapConnectRsp*/, |
22 | int32_t /*maxMsgSize*/) { | 22 | int32_t /*maxMsgSize*/) { |
23 | sapResponseToken = token; | 23 | sapResponseToken = token; |
24 | parent.notify(); | 24 | parent.notify(token); |
25 | return Void(); | 25 | return Void(); |
26 | } | 26 | } |
27 | 27 | ||
28 | Return<void> SapCallback::disconnectResponse(int32_t token) { | 28 | Return<void> SapCallback::disconnectResponse(int32_t token) { |
29 | sapResponseToken = token; | 29 | sapResponseToken = token; |
30 | parent.notify(); | 30 | parent.notify(token); |
31 | return Void(); | 31 | return Void(); |
32 | } | 32 | } |
33 | 33 | ||
@@ -40,7 +40,7 @@ Return<void> SapCallback::apduResponse(int32_t token, SapResultCode resultCode, | |||
40 | const ::android::hardware::hidl_vec<uint8_t>& /*apduRsp*/) { | 40 | const ::android::hardware::hidl_vec<uint8_t>& /*apduRsp*/) { |
41 | sapResponseToken = token; | 41 | sapResponseToken = token; |
42 | sapResultCode = resultCode; | 42 | sapResultCode = resultCode; |
43 | parent.notify(); | 43 | parent.notify(token); |
44 | return Void(); | 44 | return Void(); |
45 | } | 45 | } |
46 | 46 | ||
@@ -49,21 +49,21 @@ Return<void> SapCallback::transferAtrResponse( | |||
49 | const ::android::hardware::hidl_vec<uint8_t>& /*atr*/) { | 49 | const ::android::hardware::hidl_vec<uint8_t>& /*atr*/) { |
50 | sapResponseToken = token; | 50 | sapResponseToken = token; |
51 | sapResultCode = resultCode; | 51 | sapResultCode = resultCode; |
52 | parent.notify(); | 52 | parent.notify(token); |
53 | return Void(); | 53 | return Void(); |
54 | } | 54 | } |
55 | 55 | ||
56 | Return<void> SapCallback::powerResponse(int32_t token, SapResultCode resultCode) { | 56 | Return<void> SapCallback::powerResponse(int32_t token, SapResultCode resultCode) { |
57 | sapResponseToken = token; | 57 | sapResponseToken = token; |
58 | sapResultCode = resultCode; | 58 | sapResultCode = resultCode; |
59 | parent.notify(); | 59 | parent.notify(token); |
60 | return Void(); | 60 | return Void(); |
61 | } | 61 | } |
62 | 62 | ||
63 | Return<void> SapCallback::resetSimResponse(int32_t token, SapResultCode resultCode) { | 63 | Return<void> SapCallback::resetSimResponse(int32_t token, SapResultCode resultCode) { |
64 | sapResponseToken = token; | 64 | sapResponseToken = token; |
65 | sapResultCode = resultCode; | 65 | sapResultCode = resultCode; |
66 | parent.notify(); | 66 | parent.notify(token); |
67 | return Void(); | 67 | return Void(); |
68 | } | 68 | } |
69 | 69 | ||
@@ -75,7 +75,7 @@ Return<void> SapCallback::transferCardReaderStatusResponse(int32_t token, SapRes | |||
75 | int32_t /*cardReaderStatus*/) { | 75 | int32_t /*cardReaderStatus*/) { |
76 | sapResponseToken = token; | 76 | sapResponseToken = token; |
77 | sapResultCode = resultCode; | 77 | sapResultCode = resultCode; |
78 | parent.notify(); | 78 | parent.notify(token); |
79 | return Void(); | 79 | return Void(); |
80 | } | 80 | } |
81 | 81 | ||
@@ -86,6 +86,6 @@ Return<void> SapCallback::errorResponse(int32_t /*token*/) { | |||
86 | Return<void> SapCallback::transferProtocolResponse(int32_t token, SapResultCode resultCode) { | 86 | Return<void> SapCallback::transferProtocolResponse(int32_t token, SapResultCode resultCode) { |
87 | sapResponseToken = token; | 87 | sapResponseToken = token; |
88 | sapResultCode = resultCode; | 88 | sapResultCode = resultCode; |
89 | parent.notify(); | 89 | parent.notify(token); |
90 | return Void(); | 90 | return Void(); |
91 | } | 91 | } |
diff --git a/radio/1.0/vts/functional/sap_hidl_hal_api.cpp b/radio/1.0/vts/functional/sap_hidl_hal_api.cpp index d0788dde..da78f410 100644 --- a/radio/1.0/vts/functional/sap_hidl_hal_api.cpp +++ b/radio/1.0/vts/functional/sap_hidl_hal_api.cpp | |||
@@ -20,7 +20,7 @@ | |||
20 | * Test ISap.connectReq() for the response returned. | 20 | * Test ISap.connectReq() for the response returned. |
21 | */ | 21 | */ |
22 | TEST_F(SapHidlTest, connectReq) { | 22 | TEST_F(SapHidlTest, connectReq) { |
23 | int32_t token = GetRandomSerialNumber(); | 23 | token = GetRandomSerialNumber(); |
24 | int32_t maxMsgSize = 100; | 24 | int32_t maxMsgSize = 100; |
25 | 25 | ||
26 | sap->connectReq(token, maxMsgSize); | 26 | sap->connectReq(token, maxMsgSize); |
@@ -32,7 +32,7 @@ TEST_F(SapHidlTest, connectReq) { | |||
32 | * Test IRadio.disconnectReq() for the response returned | 32 | * Test IRadio.disconnectReq() for the response returned |
33 | */ | 33 | */ |
34 | TEST_F(SapHidlTest, disconnectReq) { | 34 | TEST_F(SapHidlTest, disconnectReq) { |
35 | int32_t token = GetRandomSerialNumber(); | 35 | token = GetRandomSerialNumber(); |
36 | 36 | ||
37 | sap->disconnectReq(token); | 37 | sap->disconnectReq(token); |
38 | EXPECT_EQ(std::cv_status::no_timeout, wait()); | 38 | EXPECT_EQ(std::cv_status::no_timeout, wait()); |
@@ -43,7 +43,7 @@ TEST_F(SapHidlTest, disconnectReq) { | |||
43 | * Test IRadio.apduReq() for the response returned. | 43 | * Test IRadio.apduReq() for the response returned. |
44 | */ | 44 | */ |
45 | TEST_F(SapHidlTest, apduReq) { | 45 | TEST_F(SapHidlTest, apduReq) { |
46 | int32_t token = GetRandomSerialNumber(); | 46 | token = GetRandomSerialNumber(); |
47 | SapApduType sapApduType = SapApduType::APDU; | 47 | SapApduType sapApduType = SapApduType::APDU; |
48 | android::hardware::hidl_vec<uint8_t> command = {}; | 48 | android::hardware::hidl_vec<uint8_t> command = {}; |
49 | 49 | ||
@@ -61,7 +61,7 @@ TEST_F(SapHidlTest, apduReq) { | |||
61 | * Test IRadio.transferAtrReq() for the response returned. | 61 | * Test IRadio.transferAtrReq() for the response returned. |
62 | */ | 62 | */ |
63 | TEST_F(SapHidlTest, transferAtrReq) { | 63 | TEST_F(SapHidlTest, transferAtrReq) { |
64 | int32_t token = GetRandomSerialNumber(); | 64 | token = GetRandomSerialNumber(); |
65 | 65 | ||
66 | sap->transferAtrReq(token); | 66 | sap->transferAtrReq(token); |
67 | EXPECT_EQ(std::cv_status::no_timeout, wait()); | 67 | EXPECT_EQ(std::cv_status::no_timeout, wait()); |
@@ -77,7 +77,7 @@ TEST_F(SapHidlTest, transferAtrReq) { | |||
77 | * Test IRadio.powerReq() for the response returned. | 77 | * Test IRadio.powerReq() for the response returned. |
78 | */ | 78 | */ |
79 | TEST_F(SapHidlTest, powerReq) { | 79 | TEST_F(SapHidlTest, powerReq) { |
80 | int32_t token = GetRandomSerialNumber(); | 80 | token = GetRandomSerialNumber(); |
81 | bool state = true; | 81 | bool state = true; |
82 | 82 | ||
83 | sap->powerReq(token, state); | 83 | sap->powerReq(token, state); |
@@ -94,7 +94,7 @@ TEST_F(SapHidlTest, powerReq) { | |||
94 | * Test IRadio.resetSimReq() for the response returned. | 94 | * Test IRadio.resetSimReq() for the response returned. |
95 | */ | 95 | */ |
96 | TEST_F(SapHidlTest, resetSimReq) { | 96 | TEST_F(SapHidlTest, resetSimReq) { |
97 | int32_t token = GetRandomSerialNumber(); | 97 | token = GetRandomSerialNumber(); |
98 | 98 | ||
99 | sap->resetSimReq(token); | 99 | sap->resetSimReq(token); |
100 | EXPECT_EQ(std::cv_status::no_timeout, wait()); | 100 | EXPECT_EQ(std::cv_status::no_timeout, wait()); |
@@ -110,7 +110,7 @@ TEST_F(SapHidlTest, resetSimReq) { | |||
110 | * Test IRadio.transferCardReaderStatusReq() for the response returned. | 110 | * Test IRadio.transferCardReaderStatusReq() for the response returned. |
111 | */ | 111 | */ |
112 | TEST_F(SapHidlTest, transferCardReaderStatusReq) { | 112 | TEST_F(SapHidlTest, transferCardReaderStatusReq) { |
113 | int32_t token = GetRandomSerialNumber(); | 113 | token = GetRandomSerialNumber(); |
114 | 114 | ||
115 | sap->transferCardReaderStatusReq(token); | 115 | sap->transferCardReaderStatusReq(token); |
116 | EXPECT_EQ(std::cv_status::no_timeout, wait()); | 116 | EXPECT_EQ(std::cv_status::no_timeout, wait()); |
@@ -124,7 +124,7 @@ TEST_F(SapHidlTest, transferCardReaderStatusReq) { | |||
124 | * Test IRadio.setTransferProtocolReq() for the response returned. | 124 | * Test IRadio.setTransferProtocolReq() for the response returned. |
125 | */ | 125 | */ |
126 | TEST_F(SapHidlTest, setTransferProtocolReq) { | 126 | TEST_F(SapHidlTest, setTransferProtocolReq) { |
127 | int32_t token = GetRandomSerialNumber(); | 127 | token = GetRandomSerialNumber(); |
128 | SapTransferProtocol sapTransferProtocol = SapTransferProtocol::T0; | 128 | SapTransferProtocol sapTransferProtocol = SapTransferProtocol::T0; |
129 | 129 | ||
130 | sap->setTransferProtocolReq(token, sapTransferProtocol); | 130 | sap->setTransferProtocolReq(token, sapTransferProtocol); |
diff --git a/radio/1.0/vts/functional/sap_hidl_hal_test.cpp b/radio/1.0/vts/functional/sap_hidl_hal_test.cpp index 79668bb6..65b344b6 100644 --- a/radio/1.0/vts/functional/sap_hidl_hal_test.cpp +++ b/radio/1.0/vts/functional/sap_hidl_hal_test.cpp | |||
@@ -31,10 +31,12 @@ void SapHidlTest::SetUp() { | |||
31 | 31 | ||
32 | void SapHidlTest::TearDown() {} | 32 | void SapHidlTest::TearDown() {} |
33 | 33 | ||
34 | void SapHidlTest::notify() { | 34 | void SapHidlTest::notify(int receivedToken) { |
35 | std::unique_lock<std::mutex> lock(mtx); | 35 | std::unique_lock<std::mutex> lock(mtx); |
36 | count++; | 36 | count++; |
37 | cv.notify_one(); | 37 | if (token == receivedToken) { |
38 | cv.notify_one(); | ||
39 | } | ||
38 | } | 40 | } |
39 | 41 | ||
40 | std::cv_status SapHidlTest::wait() { | 42 | std::cv_status SapHidlTest::wait() { |
diff --git a/radio/1.0/vts/functional/sap_hidl_hal_utils.h b/radio/1.0/vts/functional/sap_hidl_hal_utils.h index ec237dc3..f432932b 100644 --- a/radio/1.0/vts/functional/sap_hidl_hal_utils.h +++ b/radio/1.0/vts/functional/sap_hidl_hal_utils.h | |||
@@ -107,7 +107,7 @@ class SapHidlTest : public ::testing::VtsHalHidlTargetTestBase { | |||
107 | virtual void TearDown() override; | 107 | virtual void TearDown() override; |
108 | 108 | ||
109 | /* Used as a mechanism to inform the test about data/event callback */ | 109 | /* Used as a mechanism to inform the test about data/event callback */ |
110 | void notify(); | 110 | void notify(int receivedToken); |
111 | 111 | ||
112 | /* Test code calls this function to wait for response */ | 112 | /* Test code calls this function to wait for response */ |
113 | std::cv_status wait(); | 113 | std::cv_status wait(); |
@@ -117,4 +117,7 @@ class SapHidlTest : public ::testing::VtsHalHidlTargetTestBase { | |||
117 | 117 | ||
118 | /* Sap Callback object */ | 118 | /* Sap Callback object */ |
119 | sp<SapCallback> sapCb; | 119 | sp<SapCallback> sapCb; |
120 | |||
121 | /* Token for sap request */ | ||
122 | int32_t token; | ||
120 | }; | 123 | }; |
diff --git a/radio/1.1/vts/functional/radio_hidl_hal_api.cpp b/radio/1.1/vts/functional/radio_hidl_hal_api.cpp index 17c2a837..90077dcf 100644 --- a/radio/1.1/vts/functional/radio_hidl_hal_api.cpp +++ b/radio/1.1/vts/functional/radio_hidl_hal_api.cpp | |||
@@ -21,18 +21,57 @@ | |||
21 | * Test IRadio.setSimCardPower() for the response returned. | 21 | * Test IRadio.setSimCardPower() for the response returned. |
22 | */ | 22 | */ |
23 | TEST_F(RadioHidlTest_v1_1, setSimCardPower_1_1) { | 23 | TEST_F(RadioHidlTest_v1_1, setSimCardPower_1_1) { |
24 | int serial = GetRandomSerialNumber(); | 24 | /* Record the sim card state for the testing environment */ |
25 | CardState cardStateForTest = cardStatus.cardState; | ||
25 | 26 | ||
27 | /* Test setSimCardPower power down */ | ||
28 | serial = GetRandomSerialNumber(); | ||
26 | radio_v1_1->setSimCardPower_1_1(serial, CardPowerState::POWER_DOWN); | 29 | radio_v1_1->setSimCardPower_1_1(serial, CardPowerState::POWER_DOWN); |
27 | EXPECT_EQ(std::cv_status::no_timeout, wait()); | 30 | EXPECT_EQ(std::cv_status::no_timeout, wait()); |
28 | EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_1->rspInfo.type); | 31 | EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_1->rspInfo.type); |
29 | EXPECT_EQ(serial, radioRsp_v1_1->rspInfo.serial); | 32 | EXPECT_EQ(serial, radioRsp_v1_1->rspInfo.serial); |
33 | ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_1->rspInfo.error, | ||
34 | {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED, | ||
35 | RadioError::INVALID_ARGUMENTS, RadioError::RADIO_NOT_AVAILABLE})); | ||
36 | /* Wait some time for setting sim power down and then verify it */ | ||
37 | updateSimCardStatus(); | ||
38 | auto startTime = std::chrono::system_clock::now(); | ||
39 | while (cardStatus.cardState != CardState::ABSENT && | ||
40 | std::chrono::duration_cast<chrono::seconds>(std::chrono::system_clock::now() - startTime) | ||
41 | .count() < 80) { | ||
42 | /* Set 2 seconds as interval to check card status */ | ||
43 | sleep(2); | ||
44 | updateSimCardStatus(); | ||
45 | } | ||
46 | EXPECT_EQ(CardState::ABSENT, cardStatus.cardState); | ||
30 | 47 | ||
31 | if (cardStatus.cardState == CardState::ABSENT) { | 48 | /* Test setSimCardPower power up */ |
32 | ASSERT_TRUE( | 49 | serial = GetRandomSerialNumber(); |
33 | CheckAnyOfErrors(radioRsp_v1_1->rspInfo.error, | 50 | radio_v1_1->setSimCardPower_1_1(serial, CardPowerState::POWER_UP); |
34 | {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED, | 51 | EXPECT_EQ(std::cv_status::no_timeout, wait()); |
35 | RadioError::INVALID_ARGUMENTS, RadioError::RADIO_NOT_AVAILABLE})); | 52 | EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_1->rspInfo.type); |
53 | EXPECT_EQ(serial, radioRsp_v1_1->rspInfo.serial); | ||
54 | ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_1->rspInfo.error, | ||
55 | {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED, | ||
56 | RadioError::INVALID_ARGUMENTS, RadioError::RADIO_NOT_AVAILABLE})); | ||
57 | |||
58 | /** | ||
59 | * If the sim card status for the testing environment is PRESENT, | ||
60 | * verify if sim status is reset back. | ||
61 | */ | ||
62 | if (cardStateForTest == CardState::PRESENT) { | ||
63 | /* Wait some time for resetting back to sim power on and then verify it */ | ||
64 | updateSimCardStatus(); | ||
65 | startTime = std::chrono::system_clock::now(); | ||
66 | while (cardStatus.cardState != CardState::PRESENT && | ||
67 | std::chrono::duration_cast<chrono::seconds>(std::chrono::system_clock::now() - | ||
68 | startTime) | ||
69 | .count() < 80) { | ||
70 | /* Set 2 seconds as interval to check card status */ | ||
71 | sleep(2); | ||
72 | updateSimCardStatus(); | ||
73 | } | ||
74 | EXPECT_EQ(CardState::PRESENT, cardStatus.cardState); | ||
36 | } | 75 | } |
37 | } | 76 | } |
38 | 77 | ||
@@ -40,7 +79,7 @@ TEST_F(RadioHidlTest_v1_1, setSimCardPower_1_1) { | |||
40 | * Test IRadio.startNetworkScan() for the response returned. | 79 | * Test IRadio.startNetworkScan() for the response returned. |
41 | */ | 80 | */ |
42 | TEST_F(RadioHidlTest_v1_1, startNetworkScan) { | 81 | TEST_F(RadioHidlTest_v1_1, startNetworkScan) { |
43 | int serial = GetRandomSerialNumber(); | 82 | serial = GetRandomSerialNumber(); |
44 | 83 | ||
45 | NetworkScanRequest request; | 84 | NetworkScanRequest request; |
46 | request.type = ScanType::ONE_SHOT; | 85 | request.type = ScanType::ONE_SHOT; |
@@ -74,7 +113,7 @@ TEST_F(RadioHidlTest_v1_1, startNetworkScan) { | |||
74 | * Test IRadio.startNetworkScan() for the response returned. | 113 | * Test IRadio.startNetworkScan() for the response returned. |
75 | */ | 114 | */ |
76 | TEST_F(RadioHidlTest_v1_1, startNetworkScan_InvalidArgument) { | 115 | TEST_F(RadioHidlTest_v1_1, startNetworkScan_InvalidArgument) { |
77 | int serial = GetRandomSerialNumber(); | 116 | serial = GetRandomSerialNumber(); |
78 | 117 | ||
79 | NetworkScanRequest request; | 118 | NetworkScanRequest request; |
80 | request.type = ScanType::ONE_SHOT; | 119 | request.type = ScanType::ONE_SHOT; |
@@ -98,7 +137,7 @@ TEST_F(RadioHidlTest_v1_1, startNetworkScan_InvalidArgument) { | |||
98 | * Test IRadio.stopNetworkScan() for the response returned. | 137 | * Test IRadio.stopNetworkScan() for the response returned. |
99 | */ | 138 | */ |
100 | TEST_F(RadioHidlTest_v1_1, stopNetworkScan) { | 139 | TEST_F(RadioHidlTest_v1_1, stopNetworkScan) { |
101 | int serial = GetRandomSerialNumber(); | 140 | serial = GetRandomSerialNumber(); |
102 | 141 | ||
103 | radio_v1_1->stopNetworkScan(serial); | 142 | radio_v1_1->stopNetworkScan(serial); |
104 | EXPECT_EQ(std::cv_status::no_timeout, wait()); | 143 | EXPECT_EQ(std::cv_status::no_timeout, wait()); |
@@ -117,7 +156,7 @@ TEST_F(RadioHidlTest_v1_1, stopNetworkScan) { | |||
117 | * Test IRadio.setCarrierInfoForImsiEncryption() for the response returned. | 156 | * Test IRadio.setCarrierInfoForImsiEncryption() for the response returned. |
118 | */ | 157 | */ |
119 | TEST_F(RadioHidlTest_v1_1, setCarrierInfoForImsiEncryption) { | 158 | TEST_F(RadioHidlTest_v1_1, setCarrierInfoForImsiEncryption) { |
120 | int serial = GetRandomSerialNumber(); | 159 | serial = GetRandomSerialNumber(); |
121 | ImsiEncryptionInfo imsiInfo; | 160 | ImsiEncryptionInfo imsiInfo; |
122 | imsiInfo.mcc = "310"; | 161 | imsiInfo.mcc = "310"; |
123 | imsiInfo.mnc = "004"; | 162 | imsiInfo.mnc = "004"; |
@@ -222,7 +261,7 @@ TEST_F(RadioHidlTest_v1_1, startKeepalive) { | |||
222 | }}; | 261 | }}; |
223 | 262 | ||
224 | for (auto req = requests.begin(); req != requests.end(); req++) { | 263 | for (auto req = requests.begin(); req != requests.end(); req++) { |
225 | int serial = GetRandomSerialNumber(); | 264 | serial = GetRandomSerialNumber(); |
226 | radio_v1_1->startKeepalive(serial, *req); | 265 | radio_v1_1->startKeepalive(serial, *req); |
227 | EXPECT_EQ(std::cv_status::no_timeout, wait()); | 266 | EXPECT_EQ(std::cv_status::no_timeout, wait()); |
228 | EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_1->rspInfo.type); | 267 | EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_1->rspInfo.type); |
@@ -238,7 +277,7 @@ TEST_F(RadioHidlTest_v1_1, startKeepalive) { | |||
238 | * Test IRadio.stopKeepalive() for the response returned. | 277 | * Test IRadio.stopKeepalive() for the response returned. |
239 | */ | 278 | */ |
240 | TEST_F(RadioHidlTest_v1_1, stopKeepalive) { | 279 | TEST_F(RadioHidlTest_v1_1, stopKeepalive) { |
241 | int serial = GetRandomSerialNumber(); | 280 | serial = GetRandomSerialNumber(); |
242 | 281 | ||
243 | radio_v1_1->stopKeepalive(serial, 0xBAD); | 282 | radio_v1_1->stopKeepalive(serial, 0xBAD); |
244 | EXPECT_EQ(std::cv_status::no_timeout, wait()); | 283 | EXPECT_EQ(std::cv_status::no_timeout, wait()); |
diff --git a/radio/1.1/vts/functional/radio_hidl_hal_test.cpp b/radio/1.1/vts/functional/radio_hidl_hal_test.cpp index 6d16cd82..2f657b4e 100644 --- a/radio/1.1/vts/functional/radio_hidl_hal_test.cpp +++ b/radio/1.1/vts/functional/radio_hidl_hal_test.cpp | |||
@@ -42,22 +42,21 @@ void RadioHidlTest_v1_1::SetUp() { | |||
42 | 42 | ||
43 | radio_v1_1->setResponseFunctions(radioRsp_v1_1, radioInd_v1_1); | 43 | radio_v1_1->setResponseFunctions(radioRsp_v1_1, radioInd_v1_1); |
44 | 44 | ||
45 | int serial = GetRandomSerialNumber(); | 45 | updateSimCardStatus(); |
46 | radio_v1_1->getIccCardStatus(serial); | ||
47 | EXPECT_EQ(std::cv_status::no_timeout, wait()); | ||
48 | EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_1->rspInfo.type); | 46 | EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_1->rspInfo.type); |
49 | EXPECT_EQ(serial, radioRsp_v1_1->rspInfo.serial); | 47 | EXPECT_EQ(serial, radioRsp_v1_1->rspInfo.serial); |
50 | EXPECT_EQ(RadioError::NONE, radioRsp_v1_1->rspInfo.error); | 48 | EXPECT_EQ(RadioError::NONE, radioRsp_v1_1->rspInfo.error); |
51 | 49 | ||
52 | /* Vts Testing with Sim Absent only. This needs to be removed later in P when sim present | 50 | /* Enforce Vts Testing with Sim Status Present only. */ |
53 | * scenarios will be tested. */ | 51 | EXPECT_EQ(CardState::PRESENT, cardStatus.cardState); |
54 | EXPECT_EQ(CardState::ABSENT, cardStatus.cardState); | ||
55 | } | 52 | } |
56 | 53 | ||
57 | void RadioHidlTest_v1_1::notify() { | 54 | void RadioHidlTest_v1_1::notify(int receivedSerial) { |
58 | std::unique_lock<std::mutex> lock(mtx); | 55 | std::unique_lock<std::mutex> lock(mtx); |
59 | count++; | 56 | if (serial == receivedSerial) { |
60 | cv.notify_one(); | 57 | count++; |
58 | cv.notify_one(); | ||
59 | } | ||
61 | } | 60 | } |
62 | 61 | ||
63 | std::cv_status RadioHidlTest_v1_1::wait(int sec) { | 62 | std::cv_status RadioHidlTest_v1_1::wait(int sec) { |
@@ -74,3 +73,9 @@ std::cv_status RadioHidlTest_v1_1::wait(int sec) { | |||
74 | count--; | 73 | count--; |
75 | return status; | 74 | return status; |
76 | } | 75 | } |
76 | |||
77 | void RadioHidlTest_v1_1::updateSimCardStatus() { | ||
78 | serial = GetRandomSerialNumber(); | ||
79 | radio_v1_1->getIccCardStatus(serial); | ||
80 | EXPECT_EQ(std::cv_status::no_timeout, wait()); | ||
81 | } \ No newline at end of file | ||
diff --git a/radio/1.1/vts/functional/radio_hidl_hal_utils_v1_1.h b/radio/1.1/vts/functional/radio_hidl_hal_utils_v1_1.h index 36d15c75..925f4fc8 100644 --- a/radio/1.1/vts/functional/radio_hidl_hal_utils_v1_1.h +++ b/radio/1.1/vts/functional/radio_hidl_hal_utils_v1_1.h | |||
@@ -558,11 +558,17 @@ class RadioHidlTest_v1_1 : public ::testing::VtsHalHidlTargetTestBase { | |||
558 | std::condition_variable cv; | 558 | std::condition_variable cv; |
559 | int count; | 559 | int count; |
560 | 560 | ||
561 | /* Serial number for radio request */ | ||
562 | int serial; | ||
563 | |||
564 | /* Update Sim Card Status */ | ||
565 | void updateSimCardStatus(); | ||
566 | |||
561 | public: | 567 | public: |
562 | virtual void SetUp() override; | 568 | virtual void SetUp() override; |
563 | 569 | ||
564 | /* Used as a mechanism to inform the test about data/event callback */ | 570 | /* Used as a mechanism to inform the test about data/event callback */ |
565 | void notify(); | 571 | void notify(int receivedSerial); |
566 | 572 | ||
567 | /* Test code calls this function to wait for response */ | 573 | /* Test code calls this function to wait for response */ |
568 | std::cv_status wait(int sec = TIMEOUT_PERIOD); | 574 | std::cv_status wait(int sec = TIMEOUT_PERIOD); |
diff --git a/radio/1.1/vts/functional/radio_response.cpp b/radio/1.1/vts/functional/radio_response.cpp index 400ef3c0..c2edde8b 100644 --- a/radio/1.1/vts/functional/radio_response.cpp +++ b/radio/1.1/vts/functional/radio_response.cpp | |||
@@ -25,7 +25,7 @@ Return<void> RadioResponse_v1_1::getIccCardStatusResponse(const RadioResponseInf | |||
25 | const CardStatus& card_status) { | 25 | const CardStatus& card_status) { |
26 | rspInfo = info; | 26 | rspInfo = info; |
27 | cardStatus = card_status; | 27 | cardStatus = card_status; |
28 | parent_v1_1.notify(); | 28 | parent_v1_1.notify(info.serial); |
29 | return Void(); | 29 | return Void(); |
30 | } | 30 | } |
31 | 31 | ||
@@ -661,25 +661,25 @@ Return<void> RadioResponse_v1_1::acknowledgeRequest(int32_t /*serial*/) { | |||
661 | Return<void> RadioResponse_v1_1::setCarrierInfoForImsiEncryptionResponse( | 661 | Return<void> RadioResponse_v1_1::setCarrierInfoForImsiEncryptionResponse( |
662 | const RadioResponseInfo& info) { | 662 | const RadioResponseInfo& info) { |
663 | rspInfo = info; | 663 | rspInfo = info; |
664 | parent_v1_1.notify(); | 664 | parent_v1_1.notify(info.serial); |
665 | return Void(); | 665 | return Void(); |
666 | } | 666 | } |
667 | 667 | ||
668 | Return<void> RadioResponse_v1_1::setSimCardPowerResponse_1_1(const RadioResponseInfo& info) { | 668 | Return<void> RadioResponse_v1_1::setSimCardPowerResponse_1_1(const RadioResponseInfo& info) { |
669 | rspInfo = info; | 669 | rspInfo = info; |
670 | parent_v1_1.notify(); | 670 | parent_v1_1.notify(info.serial); |
671 | return Void(); | 671 | return Void(); |
672 | } | 672 | } |
673 | 673 | ||
674 | Return<void> RadioResponse_v1_1::startNetworkScanResponse(const RadioResponseInfo& info) { | 674 | Return<void> RadioResponse_v1_1::startNetworkScanResponse(const RadioResponseInfo& info) { |
675 | rspInfo = info; | 675 | rspInfo = info; |
676 | parent_v1_1.notify(); | 676 | parent_v1_1.notify(info.serial); |
677 | return Void(); | 677 | return Void(); |
678 | } | 678 | } |
679 | 679 | ||
680 | Return<void> RadioResponse_v1_1::stopNetworkScanResponse(const RadioResponseInfo& info) { | 680 | Return<void> RadioResponse_v1_1::stopNetworkScanResponse(const RadioResponseInfo& info) { |
681 | rspInfo = info; | 681 | rspInfo = info; |
682 | parent_v1_1.notify(); | 682 | parent_v1_1.notify(info.serial); |
683 | return Void(); | 683 | return Void(); |
684 | } | 684 | } |
685 | 685 | ||
@@ -687,12 +687,12 @@ Return<void> RadioResponse_v1_1::startKeepaliveResponse(const RadioResponseInfo& | |||
687 | const KeepaliveStatus& status) { | 687 | const KeepaliveStatus& status) { |
688 | rspInfo = info; | 688 | rspInfo = info; |
689 | keepaliveStatus = status; | 689 | keepaliveStatus = status; |
690 | parent_v1_1.notify(); | 690 | parent_v1_1.notify(info.serial); |
691 | return Void(); | 691 | return Void(); |
692 | } | 692 | } |
693 | 693 | ||
694 | Return<void> RadioResponse_v1_1::stopKeepaliveResponse(const RadioResponseInfo& info) { | 694 | Return<void> RadioResponse_v1_1::stopKeepaliveResponse(const RadioResponseInfo& info) { |
695 | rspInfo = info; | 695 | rspInfo = info; |
696 | parent_v1_1.notify(); | 696 | parent_v1_1.notify(info.serial); |
697 | return Void(); | 697 | return Void(); |
698 | } | 698 | } |
diff --git a/radio/1.2/vts/functional/radio_hidl_hal_api.cpp b/radio/1.2/vts/functional/radio_hidl_hal_api.cpp index 0febd380..9284fd8f 100644 --- a/radio/1.2/vts/functional/radio_hidl_hal_api.cpp +++ b/radio/1.2/vts/functional/radio_hidl_hal_api.cpp | |||
@@ -23,7 +23,7 @@ | |||
23 | * Test IRadio.startNetworkScan() for the response returned. | 23 | * Test IRadio.startNetworkScan() for the response returned. |
24 | */ | 24 | */ |
25 | TEST_F(RadioHidlTest_v1_2, startNetworkScan) { | 25 | TEST_F(RadioHidlTest_v1_2, startNetworkScan) { |
26 | const int serial = GetRandomSerialNumber(); | 26 | serial = GetRandomSerialNumber(); |
27 | 27 | ||
28 | RadioAccessSpecifier specifier = { | 28 | RadioAccessSpecifier specifier = { |
29 | .radioAccessNetwork = RadioAccessNetworks::GERAN, | 29 | .radioAccessNetwork = RadioAccessNetworks::GERAN, |
@@ -51,7 +51,7 @@ TEST_F(RadioHidlTest_v1_2, startNetworkScan) { | |||
51 | * Test IRadio.startNetworkScan() with invalid specifier. | 51 | * Test IRadio.startNetworkScan() with invalid specifier. |
52 | */ | 52 | */ |
53 | TEST_F(RadioHidlTest_v1_2, startNetworkScan_InvalidArgument) { | 53 | TEST_F(RadioHidlTest_v1_2, startNetworkScan_InvalidArgument) { |
54 | const int serial = GetRandomSerialNumber(); | 54 | serial = GetRandomSerialNumber(); |
55 | 55 | ||
56 | ::android::hardware::radio::V1_2::NetworkScanRequest request = {.type = ScanType::ONE_SHOT, | 56 | ::android::hardware::radio::V1_2::NetworkScanRequest request = {.type = ScanType::ONE_SHOT, |
57 | .interval = 60}; | 57 | .interval = 60}; |
@@ -77,7 +77,7 @@ TEST_F(RadioHidlTest_v1_2, startNetworkScan_InvalidArgument) { | |||
77 | * Test IRadio.startNetworkScan() with invalid interval (lower boundary). | 77 | * Test IRadio.startNetworkScan() with invalid interval (lower boundary). |
78 | */ | 78 | */ |
79 | TEST_F(RadioHidlTest_v1_2, startNetworkScan_InvalidInterval1) { | 79 | TEST_F(RadioHidlTest_v1_2, startNetworkScan_InvalidInterval1) { |
80 | const int serial = GetRandomSerialNumber(); | 80 | serial = GetRandomSerialNumber(); |
81 | 81 | ||
82 | RadioAccessSpecifier specifier = { | 82 | RadioAccessSpecifier specifier = { |
83 | .radioAccessNetwork = RadioAccessNetworks::GERAN, | 83 | .radioAccessNetwork = RadioAccessNetworks::GERAN, |
@@ -113,7 +113,7 @@ TEST_F(RadioHidlTest_v1_2, startNetworkScan_InvalidInterval1) { | |||
113 | * Test IRadio.startNetworkScan() with invalid interval (upper boundary). | 113 | * Test IRadio.startNetworkScan() with invalid interval (upper boundary). |
114 | */ | 114 | */ |
115 | TEST_F(RadioHidlTest_v1_2, startNetworkScan_InvalidInterval2) { | 115 | TEST_F(RadioHidlTest_v1_2, startNetworkScan_InvalidInterval2) { |
116 | const int serial = GetRandomSerialNumber(); | 116 | serial = GetRandomSerialNumber(); |
117 | 117 | ||
118 | RadioAccessSpecifier specifier = { | 118 | RadioAccessSpecifier specifier = { |
119 | .radioAccessNetwork = RadioAccessNetworks::GERAN, | 119 | .radioAccessNetwork = RadioAccessNetworks::GERAN, |
@@ -149,7 +149,7 @@ TEST_F(RadioHidlTest_v1_2, startNetworkScan_InvalidInterval2) { | |||
149 | * Test IRadio.startNetworkScan() with invalid max search time (lower boundary). | 149 | * Test IRadio.startNetworkScan() with invalid max search time (lower boundary). |
150 | */ | 150 | */ |
151 | TEST_F(RadioHidlTest_v1_2, startNetworkScan_InvalidMaxSearchTime1) { | 151 | TEST_F(RadioHidlTest_v1_2, startNetworkScan_InvalidMaxSearchTime1) { |
152 | const int serial = GetRandomSerialNumber(); | 152 | serial = GetRandomSerialNumber(); |
153 | 153 | ||
154 | RadioAccessSpecifier specifier = { | 154 | RadioAccessSpecifier specifier = { |
155 | .radioAccessNetwork = RadioAccessNetworks::GERAN, | 155 | .radioAccessNetwork = RadioAccessNetworks::GERAN, |
@@ -185,7 +185,7 @@ TEST_F(RadioHidlTest_v1_2, startNetworkScan_InvalidMaxSearchTime1) { | |||
185 | * Test IRadio.startNetworkScan() with invalid max search time (upper boundary). | 185 | * Test IRadio.startNetworkScan() with invalid max search time (upper boundary). |
186 | */ | 186 | */ |
187 | TEST_F(RadioHidlTest_v1_2, startNetworkScan_InvalidMaxSearchTime2) { | 187 | TEST_F(RadioHidlTest_v1_2, startNetworkScan_InvalidMaxSearchTime2) { |
188 | const int serial = GetRandomSerialNumber(); | 188 | serial = GetRandomSerialNumber(); |
189 | 189 | ||
190 | RadioAccessSpecifier specifier = { | 190 | RadioAccessSpecifier specifier = { |
191 | .radioAccessNetwork = RadioAccessNetworks::GERAN, | 191 | .radioAccessNetwork = RadioAccessNetworks::GERAN, |
@@ -221,7 +221,7 @@ TEST_F(RadioHidlTest_v1_2, startNetworkScan_InvalidMaxSearchTime2) { | |||
221 | * Test IRadio.startNetworkScan() with invalid periodicity (lower boundary). | 221 | * Test IRadio.startNetworkScan() with invalid periodicity (lower boundary). |
222 | */ | 222 | */ |
223 | TEST_F(RadioHidlTest_v1_2, startNetworkScan_InvalidPeriodicity1) { | 223 | TEST_F(RadioHidlTest_v1_2, startNetworkScan_InvalidPeriodicity1) { |
224 | const int serial = GetRandomSerialNumber(); | 224 | serial = GetRandomSerialNumber(); |
225 | 225 | ||
226 | RadioAccessSpecifier specifier = { | 226 | RadioAccessSpecifier specifier = { |
227 | .radioAccessNetwork = RadioAccessNetworks::GERAN, | 227 | .radioAccessNetwork = RadioAccessNetworks::GERAN, |
@@ -257,7 +257,7 @@ TEST_F(RadioHidlTest_v1_2, startNetworkScan_InvalidPeriodicity1) { | |||
257 | * Test IRadio.startNetworkScan() with invalid periodicity (upper boundary). | 257 | * Test IRadio.startNetworkScan() with invalid periodicity (upper boundary). |
258 | */ | 258 | */ |
259 | TEST_F(RadioHidlTest_v1_2, startNetworkScan_InvalidPeriodicity2) { | 259 | TEST_F(RadioHidlTest_v1_2, startNetworkScan_InvalidPeriodicity2) { |
260 | const int serial = GetRandomSerialNumber(); | 260 | serial = GetRandomSerialNumber(); |
261 | 261 | ||
262 | RadioAccessSpecifier specifier = { | 262 | RadioAccessSpecifier specifier = { |
263 | .radioAccessNetwork = RadioAccessNetworks::GERAN, | 263 | .radioAccessNetwork = RadioAccessNetworks::GERAN, |
@@ -293,7 +293,7 @@ TEST_F(RadioHidlTest_v1_2, startNetworkScan_InvalidPeriodicity2) { | |||
293 | * Test IRadio.startNetworkScan() with valid periodicity | 293 | * Test IRadio.startNetworkScan() with valid periodicity |
294 | */ | 294 | */ |
295 | TEST_F(RadioHidlTest_v1_2, startNetworkScan_GoodRequest1) { | 295 | TEST_F(RadioHidlTest_v1_2, startNetworkScan_GoodRequest1) { |
296 | const int serial = GetRandomSerialNumber(); | 296 | serial = GetRandomSerialNumber(); |
297 | 297 | ||
298 | RadioAccessSpecifier specifier = { | 298 | RadioAccessSpecifier specifier = { |
299 | .radioAccessNetwork = RadioAccessNetworks::GERAN, | 299 | .radioAccessNetwork = RadioAccessNetworks::GERAN, |
@@ -328,7 +328,7 @@ TEST_F(RadioHidlTest_v1_2, startNetworkScan_GoodRequest1) { | |||
328 | * Test IRadio.startNetworkScan() with valid periodicity and plmns | 328 | * Test IRadio.startNetworkScan() with valid periodicity and plmns |
329 | */ | 329 | */ |
330 | TEST_F(RadioHidlTest_v1_2, startNetworkScan_GoodRequest2) { | 330 | TEST_F(RadioHidlTest_v1_2, startNetworkScan_GoodRequest2) { |
331 | const int serial = GetRandomSerialNumber(); | 331 | serial = GetRandomSerialNumber(); |
332 | 332 | ||
333 | RadioAccessSpecifier specifier = { | 333 | RadioAccessSpecifier specifier = { |
334 | .radioAccessNetwork = RadioAccessNetworks::GERAN, | 334 | .radioAccessNetwork = RadioAccessNetworks::GERAN, |
@@ -364,7 +364,7 @@ TEST_F(RadioHidlTest_v1_2, startNetworkScan_GoodRequest2) { | |||
364 | * Test IRadio.setIndicationFilter_1_2() | 364 | * Test IRadio.setIndicationFilter_1_2() |
365 | */ | 365 | */ |
366 | TEST_F(RadioHidlTest_v1_2, setIndicationFilter_1_2) { | 366 | TEST_F(RadioHidlTest_v1_2, setIndicationFilter_1_2) { |
367 | const int serial = GetRandomSerialNumber(); | 367 | serial = GetRandomSerialNumber(); |
368 | 368 | ||
369 | Return<void> res = radio_v1_2->setIndicationFilter_1_2( | 369 | Return<void> res = radio_v1_2->setIndicationFilter_1_2( |
370 | serial, static_cast<int>(::android::hardware::radio::V1_2::IndicationFilter::ALL)); | 370 | serial, static_cast<int>(::android::hardware::radio::V1_2::IndicationFilter::ALL)); |
@@ -382,7 +382,7 @@ TEST_F(RadioHidlTest_v1_2, setIndicationFilter_1_2) { | |||
382 | * Test IRadio.setSignalStrengthReportingCriteria() with invalid hysteresisDb | 382 | * Test IRadio.setSignalStrengthReportingCriteria() with invalid hysteresisDb |
383 | */ | 383 | */ |
384 | TEST_F(RadioHidlTest_v1_2, setSignalStrengthReportingCriteria_invalidHysteresisDb) { | 384 | TEST_F(RadioHidlTest_v1_2, setSignalStrengthReportingCriteria_invalidHysteresisDb) { |
385 | const int serial = GetRandomSerialNumber(); | 385 | serial = GetRandomSerialNumber(); |
386 | 386 | ||
387 | Return<void> res = radio_v1_2->setSignalStrengthReportingCriteria( | 387 | Return<void> res = radio_v1_2->setSignalStrengthReportingCriteria( |
388 | serial, 5000, | 388 | serial, 5000, |
@@ -402,7 +402,7 @@ TEST_F(RadioHidlTest_v1_2, setSignalStrengthReportingCriteria_invalidHysteresisD | |||
402 | * Test IRadio.setSignalStrengthReportingCriteria() with empty parameters | 402 | * Test IRadio.setSignalStrengthReportingCriteria() with empty parameters |
403 | */ | 403 | */ |
404 | TEST_F(RadioHidlTest_v1_2, setSignalStrengthReportingCriteria_EmptyParams) { | 404 | TEST_F(RadioHidlTest_v1_2, setSignalStrengthReportingCriteria_EmptyParams) { |
405 | const int serial = GetRandomSerialNumber(); | 405 | serial = GetRandomSerialNumber(); |
406 | 406 | ||
407 | Return<void> res = radio_v1_2->setSignalStrengthReportingCriteria( | 407 | Return<void> res = radio_v1_2->setSignalStrengthReportingCriteria( |
408 | serial, 0, 0, {}, ::android::hardware::radio::V1_2::AccessNetwork::GERAN); | 408 | serial, 0, 0, {}, ::android::hardware::radio::V1_2::AccessNetwork::GERAN); |
@@ -420,7 +420,7 @@ TEST_F(RadioHidlTest_v1_2, setSignalStrengthReportingCriteria_EmptyParams) { | |||
420 | * Test IRadio.setSignalStrengthReportingCriteria() for GERAN | 420 | * Test IRadio.setSignalStrengthReportingCriteria() for GERAN |
421 | */ | 421 | */ |
422 | TEST_F(RadioHidlTest_v1_2, setSignalStrengthReportingCriteria_Geran) { | 422 | TEST_F(RadioHidlTest_v1_2, setSignalStrengthReportingCriteria_Geran) { |
423 | const int serial = GetRandomSerialNumber(); | 423 | serial = GetRandomSerialNumber(); |
424 | 424 | ||
425 | Return<void> res = radio_v1_2->setSignalStrengthReportingCriteria( | 425 | Return<void> res = radio_v1_2->setSignalStrengthReportingCriteria( |
426 | serial, 5000, 2, {-109, -103, -97, -89}, | 426 | serial, 5000, 2, {-109, -103, -97, -89}, |
@@ -439,7 +439,7 @@ TEST_F(RadioHidlTest_v1_2, setSignalStrengthReportingCriteria_Geran) { | |||
439 | * Test IRadio.setSignalStrengthReportingCriteria() for UTRAN | 439 | * Test IRadio.setSignalStrengthReportingCriteria() for UTRAN |
440 | */ | 440 | */ |
441 | TEST_F(RadioHidlTest_v1_2, setSignalStrengthReportingCriteria_Utran) { | 441 | TEST_F(RadioHidlTest_v1_2, setSignalStrengthReportingCriteria_Utran) { |
442 | const int serial = GetRandomSerialNumber(); | 442 | serial = GetRandomSerialNumber(); |
443 | 443 | ||
444 | Return<void> res = radio_v1_2->setSignalStrengthReportingCriteria( | 444 | Return<void> res = radio_v1_2->setSignalStrengthReportingCriteria( |
445 | serial, 5000, 2, {-110, -97, -73, -49, -25}, | 445 | serial, 5000, 2, {-110, -97, -73, -49, -25}, |
@@ -458,7 +458,7 @@ TEST_F(RadioHidlTest_v1_2, setSignalStrengthReportingCriteria_Utran) { | |||
458 | * Test IRadio.setSignalStrengthReportingCriteria() for EUTRAN | 458 | * Test IRadio.setSignalStrengthReportingCriteria() for EUTRAN |
459 | */ | 459 | */ |
460 | TEST_F(RadioHidlTest_v1_2, setSignalStrengthReportingCriteria_Eutran) { | 460 | TEST_F(RadioHidlTest_v1_2, setSignalStrengthReportingCriteria_Eutran) { |
461 | const int serial = GetRandomSerialNumber(); | 461 | serial = GetRandomSerialNumber(); |
462 | 462 | ||
463 | Return<void> res = radio_v1_2->setSignalStrengthReportingCriteria( | 463 | Return<void> res = radio_v1_2->setSignalStrengthReportingCriteria( |
464 | serial, 5000, 2, {-140, -128, -118, -108, -98, -44}, | 464 | serial, 5000, 2, {-140, -128, -118, -108, -98, -44}, |
@@ -477,7 +477,7 @@ TEST_F(RadioHidlTest_v1_2, setSignalStrengthReportingCriteria_Eutran) { | |||
477 | * Test IRadio.setSignalStrengthReportingCriteria() for CDMA2000 | 477 | * Test IRadio.setSignalStrengthReportingCriteria() for CDMA2000 |
478 | */ | 478 | */ |
479 | TEST_F(RadioHidlTest_v1_2, setSignalStrengthReportingCriteria_Cdma2000) { | 479 | TEST_F(RadioHidlTest_v1_2, setSignalStrengthReportingCriteria_Cdma2000) { |
480 | const int serial = GetRandomSerialNumber(); | 480 | serial = GetRandomSerialNumber(); |
481 | 481 | ||
482 | Return<void> res = radio_v1_2->setSignalStrengthReportingCriteria( | 482 | Return<void> res = radio_v1_2->setSignalStrengthReportingCriteria( |
483 | serial, 5000, 2, {-105, -90, -75, -65}, | 483 | serial, 5000, 2, {-105, -90, -75, -65}, |
@@ -496,7 +496,7 @@ TEST_F(RadioHidlTest_v1_2, setSignalStrengthReportingCriteria_Cdma2000) { | |||
496 | * Test IRadio.setLinkCapacityReportingCriteria() invalid hysteresisDlKbps | 496 | * Test IRadio.setLinkCapacityReportingCriteria() invalid hysteresisDlKbps |
497 | */ | 497 | */ |
498 | TEST_F(RadioHidlTest_v1_2, setLinkCapacityReportingCriteria_invalidHysteresisDlKbps) { | 498 | TEST_F(RadioHidlTest_v1_2, setLinkCapacityReportingCriteria_invalidHysteresisDlKbps) { |
499 | const int serial = GetRandomSerialNumber(); | 499 | serial = GetRandomSerialNumber(); |
500 | 500 | ||
501 | Return<void> res = radio_v1_2->setLinkCapacityReportingCriteria( | 501 | Return<void> res = radio_v1_2->setLinkCapacityReportingCriteria( |
502 | serial, 5000, | 502 | serial, 5000, |
@@ -517,7 +517,7 @@ TEST_F(RadioHidlTest_v1_2, setLinkCapacityReportingCriteria_invalidHysteresisDlK | |||
517 | * Test IRadio.setLinkCapacityReportingCriteria() invalid hysteresisUlKbps | 517 | * Test IRadio.setLinkCapacityReportingCriteria() invalid hysteresisUlKbps |
518 | */ | 518 | */ |
519 | TEST_F(RadioHidlTest_v1_2, setLinkCapacityReportingCriteria_invalidHysteresisUlKbps) { | 519 | TEST_F(RadioHidlTest_v1_2, setLinkCapacityReportingCriteria_invalidHysteresisUlKbps) { |
520 | const int serial = GetRandomSerialNumber(); | 520 | serial = GetRandomSerialNumber(); |
521 | 521 | ||
522 | Return<void> res = radio_v1_2->setLinkCapacityReportingCriteria( | 522 | Return<void> res = radio_v1_2->setLinkCapacityReportingCriteria( |
523 | serial, 5000, 500, | 523 | serial, 5000, 500, |
@@ -538,7 +538,7 @@ TEST_F(RadioHidlTest_v1_2, setLinkCapacityReportingCriteria_invalidHysteresisUlK | |||
538 | * Test IRadio.setLinkCapacityReportingCriteria() empty params | 538 | * Test IRadio.setLinkCapacityReportingCriteria() empty params |
539 | */ | 539 | */ |
540 | TEST_F(RadioHidlTest_v1_2, setLinkCapacityReportingCriteria_emptyParams) { | 540 | TEST_F(RadioHidlTest_v1_2, setLinkCapacityReportingCriteria_emptyParams) { |
541 | const int serial = GetRandomSerialNumber(); | 541 | serial = GetRandomSerialNumber(); |
542 | 542 | ||
543 | Return<void> res = radio_v1_2->setLinkCapacityReportingCriteria( | 543 | Return<void> res = radio_v1_2->setLinkCapacityReportingCriteria( |
544 | serial, 0, 0, 0, {}, {}, ::android::hardware::radio::V1_2::AccessNetwork::GERAN); | 544 | serial, 0, 0, 0, {}, {}, ::android::hardware::radio::V1_2::AccessNetwork::GERAN); |
@@ -556,7 +556,7 @@ TEST_F(RadioHidlTest_v1_2, setLinkCapacityReportingCriteria_emptyParams) { | |||
556 | * Test IRadio.setLinkCapacityReportingCriteria() GERAN | 556 | * Test IRadio.setLinkCapacityReportingCriteria() GERAN |
557 | */ | 557 | */ |
558 | TEST_F(RadioHidlTest_v1_2, setLinkCapacityReportingCriteria_Geran) { | 558 | TEST_F(RadioHidlTest_v1_2, setLinkCapacityReportingCriteria_Geran) { |
559 | const int serial = GetRandomSerialNumber(); | 559 | serial = GetRandomSerialNumber(); |
560 | 560 | ||
561 | Return<void> res = radio_v1_2->setLinkCapacityReportingCriteria( | 561 | Return<void> res = radio_v1_2->setLinkCapacityReportingCriteria( |
562 | serial, 5000, 500, 100, {1000, 5000, 10000, 20000}, {500, 1000, 5000, 10000}, | 562 | serial, 5000, 500, 100, {1000, 5000, 10000, 20000}, {500, 1000, 5000, 10000}, |
@@ -575,7 +575,7 @@ TEST_F(RadioHidlTest_v1_2, setLinkCapacityReportingCriteria_Geran) { | |||
575 | * Test IRadio.setupDataCall_1_2() for the response returned. | 575 | * Test IRadio.setupDataCall_1_2() for the response returned. |
576 | */ | 576 | */ |
577 | TEST_F(RadioHidlTest_v1_2, setupDataCall_1_2) { | 577 | TEST_F(RadioHidlTest_v1_2, setupDataCall_1_2) { |
578 | const int serial = GetRandomSerialNumber(); | 578 | serial = GetRandomSerialNumber(); |
579 | 579 | ||
580 | ::android::hardware::radio::V1_2::AccessNetwork accessNetwork = | 580 | ::android::hardware::radio::V1_2::AccessNetwork accessNetwork = |
581 | ::android::hardware::radio::V1_2::AccessNetwork::EUTRAN; | 581 | ::android::hardware::radio::V1_2::AccessNetwork::EUTRAN; |
@@ -635,7 +635,7 @@ TEST_F(RadioHidlTest_v1_2, setupDataCall_1_2) { | |||
635 | * Test IRadio.deactivateDataCall_1_2() for the response returned. | 635 | * Test IRadio.deactivateDataCall_1_2() for the response returned. |
636 | */ | 636 | */ |
637 | TEST_F(RadioHidlTest_v1_2, deactivateDataCall_1_2) { | 637 | TEST_F(RadioHidlTest_v1_2, deactivateDataCall_1_2) { |
638 | const int serial = GetRandomSerialNumber(); | 638 | serial = GetRandomSerialNumber(); |
639 | int cid = 1; | 639 | int cid = 1; |
640 | ::android::hardware::radio::V1_2::DataRequestReason reason = | 640 | ::android::hardware::radio::V1_2::DataRequestReason reason = |
641 | ::android::hardware::radio::V1_2::DataRequestReason::NORMAL; | 641 | ::android::hardware::radio::V1_2::DataRequestReason::NORMAL; |
diff --git a/radio/1.2/vts/functional/radio_hidl_hal_test.cpp b/radio/1.2/vts/functional/radio_hidl_hal_test.cpp index edac1aac..b34f138b 100644 --- a/radio/1.2/vts/functional/radio_hidl_hal_test.cpp +++ b/radio/1.2/vts/functional/radio_hidl_hal_test.cpp | |||
@@ -42,21 +42,24 @@ void RadioHidlTest_v1_2::SetUp() { | |||
42 | 42 | ||
43 | radio_v1_2->setResponseFunctions(radioRsp_v1_2, radioInd_v1_2); | 43 | radio_v1_2->setResponseFunctions(radioRsp_v1_2, radioInd_v1_2); |
44 | 44 | ||
45 | int serial = GetRandomSerialNumber(); | 45 | updateSimCardStatus(); |
46 | radio_v1_2->getIccCardStatus(serial); | ||
47 | EXPECT_EQ(std::cv_status::no_timeout, wait()); | ||
48 | EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_2->rspInfo.type); | 46 | EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_2->rspInfo.type); |
49 | EXPECT_EQ(serial, radioRsp_v1_2->rspInfo.serial); | 47 | EXPECT_EQ(serial, radioRsp_v1_2->rspInfo.serial); |
50 | EXPECT_EQ(RadioError::NONE, radioRsp_v1_2->rspInfo.error); | 48 | EXPECT_EQ(RadioError::NONE, radioRsp_v1_2->rspInfo.error); |
49 | |||
50 | /* Enforce Vts Testing with Sim Status Present only. */ | ||
51 | EXPECT_EQ(CardState::PRESENT, cardStatus.base.cardState); | ||
51 | } | 52 | } |
52 | 53 | ||
53 | /* | 54 | /* |
54 | * Notify that the response message is received. | 55 | * Notify that the response message is received. |
55 | */ | 56 | */ |
56 | void RadioHidlTest_v1_2::notify() { | 57 | void RadioHidlTest_v1_2::notify(int receivedSerial) { |
57 | std::unique_lock<std::mutex> lock(mtx_); | 58 | std::unique_lock<std::mutex> lock(mtx_); |
58 | count_++; | 59 | if (serial == receivedSerial) { |
59 | cv_.notify_one(); | 60 | count_++; |
61 | cv_.notify_one(); | ||
62 | } | ||
60 | } | 63 | } |
61 | 64 | ||
62 | /* | 65 | /* |
@@ -75,4 +78,10 @@ std::cv_status RadioHidlTest_v1_2::wait() { | |||
75 | } | 78 | } |
76 | count_--; | 79 | count_--; |
77 | return status; | 80 | return status; |
81 | } | ||
82 | |||
83 | void RadioHidlTest_v1_2::updateSimCardStatus() { | ||
84 | serial = GetRandomSerialNumber(); | ||
85 | radio_v1_2->getIccCardStatus(serial); | ||
86 | EXPECT_EQ(std::cv_status::no_timeout, wait()); | ||
78 | } \ No newline at end of file | 87 | } \ No newline at end of file |
diff --git a/radio/1.2/vts/functional/radio_hidl_hal_utils_v1_2.h b/radio/1.2/vts/functional/radio_hidl_hal_utils_v1_2.h index 2d0ea295..47122023 100644 --- a/radio/1.2/vts/functional/radio_hidl_hal_utils_v1_2.h +++ b/radio/1.2/vts/functional/radio_hidl_hal_utils_v1_2.h | |||
@@ -613,11 +613,17 @@ class RadioHidlTest_v1_2 : public ::testing::VtsHalHidlTargetTestBase { | |||
613 | std::condition_variable cv_; | 613 | std::condition_variable cv_; |
614 | int count_; | 614 | int count_; |
615 | 615 | ||
616 | /* Serial number for radio request */ | ||
617 | int serial; | ||
618 | |||
619 | /* Update Sim Card Status */ | ||
620 | void updateSimCardStatus(); | ||
621 | |||
616 | public: | 622 | public: |
617 | virtual void SetUp() override; | 623 | virtual void SetUp() override; |
618 | 624 | ||
619 | /* Used as a mechanism to inform the test about data/event callback */ | 625 | /* Used as a mechanism to inform the test about data/event callback */ |
620 | void notify(); | 626 | void notify(int receivedSerial); |
621 | 627 | ||
622 | /* Test code calls this function to wait for response */ | 628 | /* Test code calls this function to wait for response */ |
623 | std::cv_status wait(); | 629 | std::cv_status wait(); |
diff --git a/radio/1.2/vts/functional/radio_response.cpp b/radio/1.2/vts/functional/radio_response.cpp index 85ec3e06..f6bead21 100644 --- a/radio/1.2/vts/functional/radio_response.cpp +++ b/radio/1.2/vts/functional/radio_response.cpp | |||
@@ -155,7 +155,7 @@ Return<void> RadioResponse_v1_2::sendSMSExpectMoreResponse(const RadioResponseIn | |||
155 | Return<void> RadioResponse_v1_2::setupDataCallResponse(const RadioResponseInfo& info, | 155 | Return<void> RadioResponse_v1_2::setupDataCallResponse(const RadioResponseInfo& info, |
156 | const SetupDataCallResult& /*dcResponse*/) { | 156 | const SetupDataCallResult& /*dcResponse*/) { |
157 | rspInfo = info; | 157 | rspInfo = info; |
158 | parent_v1_2.notify(); | 158 | parent_v1_2.notify(info.serial); |
159 | return Void(); | 159 | return Void(); |
160 | } | 160 | } |
161 | 161 | ||
@@ -211,7 +211,7 @@ Return<void> RadioResponse_v1_2::acceptCallResponse(const RadioResponseInfo& /*i | |||
211 | 211 | ||
212 | Return<void> RadioResponse_v1_2::deactivateDataCallResponse(const RadioResponseInfo& info) { | 212 | Return<void> RadioResponse_v1_2::deactivateDataCallResponse(const RadioResponseInfo& info) { |
213 | rspInfo = info; | 213 | rspInfo = info; |
214 | parent_v1_2.notify(); | 214 | parent_v1_2.notify(info.serial); |
215 | return Void(); | 215 | return Void(); |
216 | } | 216 | } |
217 | 217 | ||
@@ -320,7 +320,7 @@ Return<void> RadioResponse_v1_2::getAvailableBandModesResponse( | |||
320 | const RadioResponseInfo& info, const ::android::hardware::hidl_vec<RadioBandMode>& bandModes) { | 320 | const RadioResponseInfo& info, const ::android::hardware::hidl_vec<RadioBandMode>& bandModes) { |
321 | rspInfo = info; | 321 | rspInfo = info; |
322 | radioBandModes = bandModes; | 322 | radioBandModes = bandModes; |
323 | parent_v1_2.notify(); | 323 | parent_v1_2.notify(info.serial); |
324 | return Void(); | 324 | return Void(); |
325 | } | 325 | } |
326 | 326 | ||
@@ -677,13 +677,13 @@ Return<void> RadioResponse_v1_2::setSimCardPowerResponse_1_1(const RadioResponse | |||
677 | 677 | ||
678 | Return<void> RadioResponse_v1_2::startNetworkScanResponse(const RadioResponseInfo& info) { | 678 | Return<void> RadioResponse_v1_2::startNetworkScanResponse(const RadioResponseInfo& info) { |
679 | rspInfo = info; | 679 | rspInfo = info; |
680 | parent_v1_2.notify(); | 680 | parent_v1_2.notify(info.serial); |
681 | return Void(); | 681 | return Void(); |
682 | } | 682 | } |
683 | 683 | ||
684 | Return<void> RadioResponse_v1_2::stopNetworkScanResponse(const RadioResponseInfo& info) { | 684 | Return<void> RadioResponse_v1_2::stopNetworkScanResponse(const RadioResponseInfo& info) { |
685 | rspInfo = info; | 685 | rspInfo = info; |
686 | parent_v1_2.notify(); | 686 | parent_v1_2.notify(info.serial); |
687 | return Void(); | 687 | return Void(); |
688 | } | 688 | } |
689 | 689 | ||
@@ -700,14 +700,14 @@ Return<void> RadioResponse_v1_2::stopKeepaliveResponse(const RadioResponseInfo& | |||
700 | Return<void> RadioResponse_v1_2::setSignalStrengthReportingCriteriaResponse( | 700 | Return<void> RadioResponse_v1_2::setSignalStrengthReportingCriteriaResponse( |
701 | const RadioResponseInfo& info) { | 701 | const RadioResponseInfo& info) { |
702 | rspInfo = info; | 702 | rspInfo = info; |
703 | parent_v1_2.notify(); | 703 | parent_v1_2.notify(info.serial); |
704 | return Void(); | 704 | return Void(); |
705 | } | 705 | } |
706 | 706 | ||
707 | Return<void> RadioResponse_v1_2::setLinkCapacityReportingCriteriaResponse( | 707 | Return<void> RadioResponse_v1_2::setLinkCapacityReportingCriteriaResponse( |
708 | const RadioResponseInfo& info) { | 708 | const RadioResponseInfo& info) { |
709 | rspInfo = info; | 709 | rspInfo = info; |
710 | parent_v1_2.notify(); | 710 | parent_v1_2.notify(info.serial); |
711 | return Void(); | 711 | return Void(); |
712 | } | 712 | } |
713 | 713 | ||
@@ -716,7 +716,7 @@ Return<void> RadioResponse_v1_2::getIccCardStatusResponse_1_2( | |||
716 | const ::android::hardware::radio::V1_2::CardStatus& card_status) { | 716 | const ::android::hardware::radio::V1_2::CardStatus& card_status) { |
717 | rspInfo = info; | 717 | rspInfo = info; |
718 | cardStatus = card_status; | 718 | cardStatus = card_status; |
719 | parent_v1_2.notify(); | 719 | parent_v1_2.notify(info.serial); |
720 | return Void(); | 720 | return Void(); |
721 | } | 721 | } |
722 | 722 | ||
@@ -724,7 +724,7 @@ Return<void> RadioResponse_v1_2::getCurrentCallsResponse_1_2( | |||
724 | const RadioResponseInfo& info, | 724 | const RadioResponseInfo& info, |
725 | const ::android::hardware::hidl_vec<::android::hardware::radio::V1_2::Call>& /*calls*/) { | 725 | const ::android::hardware::hidl_vec<::android::hardware::radio::V1_2::Call>& /*calls*/) { |
726 | rspInfo = info; | 726 | rspInfo = info; |
727 | parent_v1_2.notify(); | 727 | parent_v1_2.notify(info.serial); |
728 | return Void(); | 728 | return Void(); |
729 | } | 729 | } |
730 | 730 | ||
@@ -732,7 +732,7 @@ Return<void> RadioResponse_v1_2::getSignalStrengthResponse_1_2( | |||
732 | const RadioResponseInfo& info, | 732 | const RadioResponseInfo& info, |
733 | const ::android::hardware::radio::V1_2::SignalStrength& /*sig_strength*/) { | 733 | const ::android::hardware::radio::V1_2::SignalStrength& /*sig_strength*/) { |
734 | rspInfo = info; | 734 | rspInfo = info; |
735 | parent_v1_2.notify(); | 735 | parent_v1_2.notify(info.serial); |
736 | return Void(); | 736 | return Void(); |
737 | } | 737 | } |
738 | 738 | ||
@@ -740,7 +740,7 @@ Return<void> RadioResponse_v1_2::getCellInfoListResponse_1_2( | |||
740 | const RadioResponseInfo& info, | 740 | const RadioResponseInfo& info, |
741 | const ::android::hardware::hidl_vec<::android::hardware::radio::V1_2::CellInfo>& /*cellInfo*/) { | 741 | const ::android::hardware::hidl_vec<::android::hardware::radio::V1_2::CellInfo>& /*cellInfo*/) { |
742 | rspInfo = info; | 742 | rspInfo = info; |
743 | parent_v1_2.notify(); | 743 | parent_v1_2.notify(info.serial); |
744 | return Void(); | 744 | return Void(); |
745 | } | 745 | } |
746 | 746 | ||