From 064ee51e0793ab7c8ad8cc440843c995f145e0a4 Mon Sep 17 00:00:00 2001 From: Shuoq Date: Mon, 27 Feb 2017 16:35:56 -0800 Subject: [PATCH] Initial Target-side VTS tests for Short Message Service(SMS) Radio Hal Apis Test: adb shell data/local/tmp/VtsHalRadioV1_0TargetTest Bug: 32022332 Change-Id: Ia630493e0501e75a5c327aab77d6a0af59587128 --- radio/1.0/vts/functional/Android.bp | 3 +- .../1.0/vts/functional/radio_hidl_hal_sms.cpp | 431 ++++++++++++++++++ .../1.0/vts/functional/radio_hidl_hal_utils.h | 6 + radio/1.0/vts/functional/radio_response.cpp | 65 ++- 4 files changed, 489 insertions(+), 16 deletions(-) create mode 100644 radio/1.0/vts/functional/radio_hidl_hal_sms.cpp diff --git a/radio/1.0/vts/functional/Android.bp b/radio/1.0/vts/functional/Android.bp index 10bd7258a7..3872932c42 100644 --- a/radio/1.0/vts/functional/Android.bp +++ b/radio/1.0/vts/functional/Android.bp @@ -19,6 +19,7 @@ cc_test { srcs: ["radio_hidl_hal_test.cpp", "radio_response.cpp", "radio_hidl_hal_icc.cpp", + "radio_hidl_hal_sms.cpp", "VtsHalRadioV1_0TargetTest.cpp"], shared_libs: [ "libbase", @@ -35,4 +36,4 @@ cc_test { "-O0", "-g", ], -} \ No newline at end of file +} diff --git a/radio/1.0/vts/functional/radio_hidl_hal_sms.cpp b/radio/1.0/vts/functional/radio_hidl_hal_sms.cpp new file mode 100644 index 0000000000..5bf7ae2a35 --- /dev/null +++ b/radio/1.0/vts/functional/radio_hidl_hal_sms.cpp @@ -0,0 +1,431 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using namespace ::android::hardware::radio::V1_0; + +/* + * Test IRadio.sendSms() for the response returned. + */ +TEST_F(RadioHidlTest, sendSms) { + int serial = 0; + GsmSmsMessage msg; + msg.smscPdu = ""; + msg.pdu = "01000b916105770203f3000006d4f29c3e9b01"; + + radio->sendSms(++serial, msg); + + EXPECT_EQ(std::cv_status::no_timeout, wait()); + EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type); + EXPECT_EQ(serial, radioRsp->rspInfo.serial); + + if (cardStatus.cardState == CardState::ABSENT) { + EXPECT_EQ(RadioError::INVALID_STATE, radioRsp->rspInfo.error); + EXPECT_EQ(0, radioRsp->sendSmsResult.errorCode); + } else { + EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error); + EXPECT_EQ("", radioRsp->sendSmsResult.ackPDU); + EXPECT_EQ(-1, radioRsp->sendSmsResult.errorCode); + } +} + +/* + * Test IRadio.sendSMSExpectMore() for the response returned. + */ +TEST_F(RadioHidlTest, sendSMSExpectMore) { + int serial = 0; + GsmSmsMessage msg; + msg.smscPdu = ""; + msg.pdu = "01000b916105770203f3000006d4f29c3e9b01"; + + radio->sendSMSExpectMore(++serial, msg); + + // TODO(shuoq): add more test for this API when inserted sim card is considered + + EXPECT_EQ(std::cv_status::no_timeout, wait()); + EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type); + EXPECT_EQ(serial, radioRsp->rspInfo.serial); + + if (cardStatus.cardState == CardState::ABSENT) { + EXPECT_EQ(RadioError::INVALID_STATE, radioRsp->rspInfo.error); + } else { + EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error); + EXPECT_EQ("", radioRsp->sendSmsResult.ackPDU); + EXPECT_EQ(-1, radioRsp->sendSmsResult.errorCode); + } +} + +/* + * Test IRadio.acknowledgeLastIncomingGsmSms() for the response returned. + */ +TEST_F(RadioHidlTest, acknowledgeLastIncomingGsmSms) { + int serial = 0; + bool success = true; + + radio->acknowledgeLastIncomingGsmSms(++serial, success, + SmsAcknowledgeFailCause::MEMORY_CAPACITY_EXCEEDED); + + EXPECT_EQ(std::cv_status::no_timeout, wait()); + EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type); + EXPECT_EQ(serial, radioRsp->rspInfo.serial); + + if (cardStatus.cardState == CardState::ABSENT) { + EXPECT_EQ(RadioError::INVALID_STATE, radioRsp->rspInfo.error); + } else { + // TODO(shuoq): Will test right behavior when inserted sim card is considered + } +} + +/* + * Test IRadio.acknowledgeIncomingGsmSmsWithPdu() for the response returned. + */ +TEST_F(RadioHidlTest, acknowledgeIncomingGsmSmsWithPdu) { + int serial = 0; + bool success = true; + std::string ackPdu = ""; + + radio->acknowledgeIncomingGsmSmsWithPdu(++serial, success, ackPdu); + + EXPECT_EQ(std::cv_status::no_timeout, wait()); + EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type); + EXPECT_EQ(serial, radioRsp->rspInfo.serial); + + if (cardStatus.cardState == CardState::ABSENT) { + // TODO(shuoq): Will add error check when we know the expected error from QC + } else { + // TODO(shuoq): Will test right behavior when inserted sim card is considered + } +} + +/* + * Test IRadio.sendCdmaSms() for the response returned. + */ +TEST_F(RadioHidlTest, sendCdmaSms) { + int serial = 0; + + // Create a CdmaSmsAddress + CdmaSmsAddress cdmaSmsAddress; + cdmaSmsAddress.digitMode = CdmaSmsDigitMode::FOUR_BIT; + cdmaSmsAddress.numberMode = CdmaSmsNumberMode::NOT_DATA_NETWORK; + cdmaSmsAddress.numberType = CdmaSmsNumberType::UNKNOWN; + cdmaSmsAddress.numberPlan = CdmaSmsNumberPlan::UNKNOWN; + cdmaSmsAddress.digits = (std::vector) {11, 1, 6, 5, 10, 7, 7, 2, 10, 3, 10, 3}; + + // Create a CdmaSmsSubAddress + CdmaSmsSubaddress cdmaSmsSubaddress; + cdmaSmsSubaddress.subaddressType = CdmaSmsSubaddressType::NSAP; + cdmaSmsSubaddress.odd = false; + cdmaSmsSubaddress.digits = (std::vector) {}; + + // Create a CdmaSmsMessage + android::hardware::radio::V1_0::CdmaSmsMessage cdmaSmsMessage; + cdmaSmsMessage.teleserviceId = 4098; + cdmaSmsMessage.isServicePresent = false; + cdmaSmsMessage.serviceCategory = 0; + cdmaSmsMessage.address = cdmaSmsAddress; + cdmaSmsMessage.subAddress = cdmaSmsSubaddress; + cdmaSmsMessage.bearerData = (std::vector) + {15, 0, 3, 32, 3, 16, 1, 8, 16, 53, 76, 68, 6, 51, 106, 0}; + + radio->sendCdmaSms(++serial, cdmaSmsMessage); + + EXPECT_EQ(std::cv_status::no_timeout, wait()); + EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type); + EXPECT_EQ(serial, radioRsp->rspInfo.serial); + + if (cardStatus.cardState == CardState::ABSENT) { + // TODO(shuoq): Will add error check when we know the expected error from QC + } else { + // TODO(shuoq): radioRsp->sendSmsResult needs to be investigated when Sim card is in + } +} + +/* + * Test IRadio.acknowledgeLastIncomingCdmaSms() for the response returned. + */ +TEST_F(RadioHidlTest, acknowledgeLastIncomingCdmaSms) { + int serial = 0; + + // Create a CdmaSmsAck + CdmaSmsAck cdmaSmsAck; + cdmaSmsAck.errorClass = CdmaSmsErrorClass::NO_ERROR; + cdmaSmsAck.smsCauseCode = 1; + + radio->acknowledgeLastIncomingCdmaSms(++serial, cdmaSmsAck); + + EXPECT_EQ(std::cv_status::no_timeout, wait()); + EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type); + EXPECT_EQ(serial, radioRsp->rspInfo.serial); + + if (cardStatus.cardState == CardState::ABSENT) { + EXPECT_EQ(RadioError::NO_SMS_TO_ACK, radioRsp->rspInfo.error); + } else { + EXPECT_EQ(RadioError::NO_SMS_TO_ACK, radioRsp->rspInfo.error); + } +} + +/* + * Test IRadio.sendImsSms() for the response returned. + */ +TEST_F(RadioHidlTest, sendImsSms) { + int serial = 1; + + // Create a CdmaSmsAddress + CdmaSmsAddress cdmaSmsAddress; + cdmaSmsAddress.digitMode = CdmaSmsDigitMode::FOUR_BIT; + cdmaSmsAddress.numberMode = CdmaSmsNumberMode::NOT_DATA_NETWORK; + cdmaSmsAddress.numberType = CdmaSmsNumberType::UNKNOWN; + cdmaSmsAddress.numberPlan = CdmaSmsNumberPlan::UNKNOWN; + cdmaSmsAddress.digits = (std::vector) {11, 1, 6, 5, 10, 7, 7, 2, 10, 3, 10, 3}; + + // Create a CdmaSmsSubAddress + CdmaSmsSubaddress cdmaSmsSubaddress; + cdmaSmsSubaddress.subaddressType = CdmaSmsSubaddressType::NSAP; + cdmaSmsSubaddress.odd = false; + cdmaSmsSubaddress.digits = (std::vector) {}; + + // Create a CdmaSmsMessage + CdmaSmsMessage cdmaSmsMessage; + cdmaSmsMessage.teleserviceId = 4098; + cdmaSmsMessage.isServicePresent = false; + cdmaSmsMessage.serviceCategory = 0; + cdmaSmsMessage.address = cdmaSmsAddress; + cdmaSmsMessage.subAddress = cdmaSmsSubaddress; + cdmaSmsMessage.bearerData = (std::vector) + {15, 0, 3, 32, 3, 16, 1, 8, 16, 53, 76, 68, 6, 51, 106, 0}; + + // Creata an ImsSmsMessage + ImsSmsMessage msg; + msg.tech = RadioTechnologyFamily::THREE_GPP2; + msg.retry = false; + msg.messageRef = 0; + msg.cdmaMessage = (std::vector) {cdmaSmsMessage}; + msg.gsmMessage = (std::vector) {}; + + radio->sendImsSms(serial, msg); + + EXPECT_EQ(std::cv_status::no_timeout, wait()); + EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type); + EXPECT_EQ(serial, radioRsp->rspInfo.serial); + + if (cardStatus.cardState == CardState::ABSENT) { + EXPECT_EQ(RadioError::INVALID_ARGUMENTS, radioRsp->rspInfo.error); + } else { + EXPECT_EQ(RadioError::INVALID_ARGUMENTS, radioRsp->rspInfo.error); + // TODO(shuoq): radioRsp->sendSmsResult needs to be investigated when sim card is in + } +} + +/* + * Test IRadio.getSmscAddress() for the response returned. + */ +TEST_F(RadioHidlTest, getSmscAddress) { + int serial = 0; + + radio->getSmscAddress(++serial); + + EXPECT_EQ(std::cv_status::no_timeout, wait()); + EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type); + EXPECT_EQ(serial, radioRsp->rspInfo.serial); + + if (cardStatus.cardState == CardState::ABSENT) { + // TODO(shuoq): Will add error check when we know the expected error from QC + } else { + EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error); + // TODO(shuoq): radioRsp->smscAddress needs to be investigated when Sim card is in + } +} + +/* + * Test IRadio.setSmscAddress() for the response returned. + */ +TEST_F(RadioHidlTest, setSmscAddress) { + int serial = 0; + hidl_string address = hidl_string("smscAddress"); + + radio->setSmscAddress(++serial, address); + + EXPECT_EQ(std::cv_status::no_timeout, wait()); + EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type); + EXPECT_EQ(serial, radioRsp->rspInfo.serial); + + if (cardStatus.cardState == CardState::ABSENT) { + EXPECT_EQ(RadioError::INVALID_SMS_FORMAT, radioRsp->rspInfo.error); + } else { + EXPECT_EQ(RadioError::INVALID_SMS_FORMAT, radioRsp->rspInfo.error); + } +} + +/* + * Test IRadio.writeSmsToSim() for the response returned. + */ +TEST_F(RadioHidlTest, writeSmsToSim) { + int serial = 0; + SmsWriteArgs smsWriteArgs; + smsWriteArgs.status = SmsWriteArgsStatus::REC_UNREAD; + smsWriteArgs.smsc = ""; + smsWriteArgs.pdu = "01000b916105770203f3000006d4f29c3e9b01"; + + radio->writeSmsToSim(++serial, smsWriteArgs); + + EXPECT_EQ(std::cv_status::no_timeout, wait()); + EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type); + EXPECT_EQ(serial, radioRsp->rspInfo.serial); + + if (cardStatus.cardState == CardState::ABSENT) { + // TODO(shuoq): Will add error check when we know the expected error from QC + } else { + // TODO(shuoq): radioRsp->writeSmsToSimIndex needs to be investigated when Sim card is in + } +} + +/* + * Test IRadio.deleteSmsOnSim() for the response returned. + */ +TEST_F(RadioHidlTest, deleteSmsOnSim) { + int serial = 0; + int index = 1; + + radio->deleteSmsOnSim(++serial, index); + + EXPECT_EQ(std::cv_status::no_timeout, wait()); + EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type); + EXPECT_EQ(serial, radioRsp->rspInfo.serial); + + if (cardStatus.cardState == CardState::ABSENT) { + // TODO(shuoq): Will add error check when we know the expected error from QC + } else { + EXPECT_EQ(RadioError::NO_SUCH_ENTRY, radioRsp->rspInfo.error); + } +} + +/* + * Test IRadio.writeSmsToRuim() for the response returned. + */ +TEST_F(RadioHidlTest, writeSmsToRuim) { + int serial = 0; + + // Create a CdmaSmsAddress + CdmaSmsAddress cdmaSmsAddress; + cdmaSmsAddress.digitMode = CdmaSmsDigitMode::FOUR_BIT; + cdmaSmsAddress.numberMode = CdmaSmsNumberMode::NOT_DATA_NETWORK; + cdmaSmsAddress.numberType = CdmaSmsNumberType::UNKNOWN; + cdmaSmsAddress.numberPlan = CdmaSmsNumberPlan::UNKNOWN; + cdmaSmsAddress.digits = (std::vector) {11, 1, 6, 5, 10, 7, 7, 2, 10, 3, 10, 3}; + + // Create a CdmaSmsSubAddress + CdmaSmsSubaddress cdmaSmsSubaddress; + cdmaSmsSubaddress.subaddressType = CdmaSmsSubaddressType::NSAP; + cdmaSmsSubaddress.odd = false; + cdmaSmsSubaddress.digits = (std::vector) {}; + + // Create a CdmaSmsMessage + CdmaSmsMessage cdmaSmsMessage; + cdmaSmsMessage.teleserviceId = 4098; + cdmaSmsMessage.isServicePresent = false; + cdmaSmsMessage.serviceCategory = 0; + cdmaSmsMessage.address = cdmaSmsAddress; + cdmaSmsMessage.subAddress = cdmaSmsSubaddress; + cdmaSmsMessage.bearerData = (std::vector) + {15, 0, 3, 32, 3, 16, 1, 8, 16, 53, 76, 68, 6, 51, 106, 0}; + + // Create a CdmaSmsWriteArgs + CdmaSmsWriteArgs cdmaSmsWriteArgs; + cdmaSmsWriteArgs.status = CdmaSmsWriteArgsStatus::REC_UNREAD; + cdmaSmsWriteArgs.message = cdmaSmsMessage; + + radio->writeSmsToRuim(++serial, cdmaSmsWriteArgs); + + EXPECT_EQ(std::cv_status::no_timeout, wait()); + EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type); + EXPECT_EQ(serial, radioRsp->rspInfo.serial); + + if (cardStatus.cardState == CardState::ABSENT) { + // TODO(shuoq): Will add error check when we know the expected error from QC + } else { + // TODO(shuoq): radioRsp->writeSmsToRuimIndex needs to be investigated when sim card is in + } +} + +/* + * Test IRadio.deleteSmsOnRuim() for the response returned. + */ +TEST_F(RadioHidlTest, deleteSmsOnRuim) { + int serial = 0; + int index = 1; + + // Create a CdmaSmsAddress + CdmaSmsAddress cdmaSmsAddress; + cdmaSmsAddress.digitMode = CdmaSmsDigitMode::FOUR_BIT; + cdmaSmsAddress.numberMode = CdmaSmsNumberMode::NOT_DATA_NETWORK; + cdmaSmsAddress.numberType = CdmaSmsNumberType::UNKNOWN; + cdmaSmsAddress.numberPlan = CdmaSmsNumberPlan::UNKNOWN; + cdmaSmsAddress.digits = (std::vector) {11, 1, 6, 5, 10, 7, 7, 2, 10, 3, 10, 3}; + + // Create a CdmaSmsSubAddress + CdmaSmsSubaddress cdmaSmsSubaddress; + cdmaSmsSubaddress.subaddressType = CdmaSmsSubaddressType::NSAP; + cdmaSmsSubaddress.odd = false; + cdmaSmsSubaddress.digits = (std::vector) {}; + + // Create a CdmaSmsMessage + CdmaSmsMessage cdmaSmsMessage; + cdmaSmsMessage.teleserviceId = 4098; + cdmaSmsMessage.isServicePresent = false; + cdmaSmsMessage.serviceCategory = 0; + cdmaSmsMessage.address = cdmaSmsAddress; + cdmaSmsMessage.subAddress = cdmaSmsSubaddress; + cdmaSmsMessage.bearerData = (std::vector) + {15, 0, 3, 32, 3, 16, 1, 8, 16, 53, 76, 68, 6, 51, 106, 0}; + + // Create a CdmaSmsWriteArgs + CdmaSmsWriteArgs cdmaSmsWriteArgs; + cdmaSmsWriteArgs.status = CdmaSmsWriteArgsStatus::REC_UNREAD; + cdmaSmsWriteArgs.message = cdmaSmsMessage; + + radio->deleteSmsOnRuim(++serial, index); + + EXPECT_EQ(std::cv_status::no_timeout, wait()); + EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type); + EXPECT_EQ(serial, radioRsp->rspInfo.serial); + + if (cardStatus.cardState == CardState::ABSENT) { + // TODO(shuoq): Will add error check when we know the expected error from QC + } else { + // TODO(shuoq): Will test right behavior when inserted sim card is considered + } +} + +/* + * Test IRadio.reportSmsMemoryStatus() for the response returned. + */ +TEST_F(RadioHidlTest, reportSmsMemoryStatus) { + int serial = 0; + bool available = true; + + radio->reportSmsMemoryStatus(++serial, available); + + EXPECT_EQ(std::cv_status::no_timeout, wait()); + EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type); + EXPECT_EQ(serial, radioRsp->rspInfo.serial); + + if (cardStatus.cardState == CardState::ABSENT) { + // TODO(shuoq): Will add error check when we know the expected error from QC + } else { + EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error); + } +} diff --git a/radio/1.0/vts/functional/radio_hidl_hal_utils.h b/radio/1.0/vts/functional/radio_hidl_hal_utils.h index 1c58a97654..329f0b498b 100644 --- a/radio/1.0/vts/functional/radio_hidl_hal_utils.h +++ b/radio/1.0/vts/functional/radio_hidl_hal_utils.h @@ -87,6 +87,12 @@ public: IccIoResult iccIoResult; int channelId; + // Sms + SendSmsResult sendSmsResult; + hidl_string smscAddress; + uint32_t writeSmsToSimIndex; + uint32_t writeSmsToRuimIndex; + RadioResponse(RadioHidlTest& parent); virtual ~RadioResponse() = default; diff --git a/radio/1.0/vts/functional/radio_response.cpp b/radio/1.0/vts/functional/radio_response.cpp index 64b09c9272..19199ea068 100644 --- a/radio/1.0/vts/functional/radio_response.cpp +++ b/radio/1.0/vts/functional/radio_response.cpp @@ -158,13 +158,19 @@ Return RadioResponse::sendDtmfResponse(const RadioResponseInfo& /*info*/) return Void(); } -Return RadioResponse::sendSmsResponse(const RadioResponseInfo& /*info*/, - const SendSmsResult& /*sms*/) { +Return RadioResponse::sendSmsResponse(const RadioResponseInfo& info, + const SendSmsResult& sms) { + rspInfo = info; + sendSmsResult = sms; + parent.notify(); return Void(); } Return RadioResponse::sendSMSExpectMoreResponse( - const RadioResponseInfo& /*info*/, const SendSmsResult& /*sms*/) { + const RadioResponseInfo& info, const SendSmsResult& sms) { + rspInfo = info; + sendSmsResult = sms; + parent.notify(); return Void(); } @@ -217,7 +223,9 @@ Return RadioResponse::setCallWaitingResponse(const RadioResponseInfo& /*in return Void(); } -Return RadioResponse::acknowledgeLastIncomingGsmSmsResponse(const RadioResponseInfo& /*info*/) { +Return RadioResponse::acknowledgeLastIncomingGsmSmsResponse(const RadioResponseInfo& info) { + rspInfo = info; + parent.notify(); return Void(); } @@ -320,12 +328,17 @@ Return RadioResponse::setSuppServiceNotificationsResponse( } Return RadioResponse::writeSmsToSimResponse( - const RadioResponseInfo& /*info*/, int32_t /*index*/) { + const RadioResponseInfo& info, int32_t index) { + rspInfo = info; + writeSmsToSimIndex = index; + parent.notify(); return Void(); } Return RadioResponse::deleteSmsOnSimResponse( - const RadioResponseInfo& /*info*/) { + const RadioResponseInfo& info) { + rspInfo = info; + parent.notify(); return Void(); } @@ -417,12 +430,17 @@ Return RadioResponse::sendBurstDtmfResponse(const RadioResponseInfo& /*inf } Return RadioResponse::sendCdmaSmsResponse( - const RadioResponseInfo& /*info*/, const SendSmsResult& /*sms*/) { + const RadioResponseInfo& info, const SendSmsResult& sms) { + rspInfo = info; + sendSmsResult = sms; + parent.notify(); return Void(); } Return RadioResponse::acknowledgeLastIncomingCdmaSmsResponse( - const RadioResponseInfo& /*info*/) { + const RadioResponseInfo& info) { + rspInfo = info; + parent.notify(); return Void(); } @@ -464,12 +482,17 @@ Return RadioResponse::getCDMASubscriptionResponse( } Return RadioResponse::writeSmsToRuimResponse( - const RadioResponseInfo& /*info*/, uint32_t /*index*/) { + const RadioResponseInfo& info, uint32_t index) { + rspInfo = info; + writeSmsToRuimIndex = index; + parent.notify(); return Void(); } Return RadioResponse::deleteSmsOnRuimResponse( - const RadioResponseInfo& /*info*/) { + const RadioResponseInfo& info) { + rspInfo = info; + parent.notify(); return Void(); } @@ -486,15 +509,22 @@ Return RadioResponse::exitEmergencyCallbackModeResponse(const RadioRespons } Return RadioResponse::getSmscAddressResponse( - const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*smsc*/) { + const RadioResponseInfo& info, const ::android::hardware::hidl_string& smsc) { + rspInfo = info; + smscAddress = smsc; + parent.notify(); return Void(); } -Return RadioResponse::setSmscAddressResponse(const RadioResponseInfo& /*info*/) { +Return RadioResponse::setSmscAddressResponse(const RadioResponseInfo& info) { + rspInfo = info; + parent.notify(); return Void(); } -Return RadioResponse::reportSmsMemoryStatusResponse(const RadioResponseInfo& /*info*/) { +Return RadioResponse::reportSmsMemoryStatusResponse(const RadioResponseInfo& info) { + rspInfo = info; + parent.notify(); return Void(); } @@ -513,7 +543,9 @@ Return RadioResponse::requestIsimAuthenticationResponse( } Return RadioResponse::acknowledgeIncomingGsmSmsWithPduResponse( - const RadioResponseInfo& /*info*/) { + const RadioResponseInfo& info) { + rspInfo = info; + parent.notify(); return Void(); } @@ -548,7 +580,10 @@ Return RadioResponse::getImsRegistrationStateResponse( } Return RadioResponse::sendImsSmsResponse( - const RadioResponseInfo& /*info*/, const SendSmsResult& /*sms*/) { + const RadioResponseInfo& info, const SendSmsResult& sms) { + rspInfo = info; + sendSmsResult = sms; + parent.notify(); return Void(); }