diff --git a/radio/1.0/vts/functional/Android.bp b/radio/1.0/vts/functional/Android.bp index 8cd823ec1a..eb11b54b03 100644 --- a/radio/1.0/vts/functional/Android.bp +++ b/radio/1.0/vts/functional/Android.bp @@ -26,6 +26,7 @@ cc_test { "radio_hidl_hal_stk.cpp", "radio_hidl_hal_test.cpp", "radio_hidl_hal_voice.cpp", + "radio_indication.cpp", "radio_response.cpp", "VtsHalRadioV1_0TargetTest.cpp", "vts_test_util.cpp"], @@ -71,29 +72,6 @@ cc_test { ], } -cc_library_static { - name: "RadioHidlHalUtilsBase", - srcs : [ - "radio_hidl_hal_test.cpp", - "radio_response.cpp" - ], - shared_libs: [ - "libbase", - "liblog", - "libcutils", - "libhidlbase", - "libhidltransport", - "libnativehelper", - "libutils", - "android.hardware.radio@1.0", - ], - static_libs: ["VtsHalHidlTargetTestBase"], - cflags: [ - "-O0", - "-g", - ], -} - cc_library_static { name: "RadioVtsTestUtilBase", srcs : [ diff --git a/radio/1.0/vts/functional/radio_hidl_hal_test.cpp b/radio/1.0/vts/functional/radio_hidl_hal_test.cpp index 5b9130e07b..297954dc69 100644 --- a/radio/1.0/vts/functional/radio_hidl_hal_test.cpp +++ b/radio/1.0/vts/functional/radio_hidl_hal_test.cpp @@ -19,14 +19,16 @@ void RadioHidlTest::SetUp() { radio = ::testing::VtsHalHidlTargetTestBase::getService(hidl_string(RADIO_SERVICE_NAME)); - ASSERT_NE(radio, nullptr); + ASSERT_NE(nullptr, radio.get()); - radioRsp = new RadioResponse(*this); - ASSERT_NE(radioRsp, nullptr); + radioRsp = new (std::nothrow) RadioResponse(*this); + ASSERT_NE(nullptr, radioRsp.get()); count = 0; - radioInd = NULL; + radioInd = new (std::nothrow) RadioIndication(*this); + ASSERT_NE(nullptr, radioInd.get()); + radio->setResponseFunctions(radioRsp, radioInd); int serial = GetRandomSerialNumber(); diff --git a/radio/1.0/vts/functional/radio_hidl_hal_utils_v1_0.h b/radio/1.0/vts/functional/radio_hidl_hal_utils_v1_0.h index 3bd69ab210..c3afaa5dd6 100644 --- a/radio/1.0/vts/functional/radio_hidl_hal_utils_v1_0.h +++ b/radio/1.0/vts/functional/radio_hidl_hal_utils_v1_0.h @@ -28,53 +28,7 @@ #include "vts_test_util.h" -using ::android::hardware::radio::V1_0::ActivityStatsInfo; -using ::android::hardware::radio::V1_0::AppType; -using ::android::hardware::radio::V1_0::CardStatus; -using ::android::hardware::radio::V1_0::CardState; -using ::android::hardware::radio::V1_0::Call; -using ::android::hardware::radio::V1_0::CallForwardInfo; -using ::android::hardware::radio::V1_0::CarrierMatchType; -using ::android::hardware::radio::V1_0::CarrierRestrictions; -using ::android::hardware::radio::V1_0::CdmaRoamingType; -using ::android::hardware::radio::V1_0::CdmaBroadcastSmsConfigInfo; -using ::android::hardware::radio::V1_0::CdmaSubscriptionSource; -using ::android::hardware::radio::V1_0::CellInfo; -using ::android::hardware::radio::V1_0::ClipStatus; -using ::android::hardware::radio::V1_0::DataRegStateResult; -using ::android::hardware::radio::V1_0::DeviceStateType; -using ::android::hardware::radio::V1_0::Dial; -using ::android::hardware::radio::V1_0::GsmBroadcastSmsConfigInfo; -using ::android::hardware::radio::V1_0::HardwareConfig; -using ::android::hardware::radio::V1_0::IccIo; -using ::android::hardware::radio::V1_0::IccIoResult; -using ::android::hardware::radio::V1_0::IRadio; -using ::android::hardware::radio::V1_0::IRadioResponse; -using ::android::hardware::radio::V1_0::IRadioIndication; -using ::android::hardware::radio::V1_0::RadioConst; -using ::android::hardware::radio::V1_0::RadioError; -using ::android::hardware::radio::V1_0::RadioResponseInfo; -using ::android::hardware::radio::V1_0::LastCallFailCauseInfo; -using ::android::hardware::radio::V1_0::LceDataInfo; -using ::android::hardware::radio::V1_0::LceStatusInfo; -using ::android::hardware::radio::V1_0::NeighboringCell; -using ::android::hardware::radio::V1_0::NvItem; -using ::android::hardware::radio::V1_0::NvWriteItem; -using ::android::hardware::radio::V1_0::OperatorInfo; -using ::android::hardware::radio::V1_0::PreferredNetworkType; -using ::android::hardware::radio::V1_0::RadioBandMode; -using ::android::hardware::radio::V1_0::RadioCapability; -using ::android::hardware::radio::V1_0::RadioResponseType; -using ::android::hardware::radio::V1_0::RadioTechnology; -using ::android::hardware::radio::V1_0::RadioTechnologyFamily; -using ::android::hardware::radio::V1_0::ResetNvType; -using ::android::hardware::radio::V1_0::SelectUiccSub; -using ::android::hardware::radio::V1_0::SendSmsResult; -using ::android::hardware::radio::V1_0::SetupDataCallResult; -using ::android::hardware::radio::V1_0::SignalStrength; -using ::android::hardware::radio::V1_0::SimApdu; -using ::android::hardware::radio::V1_0::TtyMode; -using ::android::hardware::radio::V1_0::VoiceRegStateResult; +using namespace ::android::hardware::radio::V1_0; using ::android::hardware::hidl_string; using ::android::hardware::hidl_vec; @@ -440,6 +394,123 @@ class RadioResponse : public IRadioResponse { Return acknowledgeRequest(int32_t serial); }; +/* Callback class for radio indication */ +class RadioIndication : public IRadioIndication { + protected: + RadioHidlTest& parent; + + public: + RadioIndication(RadioHidlTest& parent); + virtual ~RadioIndication() = default; + + Return radioStateChanged(RadioIndicationType type, RadioState radioState); + + Return callStateChanged(RadioIndicationType type); + + Return networkStateChanged(RadioIndicationType type); + + Return newSms(RadioIndicationType type, + const ::android::hardware::hidl_vec& pdu); + + Return newSmsStatusReport(RadioIndicationType type, + const ::android::hardware::hidl_vec& pdu); + + Return newSmsOnSim(RadioIndicationType type, int32_t recordNumber); + + Return onUssd(RadioIndicationType type, UssdModeType modeType, + const ::android::hardware::hidl_string& msg); + + Return nitzTimeReceived(RadioIndicationType type, + const ::android::hardware::hidl_string& nitzTime, + uint64_t receivedTime); + + Return currentSignalStrength(RadioIndicationType type, + const SignalStrength& signalStrength); + + Return dataCallListChanged( + RadioIndicationType type, const ::android::hardware::hidl_vec& dcList); + + Return suppSvcNotify(RadioIndicationType type, const SuppSvcNotification& suppSvc); + + Return stkSessionEnd(RadioIndicationType type); + + Return stkProactiveCommand(RadioIndicationType type, + const ::android::hardware::hidl_string& cmd); + + Return stkEventNotify(RadioIndicationType type, + const ::android::hardware::hidl_string& cmd); + + Return stkCallSetup(RadioIndicationType type, int64_t timeout); + + Return simSmsStorageFull(RadioIndicationType type); + + Return simRefresh(RadioIndicationType type, const SimRefreshResult& refreshResult); + + Return callRing(RadioIndicationType type, bool isGsm, const CdmaSignalInfoRecord& record); + + Return simStatusChanged(RadioIndicationType type); + + Return cdmaNewSms(RadioIndicationType type, const CdmaSmsMessage& msg); + + Return newBroadcastSms(RadioIndicationType type, + const ::android::hardware::hidl_vec& data); + + Return cdmaRuimSmsStorageFull(RadioIndicationType type); + + Return restrictedStateChanged(RadioIndicationType type, PhoneRestrictedState state); + + Return enterEmergencyCallbackMode(RadioIndicationType type); + + Return cdmaCallWaiting(RadioIndicationType type, + const CdmaCallWaiting& callWaitingRecord); + + Return cdmaOtaProvisionStatus(RadioIndicationType type, CdmaOtaProvisionStatus status); + + Return cdmaInfoRec(RadioIndicationType type, const CdmaInformationRecords& records); + + Return indicateRingbackTone(RadioIndicationType type, bool start); + + Return resendIncallMute(RadioIndicationType type); + + Return cdmaSubscriptionSourceChanged(RadioIndicationType type, + CdmaSubscriptionSource cdmaSource); + + Return cdmaPrlChanged(RadioIndicationType type, int32_t version); + + Return exitEmergencyCallbackMode(RadioIndicationType type); + + Return rilConnected(RadioIndicationType type); + + Return voiceRadioTechChanged(RadioIndicationType type, RadioTechnology rat); + + Return cellInfoList(RadioIndicationType type, + const ::android::hardware::hidl_vec& records); + + Return imsNetworkStateChanged(RadioIndicationType type); + + Return subscriptionStatusChanged(RadioIndicationType type, bool activate); + + Return srvccStateNotify(RadioIndicationType type, SrvccState state); + + Return hardwareConfigChanged( + RadioIndicationType type, const ::android::hardware::hidl_vec& configs); + + Return radioCapabilityIndication(RadioIndicationType type, const RadioCapability& rc); + + Return onSupplementaryServiceIndication(RadioIndicationType type, + const StkCcUnsolSsResult& ss); + + Return stkCallControlAlphaNotify(RadioIndicationType type, + const ::android::hardware::hidl_string& alpha); + + Return lceData(RadioIndicationType type, const LceDataInfo& lce); + + Return pcoData(RadioIndicationType type, const PcoDataInfo& pco); + + Return modemReset(RadioIndicationType type, + const ::android::hardware::hidl_string& reason); +}; + // The main test class for Radio HIDL. class RadioHidlTest : public ::testing::VtsHalHidlTargetTestBase { protected: @@ -466,7 +537,7 @@ class RadioHidlTest : public ::testing::VtsHalHidlTargetTestBase { sp radio; sp radioRsp; - sp radioInd; + sp radioInd; }; // A class for test environment setup diff --git a/radio/1.0/vts/functional/radio_indication.cpp b/radio/1.0/vts/functional/radio_indication.cpp new file mode 100644 index 0000000000..97b0d265f0 --- /dev/null +++ b/radio/1.0/vts/functional/radio_indication.cpp @@ -0,0 +1,229 @@ +/* + * 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 + +RadioIndication::RadioIndication(RadioHidlTest& parent) : parent(parent) {} + +Return RadioIndication::radioStateChanged(RadioIndicationType /*type*/, + RadioState /*radioState*/) { + return Void(); +} + +Return RadioIndication::callStateChanged(RadioIndicationType /*type*/) { + return Void(); +} + +Return RadioIndication::networkStateChanged(RadioIndicationType /*type*/) { + return Void(); +} + +Return RadioIndication::newSms(RadioIndicationType /*type*/, + const ::android::hardware::hidl_vec& /*pdu*/) { + return Void(); +} + +Return RadioIndication::newSmsStatusReport( + RadioIndicationType /*type*/, const ::android::hardware::hidl_vec& /*pdu*/) { + return Void(); +} + +Return RadioIndication::newSmsOnSim(RadioIndicationType /*type*/, int32_t /*recordNumber*/) { + return Void(); +} + +Return RadioIndication::onUssd(RadioIndicationType /*type*/, UssdModeType /*modeType*/, + const ::android::hardware::hidl_string& /*msg*/) { + return Void(); +} + +Return RadioIndication::nitzTimeReceived(RadioIndicationType /*type*/, + const ::android::hardware::hidl_string& /*nitzTime*/, + uint64_t /*receivedTime*/) { + return Void(); +} + +Return RadioIndication::currentSignalStrength(RadioIndicationType /*type*/, + const SignalStrength& /*signalStrength*/) { + return Void(); +} + +Return RadioIndication::dataCallListChanged( + RadioIndicationType /*type*/, + const ::android::hardware::hidl_vec& /*dcList*/) { + return Void(); +} + +Return RadioIndication::suppSvcNotify(RadioIndicationType /*type*/, + const SuppSvcNotification& /*suppSvc*/) { + return Void(); +} + +Return RadioIndication::stkSessionEnd(RadioIndicationType /*type*/) { + return Void(); +} + +Return RadioIndication::stkProactiveCommand(RadioIndicationType /*type*/, + const ::android::hardware::hidl_string& /*cmd*/) { + return Void(); +} + +Return RadioIndication::stkEventNotify(RadioIndicationType /*type*/, + const ::android::hardware::hidl_string& /*cmd*/) { + return Void(); +} + +Return RadioIndication::stkCallSetup(RadioIndicationType /*type*/, int64_t /*timeout*/) { + return Void(); +} + +Return RadioIndication::simSmsStorageFull(RadioIndicationType /*type*/) { + return Void(); +} + +Return RadioIndication::simRefresh(RadioIndicationType /*type*/, + const SimRefreshResult& /*refreshResult*/) { + return Void(); +} + +Return RadioIndication::callRing(RadioIndicationType /*type*/, bool /*isGsm*/, + const CdmaSignalInfoRecord& /*record*/) { + return Void(); +} + +Return RadioIndication::simStatusChanged(RadioIndicationType /*type*/) { + return Void(); +} + +Return RadioIndication::cdmaNewSms(RadioIndicationType /*type*/, + const CdmaSmsMessage& /*msg*/) { + return Void(); +} + +Return RadioIndication::newBroadcastSms( + RadioIndicationType /*type*/, const ::android::hardware::hidl_vec& /*data*/) { + return Void(); +} + +Return RadioIndication::cdmaRuimSmsStorageFull(RadioIndicationType /*type*/) { + return Void(); +} + +Return RadioIndication::restrictedStateChanged(RadioIndicationType /*type*/, + PhoneRestrictedState /*state*/) { + return Void(); +} + +Return RadioIndication::enterEmergencyCallbackMode(RadioIndicationType /*type*/) { + return Void(); +} + +Return RadioIndication::cdmaCallWaiting(RadioIndicationType /*type*/, + const CdmaCallWaiting& /*callWaitingRecord*/) { + return Void(); +} + +Return RadioIndication::cdmaOtaProvisionStatus(RadioIndicationType /*type*/, + CdmaOtaProvisionStatus /*status*/) { + return Void(); +} + +Return RadioIndication::cdmaInfoRec(RadioIndicationType /*type*/, + const CdmaInformationRecords& /*records*/) { + return Void(); +} + +Return RadioIndication::indicateRingbackTone(RadioIndicationType /*type*/, bool /*start*/) { + return Void(); +} + +Return RadioIndication::resendIncallMute(RadioIndicationType /*type*/) { + return Void(); +} + +Return RadioIndication::cdmaSubscriptionSourceChanged(RadioIndicationType /*type*/, + CdmaSubscriptionSource /*cdmaSource*/) { + return Void(); +} + +Return RadioIndication::cdmaPrlChanged(RadioIndicationType /*type*/, int32_t /*version*/) { + return Void(); +} + +Return RadioIndication::exitEmergencyCallbackMode(RadioIndicationType /*type*/) { + return Void(); +} + +Return RadioIndication::rilConnected(RadioIndicationType /*type*/) { + return Void(); +} + +Return RadioIndication::voiceRadioTechChanged(RadioIndicationType /*type*/, + RadioTechnology /*rat*/) { + return Void(); +} + +Return RadioIndication::cellInfoList( + RadioIndicationType /*type*/, const ::android::hardware::hidl_vec& /*records*/) { + return Void(); +} + +Return RadioIndication::imsNetworkStateChanged(RadioIndicationType /*type*/) { + return Void(); +} + +Return RadioIndication::subscriptionStatusChanged(RadioIndicationType /*type*/, + bool /*activate*/) { + return Void(); +} + +Return RadioIndication::srvccStateNotify(RadioIndicationType /*type*/, SrvccState /*state*/) { + return Void(); +} + +Return RadioIndication::hardwareConfigChanged( + RadioIndicationType /*type*/, + const ::android::hardware::hidl_vec& /*configs*/) { + return Void(); +} + +Return RadioIndication::radioCapabilityIndication(RadioIndicationType /*type*/, + const RadioCapability& /*rc*/) { + return Void(); +} + +Return RadioIndication::onSupplementaryServiceIndication(RadioIndicationType /*type*/, + const StkCcUnsolSsResult& /*ss*/) { + return Void(); +} + +Return RadioIndication::stkCallControlAlphaNotify( + RadioIndicationType /*type*/, const ::android::hardware::hidl_string& /*alpha*/) { + return Void(); +} + +Return RadioIndication::lceData(RadioIndicationType /*type*/, const LceDataInfo& /*lce*/) { + return Void(); +} + +Return RadioIndication::pcoData(RadioIndicationType /*type*/, const PcoDataInfo& /*pco*/) { + return Void(); +} + +Return RadioIndication::modemReset(RadioIndicationType /*type*/, + const ::android::hardware::hidl_string& /*reason*/) { + return Void(); +} \ No newline at end of file diff --git a/radio/1.1/vts/functional/Android.bp b/radio/1.1/vts/functional/Android.bp index 59ef905834..6ca802cc91 100644 --- a/radio/1.1/vts/functional/Android.bp +++ b/radio/1.1/vts/functional/Android.bp @@ -19,6 +19,7 @@ cc_test { defaults: ["hidl_defaults"], srcs: ["radio_hidl_hal_api.cpp", "radio_hidl_hal_test.cpp", + "radio_indication.cpp", "radio_response.cpp", "VtsHalRadioV1_1TargetTest.cpp"], shared_libs: [ @@ -33,7 +34,6 @@ cc_test { "android.hardware.radio@1.0", ], static_libs: ["VtsHalHidlTargetTestBase", - "RadioHidlHalUtilsBase", "RadioVtsTestUtilBase"], header_libs: [ "radio.util.header@1.0", diff --git a/radio/1.1/vts/functional/radio_hidl_hal_test.cpp b/radio/1.1/vts/functional/radio_hidl_hal_test.cpp index eb87549406..b009dba999 100644 --- a/radio/1.1/vts/functional/radio_hidl_hal_test.cpp +++ b/radio/1.1/vts/functional/radio_hidl_hal_test.cpp @@ -20,14 +20,16 @@ void RadioHidlTest_v1_1::SetUp() { radio_v1_1 = ::testing::VtsHalHidlTargetTestBase::getService<::android::hardware::radio::V1_1::IRadio>( hidl_string(RADIO_SERVICE_NAME)); - ASSERT_NE(radio_v1_1, nullptr); + ASSERT_NE(nullptr, radio_v1_1.get()); - radioRsp_v1_1 = new RadioResponse_v1_1(*this); - ASSERT_NE(radioRsp_v1_1, nullptr); + radioRsp_v1_1 = new (std::nothrow) RadioResponse_v1_1(*this); + ASSERT_NE(nullptr, radioRsp_v1_1.get()); count = 0; - radioInd_v1_1 = NULL; + radioInd_v1_1 = new (std::nothrow) RadioIndication_v1_1(*this); + ASSERT_NE(nullptr, radioInd_v1_1.get()); + radio_v1_1->setResponseFunctions(radioRsp_v1_1, radioInd_v1_1); int serial = GetRandomSerialNumber(); @@ -37,3 +39,40 @@ void RadioHidlTest_v1_1::SetUp() { EXPECT_EQ(serial, radioRsp_v1_1->rspInfo.serial); EXPECT_EQ(RadioError::NONE, radioRsp_v1_1->rspInfo.error); } + +void RadioHidlTest_v1_1::TearDown() {} + +void RadioHidlTest_v1_1::notify() { + std::unique_lock lock(mtx); + count++; + cv.notify_one(); +} + +std::cv_status RadioHidlTest_v1_1::wait() { + std::unique_lock lock(mtx); + + std::cv_status status = std::cv_status::no_timeout; + auto now = std::chrono::system_clock::now(); + while (count == 0) { + status = cv.wait_until(lock, now + std::chrono::seconds(TIMEOUT_PERIOD)); + if (status == std::cv_status::timeout) { + return status; + } + } + count--; + return status; +} + +bool RadioHidlTest_v1_1::CheckGeneralError() { + return (radioRsp_v1_1->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE || + radioRsp_v1_1->rspInfo.error == RadioError::NO_MEMORY || + radioRsp_v1_1->rspInfo.error == RadioError::INTERNAL_ERR || + radioRsp_v1_1->rspInfo.error == RadioError::SYSTEM_ERR || + radioRsp_v1_1->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED || + radioRsp_v1_1->rspInfo.error == RadioError::CANCELLED); +} + +bool RadioHidlTest_v1_1::CheckOEMError() { + return (radioRsp_v1_1->rspInfo.error >= RadioError::OEM_ERROR_1 && + radioRsp_v1_1->rspInfo.error <= RadioError::OEM_ERROR_25); +} \ No newline at end of file diff --git a/radio/1.1/vts/functional/radio_hidl_hal_utils_v1_1.h b/radio/1.1/vts/functional/radio_hidl_hal_utils_v1_1.h index ae72d8f6d5..dd4f1efc0f 100644 --- a/radio/1.1/vts/functional/radio_hidl_hal_utils_v1_1.h +++ b/radio/1.1/vts/functional/radio_hidl_hal_utils_v1_1.h @@ -14,26 +14,385 @@ * limitations under the License. */ +#include + +#include +#include +#include +#include + #include #include #include #include -#include "radio_hidl_hal_utils_v1_0.h" +#include "vts_test_util.h" +using namespace ::android::hardware::radio::V1_0; using namespace ::android::hardware::radio::V1_1; +using ::android::hardware::hidl_string; +using ::android::hardware::hidl_vec; +using ::android::hardware::Return; +using ::android::hardware::Void; +using ::android::sp; + +#define TIMEOUT_PERIOD 75 +#define RADIO_SERVICE_NAME "slot1" + class RadioHidlTest_v1_1; +extern CardStatus cardStatus; /* Callback class for radio response v1_1*/ -class RadioResponse_v1_1 : public RadioResponse { +class RadioResponse_v1_1 : public ::android::hardware::radio::V1_1::IRadioResponse { protected: RadioHidlTest_v1_1& parent_v1_1; public: + RadioResponseInfo rspInfo; + hidl_string imsi; + IccIoResult iccIoResult; + int channelId; + + // Sms + SendSmsResult sendSmsResult; + hidl_string smscAddress; + uint32_t writeSmsToSimIndex; + uint32_t writeSmsToRuimIndex; + RadioResponse_v1_1(RadioHidlTest_v1_1& parent_v1_1); virtual ~RadioResponse_v1_1() = default; + Return getIccCardStatusResponse(const RadioResponseInfo& info, + const CardStatus& cardStatus); + + Return supplyIccPinForAppResponse(const RadioResponseInfo& info, + int32_t remainingRetries); + + Return supplyIccPukForAppResponse(const RadioResponseInfo& info, + int32_t remainingRetries); + + Return supplyIccPin2ForAppResponse(const RadioResponseInfo& info, + int32_t remainingRetries); + + Return supplyIccPuk2ForAppResponse(const RadioResponseInfo& info, + int32_t remainingRetries); + + Return changeIccPinForAppResponse(const RadioResponseInfo& info, + int32_t remainingRetries); + + Return changeIccPin2ForAppResponse(const RadioResponseInfo& info, + int32_t remainingRetries); + + Return supplyNetworkDepersonalizationResponse(const RadioResponseInfo& info, + int32_t remainingRetries); + + Return getCurrentCallsResponse(const RadioResponseInfo& info, + const ::android::hardware::hidl_vec& calls); + + Return dialResponse(const RadioResponseInfo& info); + + Return getIMSIForAppResponse(const RadioResponseInfo& info, + const ::android::hardware::hidl_string& imsi); + + Return hangupConnectionResponse(const RadioResponseInfo& info); + + Return hangupWaitingOrBackgroundResponse(const RadioResponseInfo& info); + + Return hangupForegroundResumeBackgroundResponse(const RadioResponseInfo& info); + + Return switchWaitingOrHoldingAndActiveResponse(const RadioResponseInfo& info); + + Return conferenceResponse(const RadioResponseInfo& info); + + Return rejectCallResponse(const RadioResponseInfo& info); + + Return getLastCallFailCauseResponse(const RadioResponseInfo& info, + const LastCallFailCauseInfo& failCauseInfo); + + Return getSignalStrengthResponse(const RadioResponseInfo& info, + const SignalStrength& sigStrength); + + Return getVoiceRegistrationStateResponse(const RadioResponseInfo& info, + const VoiceRegStateResult& voiceRegResponse); + + Return getDataRegistrationStateResponse(const RadioResponseInfo& info, + const DataRegStateResult& dataRegResponse); + + Return getOperatorResponse(const RadioResponseInfo& info, + const ::android::hardware::hidl_string& longName, + const ::android::hardware::hidl_string& shortName, + const ::android::hardware::hidl_string& numeric); + + Return setRadioPowerResponse(const RadioResponseInfo& info); + + Return sendDtmfResponse(const RadioResponseInfo& info); + + Return sendSmsResponse(const RadioResponseInfo& info, const SendSmsResult& sms); + + Return sendSMSExpectMoreResponse(const RadioResponseInfo& info, const SendSmsResult& sms); + + Return setupDataCallResponse(const RadioResponseInfo& info, + const SetupDataCallResult& dcResponse); + + Return iccIOForAppResponse(const RadioResponseInfo& info, const IccIoResult& iccIo); + + Return sendUssdResponse(const RadioResponseInfo& info); + + Return cancelPendingUssdResponse(const RadioResponseInfo& info); + + Return getClirResponse(const RadioResponseInfo& info, int32_t n, int32_t m); + + Return setClirResponse(const RadioResponseInfo& info); + + Return getCallForwardStatusResponse( + const RadioResponseInfo& info, + const ::android::hardware::hidl_vec& call_forwardInfos); + + Return setCallForwardResponse(const RadioResponseInfo& info); + + Return getCallWaitingResponse(const RadioResponseInfo& info, bool enable, + int32_t serviceClass); + + Return setCallWaitingResponse(const RadioResponseInfo& info); + + Return acknowledgeLastIncomingGsmSmsResponse(const RadioResponseInfo& info); + + Return acceptCallResponse(const RadioResponseInfo& info); + + Return deactivateDataCallResponse(const RadioResponseInfo& info); + + Return getFacilityLockForAppResponse(const RadioResponseInfo& info, int32_t response); + + Return setFacilityLockForAppResponse(const RadioResponseInfo& info, int32_t retry); + + Return setBarringPasswordResponse(const RadioResponseInfo& info); + + Return getNetworkSelectionModeResponse(const RadioResponseInfo& info, bool manual); + + Return setNetworkSelectionModeAutomaticResponse(const RadioResponseInfo& info); + + Return setNetworkSelectionModeManualResponse(const RadioResponseInfo& info); + + Return getAvailableNetworksResponse( + const RadioResponseInfo& info, + const ::android::hardware::hidl_vec& networkInfos); + + Return startDtmfResponse(const RadioResponseInfo& info); + + Return stopDtmfResponse(const RadioResponseInfo& info); + + Return getBasebandVersionResponse(const RadioResponseInfo& info, + const ::android::hardware::hidl_string& version); + + Return separateConnectionResponse(const RadioResponseInfo& info); + + Return setMuteResponse(const RadioResponseInfo& info); + + Return getMuteResponse(const RadioResponseInfo& info, bool enable); + + Return getClipResponse(const RadioResponseInfo& info, ClipStatus status); + + Return getDataCallListResponse( + const RadioResponseInfo& info, + const ::android::hardware::hidl_vec& dcResponse); + + Return sendOemRilRequestRawResponse(const RadioResponseInfo& info, + const ::android::hardware::hidl_vec& data); + + Return sendOemRilRequestStringsResponse( + const RadioResponseInfo& info, + const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& data); + + Return setSuppServiceNotificationsResponse(const RadioResponseInfo& info); + + Return writeSmsToSimResponse(const RadioResponseInfo& info, int32_t index); + + Return deleteSmsOnSimResponse(const RadioResponseInfo& info); + + Return setBandModeResponse(const RadioResponseInfo& info); + + Return getAvailableBandModesResponse( + const RadioResponseInfo& info, + const ::android::hardware::hidl_vec& bandModes); + + Return sendEnvelopeResponse(const RadioResponseInfo& info, + const ::android::hardware::hidl_string& commandResponse); + + Return sendTerminalResponseToSimResponse(const RadioResponseInfo& info); + + Return handleStkCallSetupRequestFromSimResponse(const RadioResponseInfo& info); + + Return explicitCallTransferResponse(const RadioResponseInfo& info); + + Return setPreferredNetworkTypeResponse(const RadioResponseInfo& info); + + Return getPreferredNetworkTypeResponse(const RadioResponseInfo& info, + PreferredNetworkType nwType); + + Return getNeighboringCidsResponse( + const RadioResponseInfo& info, const ::android::hardware::hidl_vec& cells); + + Return setLocationUpdatesResponse(const RadioResponseInfo& info); + + Return setCdmaSubscriptionSourceResponse(const RadioResponseInfo& info); + + Return setCdmaRoamingPreferenceResponse(const RadioResponseInfo& info); + + Return getCdmaRoamingPreferenceResponse(const RadioResponseInfo& info, + CdmaRoamingType type); + + Return setTTYModeResponse(const RadioResponseInfo& info); + + Return getTTYModeResponse(const RadioResponseInfo& info, TtyMode mode); + + Return setPreferredVoicePrivacyResponse(const RadioResponseInfo& info); + + Return getPreferredVoicePrivacyResponse(const RadioResponseInfo& info, bool enable); + + Return sendCDMAFeatureCodeResponse(const RadioResponseInfo& info); + + Return sendBurstDtmfResponse(const RadioResponseInfo& info); + + Return sendCdmaSmsResponse(const RadioResponseInfo& info, const SendSmsResult& sms); + + Return acknowledgeLastIncomingCdmaSmsResponse(const RadioResponseInfo& info); + + Return getGsmBroadcastConfigResponse( + const RadioResponseInfo& info, + const ::android::hardware::hidl_vec& configs); + + Return setGsmBroadcastConfigResponse(const RadioResponseInfo& info); + + Return setGsmBroadcastActivationResponse(const RadioResponseInfo& info); + + Return getCdmaBroadcastConfigResponse( + const RadioResponseInfo& info, + const ::android::hardware::hidl_vec& configs); + + Return setCdmaBroadcastConfigResponse(const RadioResponseInfo& info); + + Return setCdmaBroadcastActivationResponse(const RadioResponseInfo& info); + + Return getCDMASubscriptionResponse(const RadioResponseInfo& info, + const ::android::hardware::hidl_string& mdn, + const ::android::hardware::hidl_string& hSid, + const ::android::hardware::hidl_string& hNid, + const ::android::hardware::hidl_string& min, + const ::android::hardware::hidl_string& prl); + + Return writeSmsToRuimResponse(const RadioResponseInfo& info, uint32_t index); + + Return deleteSmsOnRuimResponse(const RadioResponseInfo& info); + + Return getDeviceIdentityResponse(const RadioResponseInfo& info, + const ::android::hardware::hidl_string& imei, + const ::android::hardware::hidl_string& imeisv, + const ::android::hardware::hidl_string& esn, + const ::android::hardware::hidl_string& meid); + + Return exitEmergencyCallbackModeResponse(const RadioResponseInfo& info); + + Return getSmscAddressResponse(const RadioResponseInfo& info, + const ::android::hardware::hidl_string& smsc); + + Return setSmscAddressResponse(const RadioResponseInfo& info); + + Return reportSmsMemoryStatusResponse(const RadioResponseInfo& info); + + Return reportStkServiceIsRunningResponse(const RadioResponseInfo& info); + + Return getCdmaSubscriptionSourceResponse(const RadioResponseInfo& info, + CdmaSubscriptionSource source); + + Return requestIsimAuthenticationResponse( + const RadioResponseInfo& info, const ::android::hardware::hidl_string& response); + + Return acknowledgeIncomingGsmSmsWithPduResponse(const RadioResponseInfo& info); + + Return sendEnvelopeWithStatusResponse(const RadioResponseInfo& info, + const IccIoResult& iccIo); + + Return getVoiceRadioTechnologyResponse(const RadioResponseInfo& info, + RadioTechnology rat); + + Return getCellInfoListResponse(const RadioResponseInfo& info, + const ::android::hardware::hidl_vec& cellInfo); + + Return setCellInfoListRateResponse(const RadioResponseInfo& info); + + Return setInitialAttachApnResponse(const RadioResponseInfo& info); + + Return getImsRegistrationStateResponse(const RadioResponseInfo& info, bool isRegistered, + RadioTechnologyFamily ratFamily); + + Return sendImsSmsResponse(const RadioResponseInfo& info, const SendSmsResult& sms); + + Return iccTransmitApduBasicChannelResponse(const RadioResponseInfo& info, + const IccIoResult& result); + + Return iccOpenLogicalChannelResponse( + const RadioResponseInfo& info, int32_t channelId, + const ::android::hardware::hidl_vec& selectResponse); + + Return iccCloseLogicalChannelResponse(const RadioResponseInfo& info); + + Return iccTransmitApduLogicalChannelResponse(const RadioResponseInfo& info, + const IccIoResult& result); + + Return nvReadItemResponse(const RadioResponseInfo& info, + const ::android::hardware::hidl_string& result); + + Return nvWriteItemResponse(const RadioResponseInfo& info); + + Return nvWriteCdmaPrlResponse(const RadioResponseInfo& info); + + Return nvResetConfigResponse(const RadioResponseInfo& info); + + Return setUiccSubscriptionResponse(const RadioResponseInfo& info); + + Return setDataAllowedResponse(const RadioResponseInfo& info); + + Return getHardwareConfigResponse( + const RadioResponseInfo& info, const ::android::hardware::hidl_vec& config); + + Return requestIccSimAuthenticationResponse(const RadioResponseInfo& info, + const IccIoResult& result); + + Return setDataProfileResponse(const RadioResponseInfo& info); + + Return requestShutdownResponse(const RadioResponseInfo& info); + + Return getRadioCapabilityResponse(const RadioResponseInfo& info, + const RadioCapability& rc); + + Return setRadioCapabilityResponse(const RadioResponseInfo& info, + const RadioCapability& rc); + + Return startLceServiceResponse(const RadioResponseInfo& info, + const LceStatusInfo& statusInfo); + + Return stopLceServiceResponse(const RadioResponseInfo& info, + const LceStatusInfo& statusInfo); + + Return pullLceDataResponse(const RadioResponseInfo& info, const LceDataInfo& lceInfo); + + Return getModemActivityInfoResponse(const RadioResponseInfo& info, + const ActivityStatsInfo& activityInfo); + + Return setAllowedCarriersResponse(const RadioResponseInfo& info, int32_t numAllowed); + + Return getAllowedCarriersResponse(const RadioResponseInfo& info, bool allAllowed, + const CarrierRestrictions& carriers); + + Return sendDeviceStateResponse(const RadioResponseInfo& info); + + Return setIndicationFilterResponse(const RadioResponseInfo& info); + + Return setSimCardPowerResponse(const RadioResponseInfo& info); + + Return acknowledgeRequest(int32_t serial); + /* 1.1 Api */ Return setCarrierInfoForImsiEncryptionResponse(const RadioResponseInfo& info); @@ -42,13 +401,170 @@ class RadioResponse_v1_1 : public RadioResponse { Return startNetworkScanResponse(const RadioResponseInfo& info); Return stopNetworkScanResponse(const RadioResponseInfo& info); + + Return startKeepaliveResponse(const RadioResponseInfo& info, + const KeepaliveStatus& status); + + Return stopKeepaliveResponse(const RadioResponseInfo& info); +}; + +/* Callback class for radio indication */ +class RadioIndication_v1_1 : public ::android::hardware::radio::V1_1::IRadioIndication { + protected: + RadioHidlTest_v1_1& parent_v1_1; + + public: + RadioIndication_v1_1(RadioHidlTest_v1_1& parent_v1_1); + virtual ~RadioIndication_v1_1() = default; + + /* 1.1 Api */ + Return carrierInfoForImsiEncryption(RadioIndicationType info); + + Return networkScanResult(RadioIndicationType type, const NetworkScanResult& result); + + Return keepaliveStatus(RadioIndicationType type, const KeepaliveStatus& status); + + /* 1.0 Api */ + Return radioStateChanged(RadioIndicationType type, RadioState radioState); + + Return callStateChanged(RadioIndicationType type); + + Return networkStateChanged(RadioIndicationType type); + + Return newSms(RadioIndicationType type, + const ::android::hardware::hidl_vec& pdu); + + Return newSmsStatusReport(RadioIndicationType type, + const ::android::hardware::hidl_vec& pdu); + + Return newSmsOnSim(RadioIndicationType type, int32_t recordNumber); + + Return onUssd(RadioIndicationType type, UssdModeType modeType, + const ::android::hardware::hidl_string& msg); + + Return nitzTimeReceived(RadioIndicationType type, + const ::android::hardware::hidl_string& nitzTime, + uint64_t receivedTime); + + Return currentSignalStrength(RadioIndicationType type, + const SignalStrength& signalStrength); + + Return dataCallListChanged( + RadioIndicationType type, const ::android::hardware::hidl_vec& dcList); + + Return suppSvcNotify(RadioIndicationType type, const SuppSvcNotification& suppSvc); + + Return stkSessionEnd(RadioIndicationType type); + + Return stkProactiveCommand(RadioIndicationType type, + const ::android::hardware::hidl_string& cmd); + + Return stkEventNotify(RadioIndicationType type, + const ::android::hardware::hidl_string& cmd); + + Return stkCallSetup(RadioIndicationType type, int64_t timeout); + + Return simSmsStorageFull(RadioIndicationType type); + + Return simRefresh(RadioIndicationType type, const SimRefreshResult& refreshResult); + + Return callRing(RadioIndicationType type, bool isGsm, const CdmaSignalInfoRecord& record); + + Return simStatusChanged(RadioIndicationType type); + + Return cdmaNewSms(RadioIndicationType type, const CdmaSmsMessage& msg); + + Return newBroadcastSms(RadioIndicationType type, + const ::android::hardware::hidl_vec& data); + + Return cdmaRuimSmsStorageFull(RadioIndicationType type); + + Return restrictedStateChanged(RadioIndicationType type, PhoneRestrictedState state); + + Return enterEmergencyCallbackMode(RadioIndicationType type); + + Return cdmaCallWaiting(RadioIndicationType type, + const CdmaCallWaiting& callWaitingRecord); + + Return cdmaOtaProvisionStatus(RadioIndicationType type, CdmaOtaProvisionStatus status); + + Return cdmaInfoRec(RadioIndicationType type, const CdmaInformationRecords& records); + + Return indicateRingbackTone(RadioIndicationType type, bool start); + + Return resendIncallMute(RadioIndicationType type); + + Return cdmaSubscriptionSourceChanged(RadioIndicationType type, + CdmaSubscriptionSource cdmaSource); + + Return cdmaPrlChanged(RadioIndicationType type, int32_t version); + + Return exitEmergencyCallbackMode(RadioIndicationType type); + + Return rilConnected(RadioIndicationType type); + + Return voiceRadioTechChanged(RadioIndicationType type, RadioTechnology rat); + + Return cellInfoList(RadioIndicationType type, + const ::android::hardware::hidl_vec& records); + + Return imsNetworkStateChanged(RadioIndicationType type); + + Return subscriptionStatusChanged(RadioIndicationType type, bool activate); + + Return srvccStateNotify(RadioIndicationType type, SrvccState state); + + Return hardwareConfigChanged( + RadioIndicationType type, const ::android::hardware::hidl_vec& configs); + + Return radioCapabilityIndication(RadioIndicationType type, const RadioCapability& rc); + + Return onSupplementaryServiceIndication(RadioIndicationType type, + const StkCcUnsolSsResult& ss); + + Return stkCallControlAlphaNotify(RadioIndicationType type, + const ::android::hardware::hidl_string& alpha); + + Return lceData(RadioIndicationType type, const LceDataInfo& lce); + + Return pcoData(RadioIndicationType type, const PcoDataInfo& pco); + + Return modemReset(RadioIndicationType type, + const ::android::hardware::hidl_string& reason); }; // The main test class for Radio HIDL. -class RadioHidlTest_v1_1 : public RadioHidlTest { +class RadioHidlTest_v1_1 : public ::testing::VtsHalHidlTargetTestBase { + protected: + std::mutex mtx; + std::condition_variable cv; + int count; + public: virtual void SetUp() override; + + virtual void TearDown() override; + + /* Used as a mechanism to inform the test about data/event callback */ + void notify(); + + /* Test code calls this function to wait for response */ + std::cv_status wait(); + + /* Used for checking General Errors */ + bool CheckGeneralError(); + + /* Used for checking OEM Errors */ + bool CheckOEMError(); + sp<::android::hardware::radio::V1_1::IRadio> radio_v1_1; sp radioRsp_v1_1; - sp<::android::hardware::radio::V1_1::IRadioIndication> radioInd_v1_1; + sp radioInd_v1_1; +}; + +// A class for test environment setup +class RadioHidlEnvironment : public ::testing::Environment { + public: + virtual void SetUp() {} + virtual void TearDown() {} }; \ No newline at end of file diff --git a/radio/1.1/vts/functional/radio_indication.cpp b/radio/1.1/vts/functional/radio_indication.cpp new file mode 100644 index 0000000000..652e5553e2 --- /dev/null +++ b/radio/1.1/vts/functional/radio_indication.cpp @@ -0,0 +1,251 @@ +/* + * 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 + +RadioIndication_v1_1::RadioIndication_v1_1(RadioHidlTest_v1_1& parent) : parent_v1_1(parent) {} + +/* 1.1 Apis */ +Return RadioIndication_v1_1::carrierInfoForImsiEncryption(RadioIndicationType /*info*/) { + return Void(); +} + +Return RadioIndication_v1_1::networkScanResult(RadioIndicationType /*type*/, + const NetworkScanResult& /*result*/) { + return Void(); +} + +Return RadioIndication_v1_1::keepaliveStatus(RadioIndicationType /*type*/, + const KeepaliveStatus& /*status*/) { + return Void(); +} + +/* 1.0 Apis */ +Return RadioIndication_v1_1::radioStateChanged(RadioIndicationType /*type*/, + RadioState /*radioState*/) { + return Void(); +} + +Return RadioIndication_v1_1::callStateChanged(RadioIndicationType /*type*/) { + return Void(); +} + +Return RadioIndication_v1_1::networkStateChanged(RadioIndicationType /*type*/) { + return Void(); +} + +Return RadioIndication_v1_1::newSms(RadioIndicationType /*type*/, + const ::android::hardware::hidl_vec& /*pdu*/) { + return Void(); +} + +Return RadioIndication_v1_1::newSmsStatusReport( + RadioIndicationType /*type*/, const ::android::hardware::hidl_vec& /*pdu*/) { + return Void(); +} + +Return RadioIndication_v1_1::newSmsOnSim(RadioIndicationType /*type*/, + int32_t /*recordNumber*/) { + return Void(); +} + +Return RadioIndication_v1_1::onUssd(RadioIndicationType /*type*/, UssdModeType /*modeType*/, + const ::android::hardware::hidl_string& /*msg*/) { + return Void(); +} + +Return RadioIndication_v1_1::nitzTimeReceived( + RadioIndicationType /*type*/, const ::android::hardware::hidl_string& /*nitzTime*/, + uint64_t /*receivedTime*/) { + return Void(); +} + +Return RadioIndication_v1_1::currentSignalStrength(RadioIndicationType /*type*/, + const SignalStrength& /*signalStrength*/) { + return Void(); +} + +Return RadioIndication_v1_1::dataCallListChanged( + RadioIndicationType /*type*/, + const ::android::hardware::hidl_vec& /*dcList*/) { + return Void(); +} + +Return RadioIndication_v1_1::suppSvcNotify(RadioIndicationType /*type*/, + const SuppSvcNotification& /*suppSvc*/) { + return Void(); +} + +Return RadioIndication_v1_1::stkSessionEnd(RadioIndicationType /*type*/) { + return Void(); +} + +Return RadioIndication_v1_1::stkProactiveCommand( + RadioIndicationType /*type*/, const ::android::hardware::hidl_string& /*cmd*/) { + return Void(); +} + +Return RadioIndication_v1_1::stkEventNotify(RadioIndicationType /*type*/, + const ::android::hardware::hidl_string& /*cmd*/) { + return Void(); +} + +Return RadioIndication_v1_1::stkCallSetup(RadioIndicationType /*type*/, int64_t /*timeout*/) { + return Void(); +} + +Return RadioIndication_v1_1::simSmsStorageFull(RadioIndicationType /*type*/) { + return Void(); +} + +Return RadioIndication_v1_1::simRefresh(RadioIndicationType /*type*/, + const SimRefreshResult& /*refreshResult*/) { + return Void(); +} + +Return RadioIndication_v1_1::callRing(RadioIndicationType /*type*/, bool /*isGsm*/, + const CdmaSignalInfoRecord& /*record*/) { + return Void(); +} + +Return RadioIndication_v1_1::simStatusChanged(RadioIndicationType /*type*/) { + return Void(); +} + +Return RadioIndication_v1_1::cdmaNewSms(RadioIndicationType /*type*/, + const CdmaSmsMessage& /*msg*/) { + return Void(); +} + +Return RadioIndication_v1_1::newBroadcastSms( + RadioIndicationType /*type*/, const ::android::hardware::hidl_vec& /*data*/) { + return Void(); +} + +Return RadioIndication_v1_1::cdmaRuimSmsStorageFull(RadioIndicationType /*type*/) { + return Void(); +} + +Return RadioIndication_v1_1::restrictedStateChanged(RadioIndicationType /*type*/, + PhoneRestrictedState /*state*/) { + return Void(); +} + +Return RadioIndication_v1_1::enterEmergencyCallbackMode(RadioIndicationType /*type*/) { + return Void(); +} + +Return RadioIndication_v1_1::cdmaCallWaiting(RadioIndicationType /*type*/, + const CdmaCallWaiting& /*callWaitingRecord*/) { + return Void(); +} + +Return RadioIndication_v1_1::cdmaOtaProvisionStatus(RadioIndicationType /*type*/, + CdmaOtaProvisionStatus /*status*/) { + return Void(); +} + +Return RadioIndication_v1_1::cdmaInfoRec(RadioIndicationType /*type*/, + const CdmaInformationRecords& /*records*/) { + return Void(); +} + +Return RadioIndication_v1_1::indicateRingbackTone(RadioIndicationType /*type*/, + bool /*start*/) { + return Void(); +} + +Return RadioIndication_v1_1::resendIncallMute(RadioIndicationType /*type*/) { + return Void(); +} + +Return RadioIndication_v1_1::cdmaSubscriptionSourceChanged( + RadioIndicationType /*type*/, CdmaSubscriptionSource /*cdmaSource*/) { + return Void(); +} + +Return RadioIndication_v1_1::cdmaPrlChanged(RadioIndicationType /*type*/, + int32_t /*version*/) { + return Void(); +} + +Return RadioIndication_v1_1::exitEmergencyCallbackMode(RadioIndicationType /*type*/) { + return Void(); +} + +Return RadioIndication_v1_1::rilConnected(RadioIndicationType /*type*/) { + return Void(); +} + +Return RadioIndication_v1_1::voiceRadioTechChanged(RadioIndicationType /*type*/, + RadioTechnology /*rat*/) { + return Void(); +} + +Return RadioIndication_v1_1::cellInfoList( + RadioIndicationType /*type*/, const ::android::hardware::hidl_vec& /*records*/) { + return Void(); +} + +Return RadioIndication_v1_1::imsNetworkStateChanged(RadioIndicationType /*type*/) { + return Void(); +} + +Return RadioIndication_v1_1::subscriptionStatusChanged(RadioIndicationType /*type*/, + bool /*activate*/) { + return Void(); +} + +Return RadioIndication_v1_1::srvccStateNotify(RadioIndicationType /*type*/, + SrvccState /*state*/) { + return Void(); +} + +Return RadioIndication_v1_1::hardwareConfigChanged( + RadioIndicationType /*type*/, + const ::android::hardware::hidl_vec& /*configs*/) { + return Void(); +} + +Return RadioIndication_v1_1::radioCapabilityIndication(RadioIndicationType /*type*/, + const RadioCapability& /*rc*/) { + return Void(); +} + +Return RadioIndication_v1_1::onSupplementaryServiceIndication( + RadioIndicationType /*type*/, const StkCcUnsolSsResult& /*ss*/) { + return Void(); +} + +Return RadioIndication_v1_1::stkCallControlAlphaNotify( + RadioIndicationType /*type*/, const ::android::hardware::hidl_string& /*alpha*/) { + return Void(); +} + +Return RadioIndication_v1_1::lceData(RadioIndicationType /*type*/, + const LceDataInfo& /*lce*/) { + return Void(); +} + +Return RadioIndication_v1_1::pcoData(RadioIndicationType /*type*/, + const PcoDataInfo& /*pco*/) { + return Void(); +} + +Return RadioIndication_v1_1::modemReset(RadioIndicationType /*type*/, + const ::android::hardware::hidl_string& /*reason*/) { + return Void(); +} \ No newline at end of file diff --git a/radio/1.1/vts/functional/radio_response.cpp b/radio/1.1/vts/functional/radio_response.cpp index 5b64543d48..98cab98104 100644 --- a/radio/1.1/vts/functional/radio_response.cpp +++ b/radio/1.1/vts/functional/radio_response.cpp @@ -16,8 +16,646 @@ #include -RadioResponse_v1_1::RadioResponse_v1_1(RadioHidlTest_v1_1& parent) - : RadioResponse(parent), parent_v1_1(parent) {} +CardStatus cardStatus; + +RadioResponse_v1_1::RadioResponse_v1_1(RadioHidlTest_v1_1& parent) : parent_v1_1(parent) {} + +/* 1.0 Apis */ +Return RadioResponse_v1_1::getIccCardStatusResponse(const RadioResponseInfo& info, + const CardStatus& card_status) { + rspInfo = info; + cardStatus = card_status; + parent_v1_1.notify(); + return Void(); +} + +Return RadioResponse_v1_1::supplyIccPinForAppResponse(const RadioResponseInfo& /*info*/, + int32_t /*remainingRetries*/) { + return Void(); +} + +Return RadioResponse_v1_1::supplyIccPukForAppResponse(const RadioResponseInfo& /*info*/, + int32_t /*remainingRetries*/) { + return Void(); +} + +Return RadioResponse_v1_1::supplyIccPin2ForAppResponse(const RadioResponseInfo& /*info*/, + int32_t /*remainingRetries*/) { + return Void(); +} + +Return RadioResponse_v1_1::supplyIccPuk2ForAppResponse(const RadioResponseInfo& /*info*/, + int32_t /*remainingRetries*/) { + return Void(); +} + +Return RadioResponse_v1_1::changeIccPinForAppResponse(const RadioResponseInfo& /*info*/, + int32_t /*remainingRetries*/) { + return Void(); +} + +Return RadioResponse_v1_1::changeIccPin2ForAppResponse(const RadioResponseInfo& /*info*/, + int32_t /*remainingRetries*/) { + return Void(); +} + +Return RadioResponse_v1_1::supplyNetworkDepersonalizationResponse( + const RadioResponseInfo& /*info*/, int32_t /*remainingRetries*/) { + return Void(); +} + +Return RadioResponse_v1_1::getCurrentCallsResponse( + const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_vec& /*calls*/) { + return Void(); +} + +Return RadioResponse_v1_1::dialResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::getIMSIForAppResponse( + const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*imsi*/) { + return Void(); +} + +Return RadioResponse_v1_1::hangupConnectionResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::hangupWaitingOrBackgroundResponse( + const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::hangupForegroundResumeBackgroundResponse( + const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::switchWaitingOrHoldingAndActiveResponse( + const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::conferenceResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::rejectCallResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::getLastCallFailCauseResponse( + const RadioResponseInfo& /*info*/, const LastCallFailCauseInfo& /*failCauseInfo*/) { + return Void(); +} + +Return RadioResponse_v1_1::getSignalStrengthResponse(const RadioResponseInfo& /*info*/, + const SignalStrength& /*sig_strength*/) { + return Void(); +} + +Return RadioResponse_v1_1::getVoiceRegistrationStateResponse( + const RadioResponseInfo& /*info*/, const VoiceRegStateResult& /*voiceRegResponse*/) { + return Void(); +} + +Return RadioResponse_v1_1::getDataRegistrationStateResponse( + const RadioResponseInfo& /*info*/, const DataRegStateResult& /*dataRegResponse*/) { + return Void(); +} + +Return RadioResponse_v1_1::getOperatorResponse( + const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*longName*/, + const ::android::hardware::hidl_string& /*shortName*/, + const ::android::hardware::hidl_string& /*numeric*/) { + return Void(); +} + +Return RadioResponse_v1_1::setRadioPowerResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::sendDtmfResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::sendSmsResponse(const RadioResponseInfo& /*info*/, + const SendSmsResult& /*sms*/) { + return Void(); +} + +Return RadioResponse_v1_1::sendSMSExpectMoreResponse(const RadioResponseInfo& /*info*/, + const SendSmsResult& /*sms*/) { + return Void(); +} + +Return RadioResponse_v1_1::setupDataCallResponse(const RadioResponseInfo& /*info*/, + const SetupDataCallResult& /*dcResponse*/) { + return Void(); +} + +Return RadioResponse_v1_1::iccIOForAppResponse(const RadioResponseInfo& /*info*/, + const IccIoResult& /*iccIo*/) { + return Void(); +} + +Return RadioResponse_v1_1::sendUssdResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::cancelPendingUssdResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::getClirResponse(const RadioResponseInfo& /*info*/, int32_t /*n*/, + int32_t /*m*/) { + return Void(); +} + +Return RadioResponse_v1_1::setClirResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::getCallForwardStatusResponse( + const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_vec& + /*callForwardInfos*/) { + return Void(); +} + +Return RadioResponse_v1_1::setCallForwardResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::getCallWaitingResponse(const RadioResponseInfo& /*info*/, + bool /*enable*/, int32_t /*serviceClass*/) { + return Void(); +} + +Return RadioResponse_v1_1::setCallWaitingResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::acknowledgeLastIncomingGsmSmsResponse( + const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::acceptCallResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::deactivateDataCallResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::getFacilityLockForAppResponse(const RadioResponseInfo& /*info*/, + int32_t /*response*/) { + return Void(); +} + +Return RadioResponse_v1_1::setFacilityLockForAppResponse(const RadioResponseInfo& /*info*/, + int32_t /*retry*/) { + return Void(); +} + +Return RadioResponse_v1_1::setBarringPasswordResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::getNetworkSelectionModeResponse(const RadioResponseInfo& /*info*/, + bool /*manual*/) { + return Void(); +} + +Return RadioResponse_v1_1::setNetworkSelectionModeAutomaticResponse( + const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::setNetworkSelectionModeManualResponse( + const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::getAvailableNetworksResponse( + const RadioResponseInfo& /*info*/, + const ::android::hardware::hidl_vec& /*networkInfos*/) { + return Void(); +} + +Return RadioResponse_v1_1::startDtmfResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::stopDtmfResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::getBasebandVersionResponse( + const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*version*/) { + return Void(); +} + +Return RadioResponse_v1_1::separateConnectionResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::setMuteResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::getMuteResponse(const RadioResponseInfo& /*info*/, + bool /*enable*/) { + return Void(); +} + +Return RadioResponse_v1_1::getClipResponse(const RadioResponseInfo& /*info*/, + ClipStatus /*status*/) { + return Void(); +} + +Return RadioResponse_v1_1::getDataCallListResponse( + const RadioResponseInfo& /*info*/, + const ::android::hardware::hidl_vec& /*dcResponse*/) { + return Void(); +} + +Return RadioResponse_v1_1::sendOemRilRequestRawResponse( + const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_vec& /*data*/) { + return Void(); +} + +Return RadioResponse_v1_1::sendOemRilRequestStringsResponse( + const RadioResponseInfo& /*info*/, + const ::android::hardware::hidl_vec< ::android::hardware::hidl_string>& /*data*/) { + return Void(); +} + +Return RadioResponse_v1_1::setSuppServiceNotificationsResponse( + const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::writeSmsToSimResponse(const RadioResponseInfo& /*info*/, + int32_t /*index*/) { + return Void(); +} + +Return RadioResponse_v1_1::deleteSmsOnSimResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::setBandModeResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::getAvailableBandModesResponse( + const RadioResponseInfo& /*info*/, + const ::android::hardware::hidl_vec& /*bandModes*/) { + return Void(); +} + +Return RadioResponse_v1_1::sendEnvelopeResponse( + const RadioResponseInfo& /*info*/, + const ::android::hardware::hidl_string& /*commandResponse*/) { + return Void(); +} + +Return RadioResponse_v1_1::sendTerminalResponseToSimResponse( + const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::handleStkCallSetupRequestFromSimResponse( + const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::explicitCallTransferResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::setPreferredNetworkTypeResponse( + const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::getPreferredNetworkTypeResponse(const RadioResponseInfo& /*info*/, + PreferredNetworkType /*nw_type*/) { + return Void(); +} + +Return RadioResponse_v1_1::getNeighboringCidsResponse( + const RadioResponseInfo& /*info*/, + const ::android::hardware::hidl_vec& /*cells*/) { + return Void(); +} + +Return RadioResponse_v1_1::setLocationUpdatesResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::setCdmaSubscriptionSourceResponse( + const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::setCdmaRoamingPreferenceResponse( + const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::getCdmaRoamingPreferenceResponse(const RadioResponseInfo& /*info*/, + CdmaRoamingType /*type*/) { + return Void(); +} + +Return RadioResponse_v1_1::setTTYModeResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::getTTYModeResponse(const RadioResponseInfo& /*info*/, + TtyMode /*mode*/) { + return Void(); +} + +Return RadioResponse_v1_1::setPreferredVoicePrivacyResponse( + const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::getPreferredVoicePrivacyResponse(const RadioResponseInfo& /*info*/, + bool /*enable*/) { + return Void(); +} + +Return RadioResponse_v1_1::sendCDMAFeatureCodeResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::sendBurstDtmfResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::sendCdmaSmsResponse(const RadioResponseInfo& /*info*/, + const SendSmsResult& /*sms*/) { + return Void(); +} + +Return RadioResponse_v1_1::acknowledgeLastIncomingCdmaSmsResponse( + const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::getGsmBroadcastConfigResponse( + const RadioResponseInfo& /*info*/, + const ::android::hardware::hidl_vec& /*configs*/) { + return Void(); +} + +Return RadioResponse_v1_1::setGsmBroadcastConfigResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::setGsmBroadcastActivationResponse( + const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::getCdmaBroadcastConfigResponse( + const RadioResponseInfo& /*info*/, + const ::android::hardware::hidl_vec& /*configs*/) { + return Void(); +} + +Return RadioResponse_v1_1::setCdmaBroadcastConfigResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::setCdmaBroadcastActivationResponse( + const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::getCDMASubscriptionResponse( + const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*mdn*/, + const ::android::hardware::hidl_string& /*hSid*/, + const ::android::hardware::hidl_string& /*hNid*/, + const ::android::hardware::hidl_string& /*min*/, + const ::android::hardware::hidl_string& /*prl*/) { + return Void(); +} + +Return RadioResponse_v1_1::writeSmsToRuimResponse(const RadioResponseInfo& /*info*/, + uint32_t /*index*/) { + return Void(); +} + +Return RadioResponse_v1_1::deleteSmsOnRuimResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::getDeviceIdentityResponse( + const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*imei*/, + const ::android::hardware::hidl_string& /*imeisv*/, + const ::android::hardware::hidl_string& /*esn*/, + const ::android::hardware::hidl_string& /*meid*/) { + return Void(); +} + +Return RadioResponse_v1_1::exitEmergencyCallbackModeResponse( + const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::getSmscAddressResponse( + const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*smsc*/) { + return Void(); +} + +Return RadioResponse_v1_1::setSmscAddressResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::reportSmsMemoryStatusResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::reportStkServiceIsRunningResponse( + const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::getCdmaSubscriptionSourceResponse( + const RadioResponseInfo& /*info*/, CdmaSubscriptionSource /*source*/) { + return Void(); +} + +Return RadioResponse_v1_1::requestIsimAuthenticationResponse( + const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*response*/) { + return Void(); +} + +Return RadioResponse_v1_1::acknowledgeIncomingGsmSmsWithPduResponse( + const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::sendEnvelopeWithStatusResponse(const RadioResponseInfo& /*info*/, + const IccIoResult& /*iccIo*/) { + return Void(); +} + +Return RadioResponse_v1_1::getVoiceRadioTechnologyResponse(const RadioResponseInfo& /*info*/, + RadioTechnology /*rat*/) { + return Void(); +} + +Return RadioResponse_v1_1::getCellInfoListResponse( + const RadioResponseInfo& /*info*/, + const ::android::hardware::hidl_vec& /*cellInfo*/) { + return Void(); +} + +Return RadioResponse_v1_1::setCellInfoListRateResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::setInitialAttachApnResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::getImsRegistrationStateResponse( + const RadioResponseInfo& /*info*/, bool /*isRegistered*/, RadioTechnologyFamily /*ratFamily*/) { + return Void(); +} + +Return RadioResponse_v1_1::sendImsSmsResponse(const RadioResponseInfo& /*info*/, + const SendSmsResult& /*sms*/) { + return Void(); +} + +Return RadioResponse_v1_1::iccTransmitApduBasicChannelResponse( + const RadioResponseInfo& /*info*/, const IccIoResult& /*result*/) { + return Void(); +} + +Return RadioResponse_v1_1::iccOpenLogicalChannelResponse( + const RadioResponseInfo& /*info*/, int32_t /*channelId*/, + const ::android::hardware::hidl_vec& /*selectResponse*/) { + return Void(); +} + +Return RadioResponse_v1_1::iccCloseLogicalChannelResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::iccTransmitApduLogicalChannelResponse( + const RadioResponseInfo& /*info*/, const IccIoResult& /*result*/) { + return Void(); +} + +Return RadioResponse_v1_1::nvReadItemResponse( + const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*result*/) { + return Void(); +} + +Return RadioResponse_v1_1::nvWriteItemResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::nvWriteCdmaPrlResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::nvResetConfigResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::setUiccSubscriptionResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::setDataAllowedResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::getHardwareConfigResponse( + const RadioResponseInfo& /*info*/, + const ::android::hardware::hidl_vec& /*config*/) { + return Void(); +} + +Return RadioResponse_v1_1::requestIccSimAuthenticationResponse( + const RadioResponseInfo& /*info*/, const IccIoResult& /*result*/) { + return Void(); +} + +Return RadioResponse_v1_1::setDataProfileResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::requestShutdownResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::getRadioCapabilityResponse(const RadioResponseInfo& /*info*/, + const RadioCapability& /*rc*/) { + return Void(); +} + +Return RadioResponse_v1_1::setRadioCapabilityResponse(const RadioResponseInfo& /*info*/, + const RadioCapability& /*rc*/) { + return Void(); +} + +Return RadioResponse_v1_1::startLceServiceResponse(const RadioResponseInfo& /*info*/, + const LceStatusInfo& /*statusInfo*/) { + return Void(); +} + +Return RadioResponse_v1_1::stopLceServiceResponse(const RadioResponseInfo& /*info*/, + const LceStatusInfo& /*statusInfo*/) { + return Void(); +} + +Return RadioResponse_v1_1::pullLceDataResponse(const RadioResponseInfo& /*info*/, + const LceDataInfo& /*lceInfo*/) { + return Void(); +} + +Return RadioResponse_v1_1::getModemActivityInfoResponse( + const RadioResponseInfo& /*info*/, const ActivityStatsInfo& /*activityInfo*/) { + return Void(); +} + +Return RadioResponse_v1_1::setAllowedCarriersResponse(const RadioResponseInfo& /*info*/, + int32_t /*numAllowed*/) { + return Void(); +} + +Return RadioResponse_v1_1::getAllowedCarriersResponse( + const RadioResponseInfo& /*info*/, bool /*allAllowed*/, + const CarrierRestrictions& /*carriers*/) { + return Void(); +} + +Return RadioResponse_v1_1::sendDeviceStateResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::setIndicationFilterResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::setSimCardPowerResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} + +Return RadioResponse_v1_1::acknowledgeRequest(int32_t /*serial*/) { + return Void(); +} /* 1.1 Apis */ Return RadioResponse_v1_1::setCarrierInfoForImsiEncryptionResponse( @@ -38,3 +676,12 @@ Return RadioResponse_v1_1::startNetworkScanResponse(const RadioResponseInf Return RadioResponse_v1_1::stopNetworkScanResponse(const RadioResponseInfo& /*info*/) { return Void(); } + +Return RadioResponse_v1_1::startKeepaliveResponse(const RadioResponseInfo& /*info*/, + const KeepaliveStatus& /*status*/) { + return Void(); +} + +Return RadioResponse_v1_1::stopKeepaliveResponse(const RadioResponseInfo& /*info*/) { + return Void(); +} \ No newline at end of file