Adding DSDA configuration for VTS.

Some of the devices which supports DSDA configuration is failing with IRadioConfig.setSimSlotsMapping() VTS. Hence improving the Test case to support.
Test: atest VtsHalRadioTargetTest
Bug: 253337352

Change-Id: I66314124dbf410d8344025aa45529652e126368a
This commit is contained in:
Zhang Yuan 2022-10-20 16:39:19 +08:00 committed by sandeepjs
parent b40d5856bc
commit 2910082f89
3 changed files with 11 additions and 2 deletions

View file

@ -92,6 +92,10 @@ bool isDsDsEnabled() {
return testing::checkSubstringInCommandOutput("getprop persist.radio.multisim.config", "dsds");
}
bool isDsDaEnabled() {
return testing::checkSubstringInCommandOutput("getprop persist.radio.multisim.config", "dsda");
}
bool isTsTsEnabled() {
return testing::checkSubstringInCommandOutput("getprop persist.radio.multisim.config", "tsts");
}

View file

@ -103,6 +103,11 @@ bool isSsSsEnabled();
*/
bool isDsDsEnabled();
/*
* Check if device is in DSDA (Dual SIM Dual Active).
*/
bool isDsDaEnabled();
/*
* Check if device is in TSTS (Triple SIM Triple Standby).
*/

View file

@ -176,7 +176,7 @@ TEST_P(RadioConfigTest, setSimSlotsMapping) {
slotPortMapping.physicalSlotId = -1;
slotPortMapping.portId = -1;
std::vector<SlotPortMapping> slotPortMappingList = {slotPortMapping};
if (isDsDsEnabled()) {
if (isDsDsEnabled() || isDsDaEnabled()) {
slotPortMappingList.push_back(slotPortMapping);
} else if (isTsTsEnabled()) {
slotPortMappingList.push_back(slotPortMapping);
@ -252,7 +252,7 @@ TEST_P(RadioConfigTest, checkPortInfoExistsAndPortActive) {
}
if (isSsSsEnabled()) {
EXPECT_EQ(1, simCount);
} else if (isDsDsEnabled()) {
} else if (isDsDsEnabled() || isDsDaEnabled()) {
EXPECT_EQ(2, simCount);
} else if (isTsTsEnabled()) {
EXPECT_EQ(3, simCount);