summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-11-12 00:06:53 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-11-12 00:06:53 +0000
commite8d4c64eaf4986341034766e1d187e0670db7995 (patch)
tree51e1f00e581a412fff4cb5b69791c05913f8462a
parente4e5e3c55bdc37e422055ebded9665df685739f4 (diff)
parent4b18fff621677efc0a8c8c0bdfc48bfca934a650 (diff)
Snap for 7906314 from 4b18fff621677efc0a8c8c0bdfc48bfca934a650 to sc-v2-release
Change-Id: I4fb1731023442ee51c9315bfd32cf5e379f6defa
-rw-r--r--radio/1.6/vts/functional/radio_hidl_hal_api.cpp6
-rw-r--r--radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/radio/1.6/vts/functional/radio_hidl_hal_api.cpp b/radio/1.6/vts/functional/radio_hidl_hal_api.cpp
index cdfcc94cb..76bbebbfe 100644
--- a/radio/1.6/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.6/vts/functional/radio_hidl_hal_api.cpp
@@ -601,6 +601,9 @@ TEST_P(RadioHidlTest_v1_6, setSimCardPower_1_6) {
::android::hardware::radio::V1_6::RadioError::INVALID_ARGUMENTS,
::android::hardware::radio::V1_6::RadioError::RADIO_NOT_AVAILABLE}));
+ // Give some time for modem to fully power up the SIM card
+ sleep(MODEM_SET_SIM_POWER_DELAY_IN_SECONDS);
+
// setSimCardPower_1_6 does not return until the request is handled, and should not trigger
// CardState::ABSENT when turning off power
if (radioRsp_v1_6->rspInfo.error == ::android::hardware::radio::V1_6::RadioError::NONE) {
@@ -624,6 +627,9 @@ TEST_P(RadioHidlTest_v1_6, setSimCardPower_1_6) {
::android::hardware::radio::V1_6::RadioError::INVALID_ARGUMENTS,
::android::hardware::radio::V1_6::RadioError::RADIO_NOT_AVAILABLE}));
+ // Give some time for modem to fully power up the SIM card
+ sleep(MODEM_SET_SIM_POWER_DELAY_IN_SECONDS);
+
// setSimCardPower_1_6 does not return until the request is handled. Just verify that we still
// have CardState::PRESENT after turning the power back on
if (radioRsp_v1_6->rspInfo.error == ::android::hardware::radio::V1_6::RadioError::NONE) {
diff --git a/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h b/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h
index 54c297719..f0418652f 100644
--- a/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h
+++ b/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h
@@ -47,6 +47,7 @@ using ::android::hardware::Void;
#define MODEM_EMERGENCY_CALL_ESTABLISH_TIME 3
#define MODEM_EMERGENCY_CALL_DISCONNECT_TIME 3
+#define MODEM_SET_SIM_POWER_DELAY_IN_SECONDS 2
#define RADIO_SERVICE_SLOT1_NAME "slot1" // HAL instance name for SIM slot 1 or single SIM device
#define RADIO_SERVICE_SLOT2_NAME "slot2" // HAL instance name for SIM slot 2 on dual SIM device