From 1c4905c2eeded997194f9d7ce7f828502fbc99e6 Mon Sep 17 00:00:00 2001 From: Malcolm Chen Date: Thu, 2 Apr 2020 17:39:01 -0700 Subject: [PATCH] Skip enableModem vts if in single SIM mode. Due to modem issue, enableModem only works in dual-SIM mode. And we only use that in dual-SIM mode. So skipping testing in in single SIM mode. Bug: 152557383 Test: vts Change-Id: I41f200317eaf9be0613f92e5bff9a3ee8a98ef15 Merged-In: I41f200317eaf9be0613f92e5bff9a3ee8a98ef15 --- radio/1.3/vts/functional/radio_hidl_hal_api.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/radio/1.3/vts/functional/radio_hidl_hal_api.cpp b/radio/1.3/vts/functional/radio_hidl_hal_api.cpp index ca64305bfe..1a01b284b5 100644 --- a/radio/1.3/vts/functional/radio_hidl_hal_api.cpp +++ b/radio/1.3/vts/functional/radio_hidl_hal_api.cpp @@ -16,6 +16,7 @@ #include #include +#include "VtsCoreUtil.h" #define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk()) @@ -25,6 +26,15 @@ TEST_P(RadioHidlTest_v1_3, enableModem) { serial = GetRandomSerialNumber(); + bool isMultiSimEnabled = + testing::checkSubstringInCommandOutput("getprop persist.radio.multisim.config", + "dsds") || + testing::checkSubstringInCommandOutput("getprop persist.radio.multisim.config", "tsts"); + if (!isMultiSimEnabled) { + ALOGI("enableModem, no need to test in single SIM mode"); + return; + } + bool responseToggle = radioRsp_v1_3->enableModemResponseToggle; Return res = radio_v1_3->enableModem(serial, true); ASSERT_OK(res);