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

Commit 0abd37fd authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 4930082 from 503fed74 to pi-qpr1-release

Change-Id: Ie1b443e7ebc85604c038ade54cde3092af78f9b1
parents 4cadf35f 503fed74
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -308,7 +308,7 @@ bool verify_attestation_record(const string& challenge, const string& app_id,

    expected_sw_enforced.push_back(TAG_ATTESTATION_APPLICATION_ID, HidlBuf(app_id));

    EXPECT_GE(att_keymaster_version, 3U);
    EXPECT_EQ(att_keymaster_version, 4U);
    EXPECT_EQ(security_level, att_keymaster_security_level);
    EXPECT_EQ(security_level, att_attestation_security_level);

+30 −20
Original line number Diff line number Diff line
@@ -779,20 +779,27 @@ TEST_F(RadioHidlTest, setAllowedCarriers) {
                                     {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
    }

    if (radioRsp->rspInfo.error == RadioError::NONE) {
        /* Setting to carrier restriction needs some time */
        updateSimCardStatus();
        auto startTime = std::chrono::system_clock::now();
        while (cardStatus.cardState != CardState::RESTRICTED &&
           std::chrono::duration_cast<chrono::seconds>(std::chrono::system_clock::now() - startTime)
               std::chrono::duration_cast<chrono::seconds>(std::chrono::system_clock::now() -
                                                           startTime)
                       .count() < 10) {
            /* Set 2 seconds as interval to check card status */
            sleep(2);
            updateSimCardStatus();
        }
        EXPECT_EQ(CardState::RESTRICTED, cardStatus.cardState);
    }
    sleep(10);

    /* Reset back to no carrier restriction */
    /** 
     * Another test case of the API to cover to allow carrier.
     * If the API is supported, this is also used to reset to no carrier restriction
     * status for cardStatus. 
     */
    memset(&carriers, 0, sizeof(carriers));
    carriers.allowedCarriers.resize(0);
    carriers.excludedCarriers.resize(0);
@@ -808,11 +815,13 @@ TEST_F(RadioHidlTest, setAllowedCarriers) {
                                     {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
    }

    if (radioRsp->rspInfo.error == RadioError::NONE) {
        /* Resetting back to no carrier restriction needs some time */
        updateSimCardStatus();
    startTime = std::chrono::system_clock::now();
        auto startTime = std::chrono::system_clock::now();
        while (cardStatus.cardState == CardState::RESTRICTED &&
           std::chrono::duration_cast<chrono::seconds>(std::chrono::system_clock::now() - startTime)
               std::chrono::duration_cast<chrono::seconds>(std::chrono::system_clock::now() -
                                                           startTime)
                       .count() < 10) {
            /* Set 2 seconds as interval to check card status */
            sleep(2);
@@ -821,6 +830,7 @@ TEST_F(RadioHidlTest, setAllowedCarriers) {
        EXPECT_NE(CardState::RESTRICTED, cardStatus.cardState);
        sleep(10);
    }
}

/*
 * Test IRadio.getAllowedCarriers() for the response returned.