Loading radio/1.6/IRadio.hal +7 −0 Original line number Diff line number Diff line Loading @@ -217,6 +217,13 @@ interface IRadio extends @1.5::IRadio { * Each subsequent request to this method is processed only after the * completion of the previous one. * * When the SIM is in POWER_DOWN, the modem should send an empty vector of * AppStatus in CardStatus.applications. If a SIM in the POWER_DOWN state * is removed and a new SIM is inserted, the new SIM should be in POWER_UP * mode by default. If the device is turned off or restarted while the SIM * is in POWER_DOWN, then the SIM should turn on normally in POWER_UP mode * when the device turns back on. * * Response callback is IRadioResponse.setSimCardPowerResponse_1_6(). * Note that this differs from setSimCardPower_1_1 in that the response * callback should only be sent once the device has finished executing Loading radio/1.6/IRadioResponse.hal +0 −1 Original line number Diff line number Diff line Loading @@ -207,7 +207,6 @@ interface IRadioResponse extends @1.5::IRadioResponse { * Valid errors returned: * RadioError:NONE * RadioError:RADIO_NOT_AVAILABLE * RadioError:REQUEST_NOT_SUPPORTED * RadioError:INVALID_ARGUMENTS * RadioError:SIM_ERR (indicates a timeout or other issue making the SIM unresponsive) * Loading radio/1.6/vts/functional/radio_hidl_hal_api.cpp +47 −3 Original line number Diff line number Diff line Loading @@ -320,7 +320,6 @@ TEST_P(RadioHidlTest_v1_6, setDataThrottling) { res = radio_v1_6->setDataThrottling(serial, DataThrottlingAction::THROTTLE_ANCHOR_CARRIER, 60); ASSERT_OK(res); EXPECT_EQ(std::cv_status::no_timeout, wait()); EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type); EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial); Loading Loading @@ -350,7 +349,6 @@ TEST_P(RadioHidlTest_v1_6, setDataThrottling) { res = radio_v1_6->setDataThrottling(serial, DataThrottlingAction::NO_DATA_THROTTLING, 60); ASSERT_OK(res); EXPECT_EQ(std::cv_status::no_timeout, wait()); EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type); EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial); Loading @@ -361,3 +359,49 @@ TEST_P(RadioHidlTest_v1_6, setDataThrottling) { ::android::hardware::radio::V1_6::RadioError::NONE, ::android::hardware::radio::V1_6::RadioError::INVALID_ARGUMENTS})); } /* * Test IRadio.setSimCardPower_1_6() for the response returned. */ TEST_P(RadioHidlTest_v1_6, setSimCardPower_1_6) { /* Test setSimCardPower power down */ serial = GetRandomSerialNumber(); radio_v1_6->setSimCardPower_1_6(serial, CardPowerState::POWER_DOWN); EXPECT_EQ(std::cv_status::no_timeout, wait()); EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type); EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial); ASSERT_TRUE( CheckAnyOfErrors(radioRsp_v1_6->rspInfo.error, {::android::hardware::radio::V1_6::RadioError::NONE, ::android::hardware::radio::V1_6::RadioError::INVALID_ARGUMENTS, ::android::hardware::radio::V1_6::RadioError::RADIO_NOT_AVAILABLE})); // 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) { /* Wait some time for setting sim power down and then verify it */ updateSimCardStatus(); EXPECT_EQ(CardState::PRESENT, cardStatus.base.base.base.cardState); // applications should be an empty vector of AppStatus EXPECT_EQ(0, cardStatus.applications.size()); } /* Test setSimCardPower power up */ serial = GetRandomSerialNumber(); radio_v1_6->setSimCardPower_1_6(serial, CardPowerState::POWER_UP); EXPECT_EQ(std::cv_status::no_timeout, wait()); EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type); EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial); ASSERT_TRUE( CheckAnyOfErrors(radioRsp_v1_6->rspInfo.error, {::android::hardware::radio::V1_6::RadioError::NONE, ::android::hardware::radio::V1_6::RadioError::INVALID_ARGUMENTS, ::android::hardware::radio::V1_6::RadioError::RADIO_NOT_AVAILABLE})); // 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) { updateSimCardStatus(); EXPECT_EQ(CardState::PRESENT, cardStatus.base.base.base.cardState); } } Loading
radio/1.6/IRadio.hal +7 −0 Original line number Diff line number Diff line Loading @@ -217,6 +217,13 @@ interface IRadio extends @1.5::IRadio { * Each subsequent request to this method is processed only after the * completion of the previous one. * * When the SIM is in POWER_DOWN, the modem should send an empty vector of * AppStatus in CardStatus.applications. If a SIM in the POWER_DOWN state * is removed and a new SIM is inserted, the new SIM should be in POWER_UP * mode by default. If the device is turned off or restarted while the SIM * is in POWER_DOWN, then the SIM should turn on normally in POWER_UP mode * when the device turns back on. * * Response callback is IRadioResponse.setSimCardPowerResponse_1_6(). * Note that this differs from setSimCardPower_1_1 in that the response * callback should only be sent once the device has finished executing Loading
radio/1.6/IRadioResponse.hal +0 −1 Original line number Diff line number Diff line Loading @@ -207,7 +207,6 @@ interface IRadioResponse extends @1.5::IRadioResponse { * Valid errors returned: * RadioError:NONE * RadioError:RADIO_NOT_AVAILABLE * RadioError:REQUEST_NOT_SUPPORTED * RadioError:INVALID_ARGUMENTS * RadioError:SIM_ERR (indicates a timeout or other issue making the SIM unresponsive) * Loading
radio/1.6/vts/functional/radio_hidl_hal_api.cpp +47 −3 Original line number Diff line number Diff line Loading @@ -320,7 +320,6 @@ TEST_P(RadioHidlTest_v1_6, setDataThrottling) { res = radio_v1_6->setDataThrottling(serial, DataThrottlingAction::THROTTLE_ANCHOR_CARRIER, 60); ASSERT_OK(res); EXPECT_EQ(std::cv_status::no_timeout, wait()); EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type); EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial); Loading Loading @@ -350,7 +349,6 @@ TEST_P(RadioHidlTest_v1_6, setDataThrottling) { res = radio_v1_6->setDataThrottling(serial, DataThrottlingAction::NO_DATA_THROTTLING, 60); ASSERT_OK(res); EXPECT_EQ(std::cv_status::no_timeout, wait()); EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type); EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial); Loading @@ -361,3 +359,49 @@ TEST_P(RadioHidlTest_v1_6, setDataThrottling) { ::android::hardware::radio::V1_6::RadioError::NONE, ::android::hardware::radio::V1_6::RadioError::INVALID_ARGUMENTS})); } /* * Test IRadio.setSimCardPower_1_6() for the response returned. */ TEST_P(RadioHidlTest_v1_6, setSimCardPower_1_6) { /* Test setSimCardPower power down */ serial = GetRandomSerialNumber(); radio_v1_6->setSimCardPower_1_6(serial, CardPowerState::POWER_DOWN); EXPECT_EQ(std::cv_status::no_timeout, wait()); EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type); EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial); ASSERT_TRUE( CheckAnyOfErrors(radioRsp_v1_6->rspInfo.error, {::android::hardware::radio::V1_6::RadioError::NONE, ::android::hardware::radio::V1_6::RadioError::INVALID_ARGUMENTS, ::android::hardware::radio::V1_6::RadioError::RADIO_NOT_AVAILABLE})); // 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) { /* Wait some time for setting sim power down and then verify it */ updateSimCardStatus(); EXPECT_EQ(CardState::PRESENT, cardStatus.base.base.base.cardState); // applications should be an empty vector of AppStatus EXPECT_EQ(0, cardStatus.applications.size()); } /* Test setSimCardPower power up */ serial = GetRandomSerialNumber(); radio_v1_6->setSimCardPower_1_6(serial, CardPowerState::POWER_UP); EXPECT_EQ(std::cv_status::no_timeout, wait()); EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type); EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial); ASSERT_TRUE( CheckAnyOfErrors(radioRsp_v1_6->rspInfo.error, {::android::hardware::radio::V1_6::RadioError::NONE, ::android::hardware::radio::V1_6::RadioError::INVALID_ARGUMENTS, ::android::hardware::radio::V1_6::RadioError::RADIO_NOT_AVAILABLE})); // 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) { updateSimCardStatus(); EXPECT_EQ(CardState::PRESENT, cardStatus.base.base.base.cardState); } }