/* * 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 CardStatus cardStatus; RadioResponse::RadioResponse(RadioHidlTest& parent) : parent(parent) {} Return RadioResponse::getIccCardStatusResponse(const RadioResponseInfo& info, const CardStatus& card_status) { rspInfo = info; cardStatus = card_status; parent.notify(info.serial); return Void(); } Return RadioResponse::supplyIccPinForAppResponse(const RadioResponseInfo& info, int32_t /*remainingRetries*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::supplyIccPukForAppResponse(const RadioResponseInfo& info, int32_t /*remainingRetries*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::supplyIccPin2ForAppResponse(const RadioResponseInfo& info, int32_t /*remainingRetries*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::supplyIccPuk2ForAppResponse(const RadioResponseInfo& info, int32_t /*remainingRetries*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::changeIccPinForAppResponse(const RadioResponseInfo& info, int32_t /*remainingRetries*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::changeIccPin2ForAppResponse(const RadioResponseInfo& info, int32_t /*remainingRetries*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::supplyNetworkDepersonalizationResponse(const RadioResponseInfo& info, int32_t /*remainingRetries*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getCurrentCallsResponse( const RadioResponseInfo& info, const ::android::hardware::hidl_vec& /*calls*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::dialResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getIMSIForAppResponse(const RadioResponseInfo& info, const ::android::hardware::hidl_string& imsi) { rspInfo = info; this->imsi = imsi; parent.notify(info.serial); return Void(); } Return RadioResponse::hangupConnectionResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::hangupWaitingOrBackgroundResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::hangupForegroundResumeBackgroundResponse( const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::switchWaitingOrHoldingAndActiveResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::conferenceResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::rejectCallResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getLastCallFailCauseResponse( const RadioResponseInfo& info, const LastCallFailCauseInfo& /*failCauseInfo*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getSignalStrengthResponse(const RadioResponseInfo& info, const SignalStrength& /*sig_strength*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getVoiceRegistrationStateResponse( const RadioResponseInfo& info, const VoiceRegStateResult& /*voiceRegResponse*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getDataRegistrationStateResponse( const RadioResponseInfo& info, const DataRegStateResult& dataRegResponse) { rspInfo = info; dataRegResp = dataRegResponse; parent.notify(info.serial); return Void(); } Return RadioResponse::getOperatorResponse( const RadioResponseInfo& info, const ::android::hardware::hidl_string& /*longName*/, const ::android::hardware::hidl_string& /*shortName*/, const ::android::hardware::hidl_string& /*numeric*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setRadioPowerResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::sendDtmfResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::sendSmsResponse(const RadioResponseInfo& info, const SendSmsResult& sms) { rspInfo = info; sendSmsResult = sms; parent.notify(info.serial); return Void(); } Return RadioResponse::sendSMSExpectMoreResponse(const RadioResponseInfo& info, const SendSmsResult& sms) { rspInfo = info; sendSmsResult = sms; parent.notify(info.serial); return Void(); } Return RadioResponse::setupDataCallResponse(const RadioResponseInfo& info, const SetupDataCallResult& /*dcResponse*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::iccIOForAppResponse(const RadioResponseInfo& info, const IccIoResult& iccIo) { rspInfo = info; this->iccIoResult = iccIo; parent.notify(info.serial); return Void(); } Return RadioResponse::sendUssdResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::cancelPendingUssdResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getClirResponse(const RadioResponseInfo& info, int32_t /*n*/, int32_t /*m*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setClirResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getCallForwardStatusResponse( const RadioResponseInfo& info, const ::android::hardware::hidl_vec& /*callForwardInfos*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setCallForwardResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getCallWaitingResponse(const RadioResponseInfo& info, bool /*enable*/, int32_t /*serviceClass*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setCallWaitingResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::acknowledgeLastIncomingGsmSmsResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::acceptCallResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::deactivateDataCallResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getFacilityLockForAppResponse(const RadioResponseInfo& info, int32_t /*response*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setFacilityLockForAppResponse(const RadioResponseInfo& info, int32_t /*retry*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setBarringPasswordResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getNetworkSelectionModeResponse(const RadioResponseInfo& info, bool /*manual*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setNetworkSelectionModeAutomaticResponse( const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setNetworkSelectionModeManualResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getAvailableNetworksResponse( const RadioResponseInfo& info, const ::android::hardware::hidl_vec& /*networkInfos*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::startDtmfResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::stopDtmfResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getBasebandVersionResponse( const RadioResponseInfo& info, const ::android::hardware::hidl_string& /*version*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::separateConnectionResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setMuteResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getMuteResponse(const RadioResponseInfo& info, bool /*enable*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getClipResponse(const RadioResponseInfo& info, ClipStatus /*status*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getDataCallListResponse( const RadioResponseInfo& info, const ::android::hardware::hidl_vec& /*dcResponse*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::sendOemRilRequestRawResponse( const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_vec& /*data*/) { return Void(); } Return RadioResponse::sendOemRilRequestStringsResponse( const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_vec< ::android::hardware::hidl_string>& /*data*/) { return Void(); } Return RadioResponse::setSuppServiceNotificationsResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::writeSmsToSimResponse(const RadioResponseInfo& info, int32_t index) { rspInfo = info; writeSmsToSimIndex = index; parent.notify(info.serial); return Void(); } Return RadioResponse::deleteSmsOnSimResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setBandModeResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getAvailableBandModesResponse( const RadioResponseInfo& info, const ::android::hardware::hidl_vec& /*bandModes*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::sendEnvelopeResponse( const RadioResponseInfo& info, const ::android::hardware::hidl_string& /*commandResponse*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::sendTerminalResponseToSimResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::handleStkCallSetupRequestFromSimResponse( const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::explicitCallTransferResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setPreferredNetworkTypeResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getPreferredNetworkTypeResponse(const RadioResponseInfo& info, PreferredNetworkType /*nw_type*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getNeighboringCidsResponse( const RadioResponseInfo& info, const ::android::hardware::hidl_vec& /*cells*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setLocationUpdatesResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setCdmaSubscriptionSourceResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setCdmaRoamingPreferenceResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getCdmaRoamingPreferenceResponse(const RadioResponseInfo& info, CdmaRoamingType /*type*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setTTYModeResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getTTYModeResponse(const RadioResponseInfo& info, TtyMode /*mode*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setPreferredVoicePrivacyResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getPreferredVoicePrivacyResponse(const RadioResponseInfo& info, bool /*enable*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::sendCDMAFeatureCodeResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::sendBurstDtmfResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::sendCdmaSmsResponse(const RadioResponseInfo& info, const SendSmsResult& sms) { rspInfo = info; sendSmsResult = sms; parent.notify(info.serial); return Void(); } Return RadioResponse::acknowledgeLastIncomingCdmaSmsResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getGsmBroadcastConfigResponse( const RadioResponseInfo& info, const ::android::hardware::hidl_vec& /*configs*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setGsmBroadcastConfigResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setGsmBroadcastActivationResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getCdmaBroadcastConfigResponse( const RadioResponseInfo& info, const ::android::hardware::hidl_vec& /*configs*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setCdmaBroadcastConfigResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setCdmaBroadcastActivationResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::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*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::writeSmsToRuimResponse(const RadioResponseInfo& info, uint32_t index) { rspInfo = info; writeSmsToRuimIndex = index; parent.notify(info.serial); return Void(); } Return RadioResponse::deleteSmsOnRuimResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::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*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::exitEmergencyCallbackModeResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getSmscAddressResponse(const RadioResponseInfo& info, const ::android::hardware::hidl_string& smsc) { rspInfo = info; smscAddress = smsc; parent.notify(info.serial); return Void(); } Return RadioResponse::setSmscAddressResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::reportSmsMemoryStatusResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::reportStkServiceIsRunningResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getCdmaSubscriptionSourceResponse(const RadioResponseInfo& info, CdmaSubscriptionSource /*source*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::requestIsimAuthenticationResponse( const RadioResponseInfo& info, const ::android::hardware::hidl_string& /*response*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::acknowledgeIncomingGsmSmsWithPduResponse( const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::sendEnvelopeWithStatusResponse(const RadioResponseInfo& info, const IccIoResult& /*iccIo*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getVoiceRadioTechnologyResponse(const RadioResponseInfo& info, RadioTechnology /*rat*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getCellInfoListResponse( const RadioResponseInfo& info, const ::android::hardware::hidl_vec& /*cellInfo*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setCellInfoListRateResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setInitialAttachApnResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getImsRegistrationStateResponse(const RadioResponseInfo& info, bool /*isRegistered*/, RadioTechnologyFamily /*ratFamily*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::sendImsSmsResponse(const RadioResponseInfo& info, const SendSmsResult& sms) { rspInfo = info; sendSmsResult = sms; parent.notify(info.serial); return Void(); } Return RadioResponse::iccTransmitApduBasicChannelResponse(const RadioResponseInfo& info, const IccIoResult& result) { rspInfo = info; this->iccIoResult = result; parent.notify(info.serial); return Void(); } Return RadioResponse::iccOpenLogicalChannelResponse( const RadioResponseInfo& info, int32_t channelId, const ::android::hardware::hidl_vec& /*selectResponse*/) { rspInfo = info; this->channelId = channelId; parent.notify(info.serial); return Void(); } Return RadioResponse::iccCloseLogicalChannelResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::iccTransmitApduLogicalChannelResponse(const RadioResponseInfo& info, const IccIoResult& result) { rspInfo = info; this->iccIoResult = result; parent.notify(info.serial); return Void(); } Return RadioResponse::nvReadItemResponse(const RadioResponseInfo& info, const ::android::hardware::hidl_string& /*result*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::nvWriteItemResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::nvWriteCdmaPrlResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::nvResetConfigResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setUiccSubscriptionResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setDataAllowedResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getHardwareConfigResponse( const RadioResponseInfo& info, const ::android::hardware::hidl_vec& /*config*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::requestIccSimAuthenticationResponse(const RadioResponseInfo& info, const IccIoResult& result) { rspInfo = info; this->iccIoResult = result; parent.notify(info.serial); return Void(); } Return RadioResponse::setDataProfileResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::requestShutdownResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getRadioCapabilityResponse(const RadioResponseInfo& info, const RadioCapability& /*rc*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setRadioCapabilityResponse(const RadioResponseInfo& info, const RadioCapability& /*rc*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::startLceServiceResponse(const RadioResponseInfo& info, const LceStatusInfo& /*statusInfo*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::stopLceServiceResponse(const RadioResponseInfo& info, const LceStatusInfo& /*statusInfo*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::pullLceDataResponse(const RadioResponseInfo& info, const LceDataInfo& /*lceInfo*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getModemActivityInfoResponse( const RadioResponseInfo& info, const ActivityStatsInfo& /*activityInfo*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setAllowedCarriersResponse(const RadioResponseInfo& info, int32_t /*numAllowed*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::getAllowedCarriersResponse(const RadioResponseInfo& info, bool /*allAllowed*/, const CarrierRestrictions& /*carriers*/) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::sendDeviceStateResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setIndicationFilterResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::setSimCardPowerResponse(const RadioResponseInfo& info) { rspInfo = info; parent.notify(info.serial); return Void(); } Return RadioResponse::acknowledgeRequest(int32_t /*serial*/) { return Void(); }