Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 641d8a18 authored by Tim Lin's avatar Tim Lin Committed by Presubmit Automerger Backend
Browse files

[automerge] check all active ports 2p: 3c4b22ce

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/17709036

Bug: 226018537
Change-Id: Ibff54481edf0b7b936f330ce3346ad23149dd1bd
parents ea58dfa2 3c4b22ce
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -238,12 +238,24 @@ TEST_P(RadioConfigTest, checkPortInfoExistsAndPortActive) {
    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_config->rspInfo.type);
    EXPECT_EQ(serial, radioRsp_config->rspInfo.serial);
    if (radioRsp_config->rspInfo.error == RadioError::NONE) {
        uint8_t simCount = 0;
        // check if cardState is present, portInfo size should be more than 0
        for (const SimSlotStatus& slotStatusResponse : radioRsp_config->simSlotStatus) {
            if (slotStatusResponse.cardState == CardStatus::STATE_PRESENT) {
                ASSERT_TRUE(slotStatusResponse.portInfo.size() > 0);
                ASSERT_TRUE(slotStatusResponse.portInfo[0].portActive);
                for (const SimPortInfo& simPortInfo : slotStatusResponse.portInfo) {
                    if (simPortInfo.portActive) {
                        simCount++;
                    }
                }
            }
        }
        if (isSsSsEnabled()) {
            EXPECT_EQ(1, simCount);
        } else if (isDsDsEnabled()) {
            EXPECT_EQ(2, simCount);
        } else if (isTsTsEnabled()) {
            EXPECT_EQ(3, simCount);
        }
    }
}