mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Implement RadioMessaging for AIDL-HIDL Telephony HAL translator
Bug: 203699028 Test: Boot and grep logcat against radiocompat Change-Id: I10f0fc0b871fbaf26145c83211770a82af6adc61
This commit is contained in:
@@ -37,17 +37,32 @@ cc_library {
|
||||
"android.hardware.radio.config@1.1",
|
||||
"android.hardware.radio.config@1.2",
|
||||
"android.hardware.radio.config@1.3",
|
||||
"android.hardware.radio.messaging-V1-ndk",
|
||||
"android.hardware.radio@1.0",
|
||||
"android.hardware.radio@1.1",
|
||||
"android.hardware.radio@1.2",
|
||||
"android.hardware.radio@1.3",
|
||||
"android.hardware.radio@1.4",
|
||||
"android.hardware.radio@1.5",
|
||||
"android.hardware.radio@1.6",
|
||||
"libbase",
|
||||
"libbinder_ndk",
|
||||
"libhidlbase",
|
||||
"libutils",
|
||||
],
|
||||
srcs: [
|
||||
"RadioCompatBase.cpp",
|
||||
"RadioIndication.cpp",
|
||||
"RadioResponse.cpp",
|
||||
"commonStructs.cpp",
|
||||
"config/RadioConfig.cpp",
|
||||
"config/RadioConfigIndication.cpp",
|
||||
"config/RadioConfigResponse.cpp",
|
||||
"config/structs.cpp",
|
||||
"messaging/RadioIndication-messaging.cpp",
|
||||
"messaging/RadioMessaging.cpp",
|
||||
"messaging/RadioResponse-messaging.cpp",
|
||||
"messaging/structs.cpp",
|
||||
],
|
||||
export_include_dirs: ["include"],
|
||||
}
|
||||
|
||||
35
radio/aidl/compat/libradiocompat/RadioCompatBase.cpp
Normal file
35
radio/aidl/compat/libradiocompat/RadioCompatBase.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (C) 2021 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 <libradiocompat/RadioCompatBase.h>
|
||||
|
||||
#include <android-base/logging.h>
|
||||
|
||||
namespace android::hardware::radio::compat {
|
||||
|
||||
RadioCompatBase::RadioCompatBase(sp<V1_5::IRadio> hidlHal, sp<RadioResponse> radioResponse,
|
||||
sp<RadioIndication> radioIndication)
|
||||
: mHal1_5(hidlHal),
|
||||
mHal1_6(V1_6::IRadio::castFrom(hidlHal)),
|
||||
mRadioResponse(radioResponse),
|
||||
mRadioIndication(radioIndication) {}
|
||||
|
||||
V1_6::IRadioResponse& RadioCompatBase::respond() {
|
||||
CHECK(mRadioResponse) << "This shouldn't happen (response functions are passed in constructor)";
|
||||
return *mRadioResponse;
|
||||
}
|
||||
|
||||
} // namespace android::hardware::radio::compat
|
||||
344
radio/aidl/compat/libradiocompat/RadioIndication.cpp
Normal file
344
radio/aidl/compat/libradiocompat/RadioIndication.cpp
Normal file
@@ -0,0 +1,344 @@
|
||||
/*
|
||||
* Copyright (C) 2021 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 <libradiocompat/RadioIndication.h>
|
||||
|
||||
// TODO(b/203699028): remove when fully implemented
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
|
||||
namespace android::hardware::radio::compat {
|
||||
|
||||
Return<void> RadioIndication::radioStateChanged(V1_0::RadioIndicationType type,
|
||||
V1_0::RadioState radioState) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::callStateChanged(V1_0::RadioIndicationType type) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::networkStateChanged(V1_0::RadioIndicationType type) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::nitzTimeReceived(V1_0::RadioIndicationType type,
|
||||
const hidl_string& nitzTime, uint64_t receivedTime) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::currentSignalStrength(V1_0::RadioIndicationType type,
|
||||
const V1_0::SignalStrength& signalStrength) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::dataCallListChanged(
|
||||
V1_0::RadioIndicationType type, const hidl_vec<V1_0::SetupDataCallResult>& dcList) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::suppSvcNotify(V1_0::RadioIndicationType type,
|
||||
const V1_0::SuppSvcNotification& suppSvc) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::stkSessionEnd(V1_0::RadioIndicationType type) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::stkProactiveCommand(V1_0::RadioIndicationType type,
|
||||
const hidl_string& cmd) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::stkEventNotify(V1_0::RadioIndicationType type,
|
||||
const hidl_string& cmd) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::stkCallSetup(V1_0::RadioIndicationType type, int64_t timeout) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::simRefresh(V1_0::RadioIndicationType type,
|
||||
const V1_0::SimRefreshResult& refreshResult) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::callRing(V1_0::RadioIndicationType type, bool isGsm,
|
||||
const V1_0::CdmaSignalInfoRecord& record) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::simStatusChanged(V1_0::RadioIndicationType type) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::restrictedStateChanged(V1_0::RadioIndicationType type,
|
||||
V1_0::PhoneRestrictedState state) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::enterEmergencyCallbackMode(V1_0::RadioIndicationType type) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::cdmaCallWaiting(V1_0::RadioIndicationType type,
|
||||
const V1_0::CdmaCallWaiting& callWaitingRecord) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::cdmaOtaProvisionStatus(V1_0::RadioIndicationType type,
|
||||
V1_0::CdmaOtaProvisionStatus status) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::cdmaInfoRec(V1_0::RadioIndicationType type,
|
||||
const V1_0::CdmaInformationRecords& records) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::indicateRingbackTone(V1_0::RadioIndicationType type, bool start) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::resendIncallMute(V1_0::RadioIndicationType type) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::cdmaSubscriptionSourceChanged(
|
||||
V1_0::RadioIndicationType type, V1_0::CdmaSubscriptionSource cdmaSource) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::cdmaPrlChanged(V1_0::RadioIndicationType type, int32_t version) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::exitEmergencyCallbackMode(V1_0::RadioIndicationType type) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::rilConnected(V1_0::RadioIndicationType type) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::voiceRadioTechChanged(V1_0::RadioIndicationType type,
|
||||
V1_0::RadioTechnology rat) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::cellInfoList(V1_0::RadioIndicationType type,
|
||||
const hidl_vec<V1_0::CellInfo>& records) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::imsNetworkStateChanged(V1_0::RadioIndicationType type) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::subscriptionStatusChanged(V1_0::RadioIndicationType type,
|
||||
bool activate) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::srvccStateNotify(V1_0::RadioIndicationType type,
|
||||
V1_0::SrvccState state) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::hardwareConfigChanged(V1_0::RadioIndicationType type,
|
||||
const hidl_vec<V1_0::HardwareConfig>& configs) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::radioCapabilityIndication(V1_0::RadioIndicationType type,
|
||||
const V1_0::RadioCapability& rc) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::onSupplementaryServiceIndication(V1_0::RadioIndicationType type,
|
||||
const V1_0::StkCcUnsolSsResult& ss) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::stkCallControlAlphaNotify(V1_0::RadioIndicationType type,
|
||||
const hidl_string& alpha) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::lceData(V1_0::RadioIndicationType type,
|
||||
const V1_0::LceDataInfo& lce) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::pcoData(V1_0::RadioIndicationType type,
|
||||
const V1_0::PcoDataInfo& pco) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::modemReset(V1_0::RadioIndicationType type,
|
||||
const hidl_string& reason) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::carrierInfoForImsiEncryption(V1_0::RadioIndicationType info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::networkScanResult(V1_0::RadioIndicationType type,
|
||||
const V1_1::NetworkScanResult& result) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::keepaliveStatus(V1_0::RadioIndicationType type,
|
||||
const V1_1::KeepaliveStatus& status) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::networkScanResult_1_2(V1_0::RadioIndicationType type,
|
||||
const V1_2::NetworkScanResult& result) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::cellInfoList_1_2(V1_0::RadioIndicationType type,
|
||||
const hidl_vec<V1_2::CellInfo>& records) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::currentLinkCapacityEstimate(V1_0::RadioIndicationType type,
|
||||
const V1_2::LinkCapacityEstimate& lce) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::currentPhysicalChannelConfigs(
|
||||
V1_0::RadioIndicationType type, const hidl_vec<V1_2::PhysicalChannelConfig>& configs) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::currentSignalStrength_1_2(
|
||||
V1_0::RadioIndicationType type, const V1_2::SignalStrength& signalStrength) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::currentEmergencyNumberList(
|
||||
V1_0::RadioIndicationType type, const hidl_vec<V1_4::EmergencyNumber>& emergencyNumbers) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::cellInfoList_1_4(V1_0::RadioIndicationType type,
|
||||
const hidl_vec<V1_4::CellInfo>& records) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::networkScanResult_1_4(V1_0::RadioIndicationType type,
|
||||
const V1_4::NetworkScanResult& result) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::currentPhysicalChannelConfigs_1_4(
|
||||
V1_0::RadioIndicationType type, const hidl_vec<V1_4::PhysicalChannelConfig>& configs) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::dataCallListChanged_1_4(
|
||||
V1_0::RadioIndicationType type, const hidl_vec<V1_4::SetupDataCallResult>& dcList) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::currentSignalStrength_1_4(
|
||||
V1_0::RadioIndicationType type, const V1_4::SignalStrength& signalStrength) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::uiccApplicationsEnablementChanged(V1_0::RadioIndicationType type,
|
||||
bool enabled) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::registrationFailed( //
|
||||
V1_0::RadioIndicationType type, const V1_5::CellIdentity& cellIdentity,
|
||||
const hidl_string& chosenPlmn, hidl_bitfield<V1_5::Domain> domain, int32_t causeCode,
|
||||
int32_t additionalCauseCode) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::barringInfoChanged(V1_0::RadioIndicationType type,
|
||||
const V1_5::CellIdentity& cellIdentity,
|
||||
const hidl_vec<V1_5::BarringInfo>& barringInfos) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::cellInfoList_1_5(V1_0::RadioIndicationType type,
|
||||
const hidl_vec<V1_5::CellInfo>& records) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::networkScanResult_1_5(V1_0::RadioIndicationType type,
|
||||
const V1_5::NetworkScanResult& result) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::dataCallListChanged_1_5(
|
||||
V1_0::RadioIndicationType type, const hidl_vec<V1_5::SetupDataCallResult>& dcList) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::dataCallListChanged_1_6(
|
||||
V1_0::RadioIndicationType type, const hidl_vec<V1_6::SetupDataCallResult>& dcList) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::unthrottleApn(V1_0::RadioIndicationType type,
|
||||
const hidl_string& apn) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::currentLinkCapacityEstimate_1_6(
|
||||
V1_0::RadioIndicationType type, const V1_6::LinkCapacityEstimate& lce) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::currentSignalStrength_1_6(
|
||||
V1_0::RadioIndicationType type, const V1_6::SignalStrength& signalStrength) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::cellInfoList_1_6(V1_0::RadioIndicationType type,
|
||||
const hidl_vec<V1_6::CellInfo>& records) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::networkScanResult_1_6(V1_0::RadioIndicationType type,
|
||||
const V1_6::NetworkScanResult& result) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::currentPhysicalChannelConfigs_1_6(
|
||||
V1_0::RadioIndicationType type, const hidl_vec<V1_6::PhysicalChannelConfig>& configs) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::simPhonebookChanged(V1_0::RadioIndicationType type) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::simPhonebookRecordsReceived(
|
||||
V1_0::RadioIndicationType type, V1_6::PbReceivedStatus status,
|
||||
const hidl_vec<V1_6::PhonebookRecordInfo>& records) {
|
||||
return {};
|
||||
}
|
||||
|
||||
} // namespace android::hardware::radio::compat
|
||||
866
radio/aidl/compat/libradiocompat/RadioResponse.cpp
Normal file
866
radio/aidl/compat/libradiocompat/RadioResponse.cpp
Normal file
@@ -0,0 +1,866 @@
|
||||
/*
|
||||
* Copyright (C) 2021 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 <libradiocompat/RadioResponse.h>
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
// TODO(b/203699028): remove when fully implemented
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
|
||||
#define RADIO_MODULE "Common"
|
||||
|
||||
namespace android::hardware::radio::compat {
|
||||
|
||||
Return<void> RadioResponse::acknowledgeRequest(int32_t serial) {
|
||||
LOG_CALL << serial;
|
||||
if (mMessagingCb) mMessagingCb->acknowledgeRequest(serial);
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getIccCardStatusResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::CardStatus& cardStatus) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::supplyIccPinForAppResponse(const V1_0::RadioResponseInfo& info,
|
||||
int32_t remainingRetries) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::supplyIccPukForAppResponse(const V1_0::RadioResponseInfo& info,
|
||||
int32_t remainingRetries) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::supplyIccPin2ForAppResponse(const V1_0::RadioResponseInfo& info,
|
||||
int32_t remainingRetries) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::supplyIccPuk2ForAppResponse(const V1_0::RadioResponseInfo& info,
|
||||
int32_t remainingRetries) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::changeIccPinForAppResponse(const V1_0::RadioResponseInfo& info,
|
||||
int32_t remainingRetries) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::changeIccPin2ForAppResponse(const V1_0::RadioResponseInfo& info,
|
||||
int32_t remainingRetries) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::supplyNetworkDepersonalizationResponse(
|
||||
const V1_0::RadioResponseInfo& info, int32_t remainingRetries) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getCurrentCallsResponse(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_0::Call>& calls) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::dialResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getIMSIForAppResponse(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_string& imsi) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::hangupConnectionResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::hangupWaitingOrBackgroundResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::hangupForegroundResumeBackgroundResponse(
|
||||
const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::switchWaitingOrHoldingAndActiveResponse(
|
||||
const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::conferenceResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::rejectCallResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getLastCallFailCauseResponse(
|
||||
const V1_0::RadioResponseInfo& info, const V1_0::LastCallFailCauseInfo& failCauseinfo) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getSignalStrengthResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::SignalStrength& sigStrength) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getVoiceRegistrationStateResponse(
|
||||
const V1_0::RadioResponseInfo& info, const V1_0::VoiceRegStateResult& voiceRegResponse) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getDataRegistrationStateResponse(
|
||||
const V1_0::RadioResponseInfo& info, const V1_0::DataRegStateResult& dataRegResponse) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getOperatorResponse( //
|
||||
const V1_0::RadioResponseInfo& info, const hidl_string& longName,
|
||||
const hidl_string& shortName, const hidl_string& numeric) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setRadioPowerResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::sendDtmfResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setupDataCallResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::SetupDataCallResult& dcResponse) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::iccIOForAppResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::IccIoResult& iccIo) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getClirResponse(const V1_0::RadioResponseInfo& info, int32_t n,
|
||||
int32_t m) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setClirResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getCallForwardStatusResponse(
|
||||
const V1_0::RadioResponseInfo& info, const hidl_vec<V1_0::CallForwardInfo>& callFwdInfos) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setCallForwardResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getCallWaitingResponse(const V1_0::RadioResponseInfo& info, bool enable,
|
||||
int32_t serviceClass) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setCallWaitingResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::acceptCallResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::deactivateDataCallResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getFacilityLockForAppResponse(const V1_0::RadioResponseInfo& info,
|
||||
int32_t response) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setFacilityLockForAppResponse(const V1_0::RadioResponseInfo& info,
|
||||
int32_t retry) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setBarringPasswordResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getNetworkSelectionModeResponse(const V1_0::RadioResponseInfo& info,
|
||||
bool manual) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setNetworkSelectionModeAutomaticResponse(
|
||||
const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setNetworkSelectionModeManualResponse(
|
||||
const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getAvailableNetworksResponse(
|
||||
const V1_0::RadioResponseInfo& info, const hidl_vec<V1_0::OperatorInfo>& networkInfos) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::startDtmfResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::stopDtmfResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getBasebandVersionResponse(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_string& version) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::separateConnectionResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setMuteResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getMuteResponse(const V1_0::RadioResponseInfo& info, bool enable) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getClipResponse(const V1_0::RadioResponseInfo& info,
|
||||
V1_0::ClipStatus status) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getDataCallListResponse(
|
||||
const V1_0::RadioResponseInfo& info, const hidl_vec<V1_0::SetupDataCallResult>& dcResp) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setSuppServiceNotificationsResponse(
|
||||
const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setBandModeResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getAvailableBandModesResponse(
|
||||
const V1_0::RadioResponseInfo& info, const hidl_vec<V1_0::RadioBandMode>& bandModes) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::sendEnvelopeResponse(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_string& commandResponse) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::sendTerminalResponseToSimResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::handleStkCallSetupRequestFromSimResponse(
|
||||
const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::explicitCallTransferResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setPreferredNetworkTypeResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getPreferredNetworkTypeResponse(const V1_0::RadioResponseInfo& info,
|
||||
V1_0::PreferredNetworkType nwType) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getNeighboringCidsResponse(
|
||||
const V1_0::RadioResponseInfo& info, const hidl_vec<V1_0::NeighboringCell>& cells) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setLocationUpdatesResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setCdmaSubscriptionSourceResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setCdmaRoamingPreferenceResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getCdmaRoamingPreferenceResponse(const V1_0::RadioResponseInfo& info,
|
||||
V1_0::CdmaRoamingType type) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setTTYModeResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getTTYModeResponse(const V1_0::RadioResponseInfo& info,
|
||||
V1_0::TtyMode mode) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setPreferredVoicePrivacyResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getPreferredVoicePrivacyResponse(const V1_0::RadioResponseInfo& info,
|
||||
bool enable) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::sendCDMAFeatureCodeResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::sendBurstDtmfResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getCDMASubscriptionResponse(
|
||||
const V1_0::RadioResponseInfo& info, const hidl_string& mdn, const hidl_string& hSid,
|
||||
const hidl_string& hNid, const hidl_string& min, const hidl_string& prl) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getDeviceIdentityResponse( //
|
||||
const V1_0::RadioResponseInfo& info, const hidl_string& imei, const hidl_string& imeisv,
|
||||
const hidl_string& esn, const hidl_string& meid) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::exitEmergencyCallbackModeResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::reportStkServiceIsRunningResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getCdmaSubscriptionSourceResponse(const V1_0::RadioResponseInfo& info,
|
||||
V1_0::CdmaSubscriptionSource source) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::requestIsimAuthenticationResponse(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_string& response) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::sendEnvelopeWithStatusResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::IccIoResult& iccIo) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getVoiceRadioTechnologyResponse(const V1_0::RadioResponseInfo& info,
|
||||
V1_0::RadioTechnology rat) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getCellInfoListResponse(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_0::CellInfo>& cellInfo) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setCellInfoListRateResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setInitialAttachApnResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getImsRegistrationStateResponse( //
|
||||
const V1_0::RadioResponseInfo& info, bool isRegd, V1_0::RadioTechnologyFamily ratFamily) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::iccTransmitApduBasicChannelResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::IccIoResult& result) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::iccOpenLogicalChannelResponse( //
|
||||
const V1_0::RadioResponseInfo& info, int32_t chanId, const hidl_vec<int8_t>& selectResp) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::iccCloseLogicalChannelResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::iccTransmitApduLogicalChannelResponse(
|
||||
const V1_0::RadioResponseInfo& info, const V1_0::IccIoResult& result) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::nvReadItemResponse(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_string& result) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::nvWriteItemResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::nvWriteCdmaPrlResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::nvResetConfigResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setUiccSubscriptionResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setDataAllowedResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getHardwareConfigResponse(
|
||||
const V1_0::RadioResponseInfo& info, const hidl_vec<V1_0::HardwareConfig>& config) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::requestIccSimAuthenticationResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::IccIoResult& result) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setDataProfileResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::requestShutdownResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getRadioCapabilityResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::RadioCapability& rc) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setRadioCapabilityResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::RadioCapability& rc) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::startLceServiceResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::LceStatusInfo& statusInfo) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::stopLceServiceResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::LceStatusInfo& statusInfo) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::pullLceDataResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::LceDataInfo& lceInfo) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getModemActivityInfoResponse(
|
||||
const V1_0::RadioResponseInfo& info, const V1_0::ActivityStatsInfo& activityInfo) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setAllowedCarriersResponse(const V1_0::RadioResponseInfo& info,
|
||||
int32_t numAllowed) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getAllowedCarriersResponse( //
|
||||
const V1_0::RadioResponseInfo& info, bool allAllowed, const V1_0::CarrierRestrictions& cr) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::sendDeviceStateResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setIndicationFilterResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setSimCardPowerResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setCarrierInfoForImsiEncryptionResponse(
|
||||
const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setSimCardPowerResponse_1_1(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::startNetworkScanResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::stopNetworkScanResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::startKeepaliveResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_1::KeepaliveStatus& status) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::stopKeepaliveResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getCellInfoListResponse_1_2(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_2::CellInfo>& cellInfo) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getIccCardStatusResponse_1_2(const V1_0::RadioResponseInfo& info,
|
||||
const V1_2::CardStatus& cardStatus) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setSignalStrengthReportingCriteriaResponse(
|
||||
const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setLinkCapacityReportingCriteriaResponse(
|
||||
const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getCurrentCallsResponse_1_2(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_2::Call>& calls) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getSignalStrengthResponse_1_2(
|
||||
const V1_0::RadioResponseInfo& info, const V1_2::SignalStrength& signalStrength) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getVoiceRegistrationStateResponse_1_2(
|
||||
const V1_0::RadioResponseInfo& info, const V1_2::VoiceRegStateResult& voiceRegResponse) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getDataRegistrationStateResponse_1_2(
|
||||
const V1_0::RadioResponseInfo& info, const V1_2::DataRegStateResult& dataRegResponse) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setSystemSelectionChannelsResponse(
|
||||
const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::enableModemResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getModemStackStatusResponse(const V1_0::RadioResponseInfo& info,
|
||||
bool isEnabled) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::emergencyDialResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::startNetworkScanResponse_1_4(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getCellInfoListResponse_1_4(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_4::CellInfo>& cellInfo) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getDataRegistrationStateResponse_1_4(
|
||||
const V1_0::RadioResponseInfo& info, const V1_4::DataRegStateResult& dataRegResponse) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getIccCardStatusResponse_1_4(const V1_0::RadioResponseInfo& info,
|
||||
const V1_4::CardStatus& cardStatus) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getPreferredNetworkTypeBitmapResponse(
|
||||
const V1_0::RadioResponseInfo& info,
|
||||
hidl_bitfield<V1_4::RadioAccessFamily> networkTypeBitmap) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setPreferredNetworkTypeBitmapResponse(
|
||||
const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getDataCallListResponse_1_4(
|
||||
const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_4::SetupDataCallResult>& dcResponse) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setupDataCallResponse_1_4(const V1_0::RadioResponseInfo& info,
|
||||
const V1_4::SetupDataCallResult& dcResponse) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setAllowedCarriersResponse_1_4(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getAllowedCarriersResponse_1_4(
|
||||
const V1_0::RadioResponseInfo& info, const V1_4::CarrierRestrictionsWithPriority& carriers,
|
||||
V1_4::SimLockMultiSimPolicy multiSimPolicy) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getSignalStrengthResponse_1_4(
|
||||
const V1_0::RadioResponseInfo& info, const V1_4::SignalStrength& signalStrength) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setSignalStrengthReportingCriteriaResponse_1_5(
|
||||
const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setLinkCapacityReportingCriteriaResponse_1_5(
|
||||
const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::enableUiccApplicationsResponse(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::areUiccApplicationsEnabledResponse(const V1_0::RadioResponseInfo& info,
|
||||
bool enabled) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setSystemSelectionChannelsResponse_1_5(
|
||||
const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::startNetworkScanResponse_1_5(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setupDataCallResponse_1_5(const V1_0::RadioResponseInfo& info,
|
||||
const V1_5::SetupDataCallResult& dcResponse) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getDataCallListResponse_1_5(
|
||||
const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_5::SetupDataCallResult>& dcResponse) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setInitialAttachApnResponse_1_5(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setDataProfileResponse_1_5(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setRadioPowerResponse_1_5(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setIndicationFilterResponse_1_5(const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getBarringInfoResponse(
|
||||
const V1_0::RadioResponseInfo& info, const V1_5::CellIdentity& cellIdentity,
|
||||
const hidl_vec<V1_5::BarringInfo>& barringInfos) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getVoiceRegistrationStateResponse_1_5(
|
||||
const V1_0::RadioResponseInfo& info, const V1_5::RegStateResult& voiceRegResponse) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getDataRegistrationStateResponse_1_5(
|
||||
const V1_0::RadioResponseInfo& info, const V1_5::RegStateResult& dataRegResponse) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getCellInfoListResponse_1_5(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_5::CellInfo>& cellInfo) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setNetworkSelectionModeManualResponse_1_5(
|
||||
const V1_0::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::supplySimDepersonalizationResponse(const V1_0::RadioResponseInfo& info,
|
||||
V1_5::PersoSubstate persoType,
|
||||
int32_t remainingRetries) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getIccCardStatusResponse_1_5(const V1_0::RadioResponseInfo& info,
|
||||
const V1_5::CardStatus& cardStatus) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setRadioPowerResponse_1_6(const V1_6::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setupDataCallResponse_1_6(const V1_6::RadioResponseInfo& info,
|
||||
const V1_6::SetupDataCallResult& dcResponse) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getDataCallListResponse_1_6(
|
||||
const V1_6::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_6::SetupDataCallResult>& dcResponse) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setSimCardPowerResponse_1_6(const V1_6::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setNrDualConnectivityStateResponse(
|
||||
const V1_6::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::isNrDualConnectivityEnabledResponse(const V1_6::RadioResponseInfo& info,
|
||||
bool isEnabled) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::allocatePduSessionIdResponse(const V1_6::RadioResponseInfo& info,
|
||||
int32_t id) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::releasePduSessionIdResponse(const V1_6::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::startHandoverResponse(const V1_6::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::cancelHandoverResponse(const V1_6::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setAllowedNetworkTypesBitmapResponse(
|
||||
const V1_6::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getAllowedNetworkTypesBitmapResponse(
|
||||
const V1_6::RadioResponseInfo& info,
|
||||
hidl_bitfield<V1_4::RadioAccessFamily> networkTypeBitmap) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setDataThrottlingResponse(const V1_6::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getSystemSelectionChannelsResponse(
|
||||
const V1_6::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_5::RadioAccessSpecifier>& specifiers) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getCellInfoListResponse_1_6(const V1_6::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_6::CellInfo>& cellInfo) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getSignalStrengthResponse_1_6(
|
||||
const V1_6::RadioResponseInfo& info, const V1_6::SignalStrength& signalStrength) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getVoiceRegistrationStateResponse_1_6(
|
||||
const V1_6::RadioResponseInfo& info, const V1_6::RegStateResult& voiceRegResponse) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getDataRegistrationStateResponse_1_6(
|
||||
const V1_6::RadioResponseInfo& info, const V1_6::RegStateResult& dataRegResponse) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getCurrentCallsResponse_1_6(const V1_6::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_6::Call>& calls) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getSlicingConfigResponse(const V1_6::RadioResponseInfo& info,
|
||||
const V1_6::SlicingConfig& slicingConfig) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getSimPhonebookRecordsResponse(const V1_6::RadioResponseInfo& info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getSimPhonebookCapacityResponse(
|
||||
const V1_6::RadioResponseInfo& info, const V1_6::PhonebookCapacity& capacity) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::updateSimPhonebookRecordsResponse(const V1_6::RadioResponseInfo& info,
|
||||
int32_t updatedRecordIndex) {
|
||||
return {};
|
||||
}
|
||||
|
||||
} // namespace android::hardware::radio::compat
|
||||
@@ -26,6 +26,12 @@ static constexpr bool kSuperVerbose = true;
|
||||
#define LOG_CALL \
|
||||
if constexpr (debug::kSuperVerbose) LOG(VERBOSE) << (RADIO_MODULE ".") << __func__ << ' '
|
||||
|
||||
#define CHECK_CB(field) \
|
||||
if (!field) { \
|
||||
LOG(WARNING) << "Callback not set"; \
|
||||
return {}; \
|
||||
}
|
||||
|
||||
} // namespace debug
|
||||
|
||||
inline std::ostream& operator<<(std::ostream& os, const V1_0::RadioIndicationType& type) {
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (C) 2021 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.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "RadioIndication.h"
|
||||
#include "RadioResponse.h"
|
||||
|
||||
#include <android/hardware/radio/1.6/IRadio.h>
|
||||
|
||||
namespace android::hardware::radio::compat {
|
||||
|
||||
class RadioCompatBase {
|
||||
protected:
|
||||
sp<V1_5::IRadio> mHal1_5;
|
||||
sp<V1_6::IRadio> mHal1_6;
|
||||
|
||||
sp<RadioResponse> mRadioResponse;
|
||||
sp<RadioIndication> mRadioIndication;
|
||||
|
||||
V1_6::IRadioResponse& respond();
|
||||
|
||||
public:
|
||||
RadioCompatBase(sp<V1_5::IRadio> hidlHal, sp<RadioResponse> radioResponse,
|
||||
sp<RadioIndication> radioIndication);
|
||||
};
|
||||
|
||||
} // namespace android::hardware::radio::compat
|
||||
@@ -0,0 +1,179 @@
|
||||
/*
|
||||
* Copyright (C) 2021 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.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <aidl/android/hardware/radio/messaging/IRadioMessagingIndication.h>
|
||||
#include <android/hardware/radio/1.6/IRadioIndication.h>
|
||||
|
||||
namespace android::hardware::radio::compat {
|
||||
|
||||
class RadioIndication : public V1_6::IRadioIndication {
|
||||
std::shared_ptr<::aidl::android::hardware::radio::messaging::IRadioMessagingIndication>
|
||||
mMessagingCb;
|
||||
|
||||
// IRadioIndication @ 1.0
|
||||
Return<void> radioStateChanged(V1_0::RadioIndicationType type,
|
||||
V1_0::RadioState radioState) override;
|
||||
Return<void> callStateChanged(V1_0::RadioIndicationType type) override;
|
||||
Return<void> networkStateChanged(V1_0::RadioIndicationType type) override;
|
||||
Return<void> newSms(V1_0::RadioIndicationType type, const hidl_vec<uint8_t>& pdu) override;
|
||||
Return<void> newSmsStatusReport(V1_0::RadioIndicationType type,
|
||||
const hidl_vec<uint8_t>& pdu) override;
|
||||
Return<void> newSmsOnSim(V1_0::RadioIndicationType type, int32_t recordNumber) override;
|
||||
Return<void> onUssd(V1_0::RadioIndicationType type, V1_0::UssdModeType modeType,
|
||||
const hidl_string& msg) override;
|
||||
Return<void> nitzTimeReceived(V1_0::RadioIndicationType type, const hidl_string& nitzTime,
|
||||
uint64_t receivedTime) override;
|
||||
Return<void> currentSignalStrength(V1_0::RadioIndicationType type,
|
||||
const V1_0::SignalStrength& signalStrength) override;
|
||||
Return<void> dataCallListChanged(V1_0::RadioIndicationType type,
|
||||
const hidl_vec<V1_0::SetupDataCallResult>& dcList) override;
|
||||
Return<void> suppSvcNotify(V1_0::RadioIndicationType type,
|
||||
const V1_0::SuppSvcNotification& suppSvc) override;
|
||||
Return<void> stkSessionEnd(V1_0::RadioIndicationType type) override;
|
||||
Return<void> stkProactiveCommand(V1_0::RadioIndicationType type,
|
||||
const hidl_string& cmd) override;
|
||||
Return<void> stkEventNotify(V1_0::RadioIndicationType type, const hidl_string& cmd) override;
|
||||
Return<void> stkCallSetup(V1_0::RadioIndicationType type, int64_t timeout) override;
|
||||
Return<void> simSmsStorageFull(V1_0::RadioIndicationType type) override;
|
||||
Return<void> simRefresh(V1_0::RadioIndicationType type,
|
||||
const V1_0::SimRefreshResult& refreshResult) override;
|
||||
Return<void> callRing(V1_0::RadioIndicationType type, bool isGsm,
|
||||
const V1_0::CdmaSignalInfoRecord& record) override;
|
||||
Return<void> simStatusChanged(V1_0::RadioIndicationType type) override;
|
||||
Return<void> cdmaNewSms(V1_0::RadioIndicationType type,
|
||||
const V1_0::CdmaSmsMessage& msg) override;
|
||||
Return<void> newBroadcastSms(V1_0::RadioIndicationType type,
|
||||
const hidl_vec<uint8_t>& data) override;
|
||||
Return<void> cdmaRuimSmsStorageFull(V1_0::RadioIndicationType type) override;
|
||||
Return<void> restrictedStateChanged(V1_0::RadioIndicationType type,
|
||||
V1_0::PhoneRestrictedState state) override;
|
||||
Return<void> enterEmergencyCallbackMode(V1_0::RadioIndicationType type) override;
|
||||
Return<void> cdmaCallWaiting(V1_0::RadioIndicationType type,
|
||||
const V1_0::CdmaCallWaiting& callWaitingRecord) override;
|
||||
Return<void> cdmaOtaProvisionStatus(V1_0::RadioIndicationType type,
|
||||
V1_0::CdmaOtaProvisionStatus status) override;
|
||||
Return<void> cdmaInfoRec(V1_0::RadioIndicationType type,
|
||||
const V1_0::CdmaInformationRecords& records) override;
|
||||
Return<void> indicateRingbackTone(V1_0::RadioIndicationType type, bool start) override;
|
||||
Return<void> resendIncallMute(V1_0::RadioIndicationType type) override;
|
||||
Return<void> cdmaSubscriptionSourceChanged(V1_0::RadioIndicationType type,
|
||||
V1_0::CdmaSubscriptionSource cdmaSource) override;
|
||||
Return<void> cdmaPrlChanged(V1_0::RadioIndicationType type, int32_t version) override;
|
||||
Return<void> exitEmergencyCallbackMode(V1_0::RadioIndicationType type) override;
|
||||
Return<void> rilConnected(V1_0::RadioIndicationType type) override;
|
||||
Return<void> voiceRadioTechChanged(V1_0::RadioIndicationType type,
|
||||
V1_0::RadioTechnology rat) override;
|
||||
Return<void> cellInfoList(V1_0::RadioIndicationType type,
|
||||
const hidl_vec<V1_0::CellInfo>& records) override;
|
||||
Return<void> imsNetworkStateChanged(V1_0::RadioIndicationType type) override;
|
||||
Return<void> subscriptionStatusChanged(V1_0::RadioIndicationType type, bool activate) override;
|
||||
Return<void> srvccStateNotify(V1_0::RadioIndicationType type, V1_0::SrvccState state) override;
|
||||
Return<void> hardwareConfigChanged(V1_0::RadioIndicationType type,
|
||||
const hidl_vec<V1_0::HardwareConfig>& configs) override;
|
||||
Return<void> radioCapabilityIndication(V1_0::RadioIndicationType type,
|
||||
const V1_0::RadioCapability& rc) override;
|
||||
Return<void> onSupplementaryServiceIndication(V1_0::RadioIndicationType type,
|
||||
const V1_0::StkCcUnsolSsResult& ss) override;
|
||||
Return<void> stkCallControlAlphaNotify(V1_0::RadioIndicationType type,
|
||||
const hidl_string& alpha) override;
|
||||
Return<void> lceData(V1_0::RadioIndicationType type, const V1_0::LceDataInfo& lce) override;
|
||||
Return<void> pcoData(V1_0::RadioIndicationType type, const V1_0::PcoDataInfo& pco) override;
|
||||
Return<void> modemReset(V1_0::RadioIndicationType type, const hidl_string& reason) override;
|
||||
|
||||
// IRadioIndication @ 1.1
|
||||
Return<void> carrierInfoForImsiEncryption(V1_0::RadioIndicationType info) override;
|
||||
Return<void> networkScanResult(V1_0::RadioIndicationType type,
|
||||
const V1_1::NetworkScanResult& result) override;
|
||||
Return<void> keepaliveStatus(V1_0::RadioIndicationType type,
|
||||
const V1_1::KeepaliveStatus& status) override;
|
||||
|
||||
// IRadioIndication @ 1.2
|
||||
Return<void> networkScanResult_1_2(V1_0::RadioIndicationType type,
|
||||
const V1_2::NetworkScanResult& result) override;
|
||||
Return<void> cellInfoList_1_2(V1_0::RadioIndicationType type,
|
||||
const hidl_vec<V1_2::CellInfo>& records) override;
|
||||
Return<void> currentLinkCapacityEstimate(V1_0::RadioIndicationType type,
|
||||
const V1_2::LinkCapacityEstimate& lce) override;
|
||||
Return<void> currentPhysicalChannelConfigs(
|
||||
V1_0::RadioIndicationType type,
|
||||
const hidl_vec<V1_2::PhysicalChannelConfig>& configs) override;
|
||||
Return<void> currentSignalStrength_1_2(V1_0::RadioIndicationType type,
|
||||
const V1_2::SignalStrength& signalStrength) override;
|
||||
|
||||
// IRadioIndication @ 1.4
|
||||
Return<void> currentEmergencyNumberList(
|
||||
V1_0::RadioIndicationType type,
|
||||
const hidl_vec<V1_4::EmergencyNumber>& emergencyNumberList) override;
|
||||
Return<void> cellInfoList_1_4(V1_0::RadioIndicationType type,
|
||||
const hidl_vec<V1_4::CellInfo>& records) override;
|
||||
Return<void> networkScanResult_1_4(V1_0::RadioIndicationType type,
|
||||
const V1_4::NetworkScanResult& result) override;
|
||||
Return<void> currentPhysicalChannelConfigs_1_4(
|
||||
V1_0::RadioIndicationType type,
|
||||
const hidl_vec<V1_4::PhysicalChannelConfig>& configs) override;
|
||||
Return<void> dataCallListChanged_1_4(
|
||||
V1_0::RadioIndicationType type,
|
||||
const hidl_vec<V1_4::SetupDataCallResult>& dcList) override;
|
||||
Return<void> currentSignalStrength_1_4(V1_0::RadioIndicationType type,
|
||||
const V1_4::SignalStrength& signalStrength) override;
|
||||
|
||||
// IRadioIndication @ 1.5
|
||||
Return<void> uiccApplicationsEnablementChanged(V1_0::RadioIndicationType type,
|
||||
bool enabled) override;
|
||||
Return<void> registrationFailed( //
|
||||
V1_0::RadioIndicationType type, const V1_5::CellIdentity& cellIdentity,
|
||||
const hidl_string& chosenPlmn, hidl_bitfield<V1_5::Domain> domain, int32_t causeCode,
|
||||
int32_t additionalCauseCode) override;
|
||||
Return<void> barringInfoChanged( //
|
||||
V1_0::RadioIndicationType type, const V1_5::CellIdentity& cellIdentity,
|
||||
const hidl_vec<V1_5::BarringInfo>& barringInfos) override;
|
||||
Return<void> cellInfoList_1_5(V1_0::RadioIndicationType type,
|
||||
const hidl_vec<V1_5::CellInfo>& records) override;
|
||||
Return<void> networkScanResult_1_5(V1_0::RadioIndicationType type,
|
||||
const V1_5::NetworkScanResult& result) override;
|
||||
Return<void> dataCallListChanged_1_5(
|
||||
V1_0::RadioIndicationType type,
|
||||
const hidl_vec<V1_5::SetupDataCallResult>& dcList) override;
|
||||
|
||||
// IRadioIndication @ 1.6
|
||||
Return<void> dataCallListChanged_1_6(
|
||||
V1_0::RadioIndicationType type,
|
||||
const hidl_vec<V1_6::SetupDataCallResult>& dcList) override;
|
||||
Return<void> unthrottleApn(V1_0::RadioIndicationType type, const hidl_string& apn) override;
|
||||
Return<void> currentLinkCapacityEstimate_1_6(V1_0::RadioIndicationType type,
|
||||
const V1_6::LinkCapacityEstimate& lce) override;
|
||||
Return<void> currentSignalStrength_1_6(V1_0::RadioIndicationType type,
|
||||
const V1_6::SignalStrength& signalStrength) override;
|
||||
Return<void> cellInfoList_1_6(V1_0::RadioIndicationType type,
|
||||
const hidl_vec<V1_6::CellInfo>& records) override;
|
||||
Return<void> networkScanResult_1_6(V1_0::RadioIndicationType type,
|
||||
const V1_6::NetworkScanResult& result) override;
|
||||
Return<void> currentPhysicalChannelConfigs_1_6(
|
||||
V1_0::RadioIndicationType type,
|
||||
const hidl_vec<V1_6::PhysicalChannelConfig>& configs) override;
|
||||
Return<void> simPhonebookChanged(V1_0::RadioIndicationType type) override;
|
||||
Return<void> simPhonebookRecordsReceived(
|
||||
V1_0::RadioIndicationType type, V1_6::PbReceivedStatus status,
|
||||
const hidl_vec<V1_6::PhonebookRecordInfo>& records) override;
|
||||
|
||||
public:
|
||||
void setResponseFunction(
|
||||
std::shared_ptr<::aidl::android::hardware::radio::messaging::IRadioMessagingIndication>
|
||||
radioMessagingIndication);
|
||||
};
|
||||
|
||||
} // namespace android::hardware::radio::compat
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* Copyright (C) 2021 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.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "RadioCompatBase.h"
|
||||
|
||||
#include <aidl/android/hardware/radio/messaging/BnRadioMessaging.h>
|
||||
|
||||
namespace android::hardware::radio::compat {
|
||||
|
||||
class RadioMessaging : public RadioCompatBase,
|
||||
public aidl::android::hardware::radio::messaging::BnRadioMessaging {
|
||||
::ndk::ScopedAStatus acknowledgeIncomingGsmSmsWithPdu(int32_t serial, bool success,
|
||||
const std::string& ackPdu) override;
|
||||
::ndk::ScopedAStatus acknowledgeLastIncomingCdmaSms(
|
||||
int32_t serial,
|
||||
const ::aidl::android::hardware::radio::messaging::CdmaSmsAck& smsAck) override;
|
||||
::ndk::ScopedAStatus acknowledgeLastIncomingGsmSms(
|
||||
int32_t serial, bool success,
|
||||
::aidl::android::hardware::radio::messaging::SmsAcknowledgeFailCause cause) override;
|
||||
::ndk::ScopedAStatus cancelPendingUssd(int32_t serial) override;
|
||||
::ndk::ScopedAStatus deleteSmsOnRuim(int32_t serial, int32_t index) override;
|
||||
::ndk::ScopedAStatus deleteSmsOnSim(int32_t serial, int32_t index) override;
|
||||
::ndk::ScopedAStatus getCdmaBroadcastConfig(int32_t serial) override;
|
||||
::ndk::ScopedAStatus getGsmBroadcastConfig(int32_t serial) override;
|
||||
::ndk::ScopedAStatus getSmscAddress(int32_t serial) override;
|
||||
::ndk::ScopedAStatus reportSmsMemoryStatus(int32_t serial, bool available) override;
|
||||
::ndk::ScopedAStatus responseAcknowledgement() override;
|
||||
::ndk::ScopedAStatus sendCdmaSms(
|
||||
int32_t serial,
|
||||
const ::aidl::android::hardware::radio::messaging::CdmaSmsMessage& sms) override;
|
||||
::ndk::ScopedAStatus sendCdmaSmsExpectMore(
|
||||
int32_t serial,
|
||||
const ::aidl::android::hardware::radio::messaging::CdmaSmsMessage& sms) override;
|
||||
::ndk::ScopedAStatus sendImsSms(
|
||||
int32_t serial,
|
||||
const ::aidl::android::hardware::radio::messaging::ImsSmsMessage& message) override;
|
||||
::ndk::ScopedAStatus sendSms(
|
||||
int32_t serial,
|
||||
const ::aidl::android::hardware::radio::messaging::GsmSmsMessage& message) override;
|
||||
::ndk::ScopedAStatus sendSmsExpectMore(
|
||||
int32_t serial,
|
||||
const ::aidl::android::hardware::radio::messaging::GsmSmsMessage& message) override;
|
||||
::ndk::ScopedAStatus sendUssd(int32_t serial, const std::string& ussd) override;
|
||||
::ndk::ScopedAStatus setCdmaBroadcastActivation(int32_t serial, bool activate) override;
|
||||
::ndk::ScopedAStatus setCdmaBroadcastConfig(
|
||||
int32_t serial,
|
||||
const std::vector<
|
||||
::aidl::android::hardware::radio::messaging::CdmaBroadcastSmsConfigInfo>&
|
||||
configInfo) override;
|
||||
::ndk::ScopedAStatus setGsmBroadcastActivation(int32_t serial, bool activate) override;
|
||||
::ndk::ScopedAStatus setGsmBroadcastConfig(
|
||||
int32_t serial,
|
||||
const std::vector<
|
||||
::aidl::android::hardware::radio::messaging::GsmBroadcastSmsConfigInfo>&
|
||||
configInfo) override;
|
||||
::ndk::ScopedAStatus setResponseFunctions(
|
||||
const std::shared_ptr<
|
||||
::aidl::android::hardware::radio::messaging::IRadioMessagingResponse>&
|
||||
radioMessagingResponse,
|
||||
const std::shared_ptr<
|
||||
::aidl::android::hardware::radio::messaging::IRadioMessagingIndication>&
|
||||
radioMessagingIndication) override;
|
||||
::ndk::ScopedAStatus setSmscAddress(int32_t serial, const std::string& smsc) override;
|
||||
::ndk::ScopedAStatus writeSmsToRuim(
|
||||
int32_t serial,
|
||||
const ::aidl::android::hardware::radio::messaging::CdmaSmsWriteArgs& cdmaSms) override;
|
||||
::ndk::ScopedAStatus writeSmsToSim(
|
||||
int32_t serial,
|
||||
const ::aidl::android::hardware::radio::messaging::SmsWriteArgs& smsWriteArgs) override;
|
||||
|
||||
public:
|
||||
using RadioCompatBase::RadioCompatBase;
|
||||
};
|
||||
|
||||
} // namespace android::hardware::radio::compat
|
||||
@@ -0,0 +1,407 @@
|
||||
/*
|
||||
* Copyright (C) 2021 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.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <aidl/android/hardware/radio/messaging/IRadioMessagingResponse.h>
|
||||
#include <android/hardware/radio/1.6/IRadioResponse.h>
|
||||
|
||||
namespace android::hardware::radio::compat {
|
||||
|
||||
class RadioResponse : public V1_6::IRadioResponse {
|
||||
std::shared_ptr<::aidl::android::hardware::radio::messaging::IRadioMessagingResponse>
|
||||
mMessagingCb;
|
||||
|
||||
// IRadioResponse @ 1.0
|
||||
Return<void> getIccCardStatusResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::CardStatus& cardStatus) override;
|
||||
Return<void> supplyIccPinForAppResponse(const V1_0::RadioResponseInfo& info,
|
||||
int32_t remainingRetries) override;
|
||||
Return<void> supplyIccPukForAppResponse(const V1_0::RadioResponseInfo& info,
|
||||
int32_t remainingRetries) override;
|
||||
Return<void> supplyIccPin2ForAppResponse(const V1_0::RadioResponseInfo& info,
|
||||
int32_t remainingRetries) override;
|
||||
Return<void> supplyIccPuk2ForAppResponse(const V1_0::RadioResponseInfo& info,
|
||||
int32_t remainingRetries) override;
|
||||
Return<void> changeIccPinForAppResponse(const V1_0::RadioResponseInfo& info,
|
||||
int32_t remainingRetries) override;
|
||||
Return<void> changeIccPin2ForAppResponse(const V1_0::RadioResponseInfo& info,
|
||||
int32_t remainingRetries) override;
|
||||
Return<void> supplyNetworkDepersonalizationResponse(const V1_0::RadioResponseInfo& info,
|
||||
int32_t remainingRetries) override;
|
||||
Return<void> getCurrentCallsResponse(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_0::Call>& calls) override;
|
||||
Return<void> dialResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getIMSIForAppResponse(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_string& imsi) override;
|
||||
Return<void> hangupConnectionResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> hangupWaitingOrBackgroundResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> hangupForegroundResumeBackgroundResponse(
|
||||
const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> switchWaitingOrHoldingAndActiveResponse(
|
||||
const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> conferenceResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> rejectCallResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getLastCallFailCauseResponse(
|
||||
const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::LastCallFailCauseInfo& failCauseinfo) override;
|
||||
Return<void> getSignalStrengthResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::SignalStrength& sigStrength) override;
|
||||
Return<void> getVoiceRegistrationStateResponse(
|
||||
const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::VoiceRegStateResult& voiceRegResponse) override;
|
||||
Return<void> getDataRegistrationStateResponse(
|
||||
const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::DataRegStateResult& dataRegResponse) override;
|
||||
Return<void> getOperatorResponse(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_string& longName, const hidl_string& shortName,
|
||||
const hidl_string& numeric) override;
|
||||
Return<void> setRadioPowerResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> sendDtmfResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> sendSmsResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::SendSmsResult& sms) override;
|
||||
Return<void> sendSMSExpectMoreResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::SendSmsResult& sms) override;
|
||||
Return<void> setupDataCallResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::SetupDataCallResult& dcResponse) override;
|
||||
Return<void> iccIOForAppResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::IccIoResult& iccIo) override;
|
||||
Return<void> sendUssdResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> cancelPendingUssdResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getClirResponse(const V1_0::RadioResponseInfo& info, int32_t n,
|
||||
int32_t m) override;
|
||||
Return<void> setClirResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getCallForwardStatusResponse(
|
||||
const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_0::CallForwardInfo>& callForwardInfos) override;
|
||||
Return<void> setCallForwardResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getCallWaitingResponse(const V1_0::RadioResponseInfo& info, bool enable,
|
||||
int32_t serviceClass) override;
|
||||
Return<void> setCallWaitingResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> acknowledgeLastIncomingGsmSmsResponse(
|
||||
const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> acceptCallResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> deactivateDataCallResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getFacilityLockForAppResponse(const V1_0::RadioResponseInfo& info,
|
||||
int32_t response) override;
|
||||
Return<void> setFacilityLockForAppResponse(const V1_0::RadioResponseInfo& info,
|
||||
int32_t retry) override;
|
||||
Return<void> setBarringPasswordResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getNetworkSelectionModeResponse(const V1_0::RadioResponseInfo& info,
|
||||
bool manual) override;
|
||||
Return<void> setNetworkSelectionModeAutomaticResponse(
|
||||
const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> setNetworkSelectionModeManualResponse(
|
||||
const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getAvailableNetworksResponse(
|
||||
const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_0::OperatorInfo>& networkInfos) override;
|
||||
Return<void> startDtmfResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> stopDtmfResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getBasebandVersionResponse(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_string& version) override;
|
||||
Return<void> separateConnectionResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> setMuteResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getMuteResponse(const V1_0::RadioResponseInfo& info, bool enable) override;
|
||||
Return<void> getClipResponse(const V1_0::RadioResponseInfo& info,
|
||||
V1_0::ClipStatus status) override;
|
||||
Return<void> getDataCallListResponse(
|
||||
const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_0::SetupDataCallResult>& dcResponse) override;
|
||||
Return<void> setSuppServiceNotificationsResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> writeSmsToSimResponse(const V1_0::RadioResponseInfo& info, int32_t index) override;
|
||||
Return<void> deleteSmsOnSimResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> setBandModeResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getAvailableBandModesResponse(
|
||||
const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_0::RadioBandMode>& bandModes) override;
|
||||
Return<void> sendEnvelopeResponse(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_string& commandResponse) override;
|
||||
Return<void> sendTerminalResponseToSimResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> handleStkCallSetupRequestFromSimResponse(
|
||||
const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> explicitCallTransferResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> setPreferredNetworkTypeResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getPreferredNetworkTypeResponse(const V1_0::RadioResponseInfo& info,
|
||||
V1_0::PreferredNetworkType nwType) override;
|
||||
Return<void> getNeighboringCidsResponse(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_0::NeighboringCell>& cells) override;
|
||||
Return<void> setLocationUpdatesResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> setCdmaSubscriptionSourceResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> setCdmaRoamingPreferenceResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getCdmaRoamingPreferenceResponse(const V1_0::RadioResponseInfo& info,
|
||||
V1_0::CdmaRoamingType type) override;
|
||||
Return<void> setTTYModeResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getTTYModeResponse(const V1_0::RadioResponseInfo& info,
|
||||
V1_0::TtyMode mode) override;
|
||||
Return<void> setPreferredVoicePrivacyResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getPreferredVoicePrivacyResponse(const V1_0::RadioResponseInfo& info,
|
||||
bool enable) override;
|
||||
Return<void> sendCDMAFeatureCodeResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> sendBurstDtmfResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> sendCdmaSmsResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::SendSmsResult& sms) override;
|
||||
Return<void> acknowledgeLastIncomingCdmaSmsResponse(
|
||||
const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getGsmBroadcastConfigResponse(
|
||||
const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_0::GsmBroadcastSmsConfigInfo>& configs) override;
|
||||
Return<void> setGsmBroadcastConfigResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> setGsmBroadcastActivationResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getCdmaBroadcastConfigResponse(
|
||||
const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_0::CdmaBroadcastSmsConfigInfo>& configs) override;
|
||||
Return<void> setCdmaBroadcastConfigResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> setCdmaBroadcastActivationResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getCDMASubscriptionResponse( //
|
||||
const V1_0::RadioResponseInfo& info, const hidl_string& mdn, const hidl_string& hSid,
|
||||
const hidl_string& hNid, const hidl_string& min, const hidl_string& prl) override;
|
||||
Return<void> writeSmsToRuimResponse(const V1_0::RadioResponseInfo& info,
|
||||
uint32_t index) override;
|
||||
Return<void> deleteSmsOnRuimResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getDeviceIdentityResponse( //
|
||||
const V1_0::RadioResponseInfo& info, const hidl_string& imei, const hidl_string& imeisv,
|
||||
const hidl_string& esn, const hidl_string& meid) override;
|
||||
Return<void> exitEmergencyCallbackModeResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getSmscAddressResponse(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_string& smsc) override;
|
||||
Return<void> setSmscAddressResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> reportSmsMemoryStatusResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> reportStkServiceIsRunningResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getCdmaSubscriptionSourceResponse(const V1_0::RadioResponseInfo& info,
|
||||
V1_0::CdmaSubscriptionSource source) override;
|
||||
Return<void> requestIsimAuthenticationResponse(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_string& response) override;
|
||||
Return<void> acknowledgeIncomingGsmSmsWithPduResponse(
|
||||
const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> sendEnvelopeWithStatusResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::IccIoResult& iccIo) override;
|
||||
Return<void> getVoiceRadioTechnologyResponse(const V1_0::RadioResponseInfo& info,
|
||||
V1_0::RadioTechnology rat) override;
|
||||
Return<void> getCellInfoListResponse(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_0::CellInfo>& cellInfo) override;
|
||||
Return<void> setCellInfoListRateResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> setInitialAttachApnResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getImsRegistrationStateResponse(const V1_0::RadioResponseInfo& info,
|
||||
bool isRegistered,
|
||||
V1_0::RadioTechnologyFamily ratFamily) override;
|
||||
Return<void> sendImsSmsResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::SendSmsResult& sms) override;
|
||||
Return<void> iccTransmitApduBasicChannelResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::IccIoResult& result) override;
|
||||
Return<void> iccOpenLogicalChannelResponse(const V1_0::RadioResponseInfo& info,
|
||||
int32_t channelId,
|
||||
const hidl_vec<int8_t>& selectResponse) override;
|
||||
Return<void> iccCloseLogicalChannelResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> iccTransmitApduLogicalChannelResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::IccIoResult& result) override;
|
||||
Return<void> nvReadItemResponse(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_string& result) override;
|
||||
Return<void> nvWriteItemResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> nvWriteCdmaPrlResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> nvResetConfigResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> setUiccSubscriptionResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> setDataAllowedResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getHardwareConfigResponse(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_0::HardwareConfig>& config) override;
|
||||
Return<void> requestIccSimAuthenticationResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::IccIoResult& result) override;
|
||||
Return<void> setDataProfileResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> requestShutdownResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getRadioCapabilityResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::RadioCapability& rc) override;
|
||||
Return<void> setRadioCapabilityResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::RadioCapability& rc) override;
|
||||
Return<void> startLceServiceResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::LceStatusInfo& statusInfo) override;
|
||||
Return<void> stopLceServiceResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::LceStatusInfo& statusInfo) override;
|
||||
Return<void> pullLceDataResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::LceDataInfo& lceInfo) override;
|
||||
Return<void> getModemActivityInfoResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::ActivityStatsInfo& activityInfo) override;
|
||||
Return<void> setAllowedCarriersResponse(const V1_0::RadioResponseInfo& info,
|
||||
int32_t numAllowed) override;
|
||||
Return<void> getAllowedCarriersResponse(const V1_0::RadioResponseInfo& info, bool allAllowed,
|
||||
const V1_0::CarrierRestrictions& carriers) override;
|
||||
Return<void> sendDeviceStateResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> setIndicationFilterResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> setSimCardPowerResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> acknowledgeRequest(int32_t serial) override;
|
||||
|
||||
// IRadioResponse @ 1.1
|
||||
Return<void> setCarrierInfoForImsiEncryptionResponse(
|
||||
const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> setSimCardPowerResponse_1_1(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> startNetworkScanResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> stopNetworkScanResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> startKeepaliveResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_1::KeepaliveStatus& status) override;
|
||||
Return<void> stopKeepaliveResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
|
||||
// IRadioResponse @ 1.2
|
||||
Return<void> getCellInfoListResponse_1_2(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_2::CellInfo>& cellInfo) override;
|
||||
Return<void> getIccCardStatusResponse_1_2(const V1_0::RadioResponseInfo& info,
|
||||
const V1_2::CardStatus& cardStatus) override;
|
||||
Return<void> setSignalStrengthReportingCriteriaResponse(
|
||||
const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> setLinkCapacityReportingCriteriaResponse(
|
||||
const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getCurrentCallsResponse_1_2(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_2::Call>& calls) override;
|
||||
Return<void> getSignalStrengthResponse_1_2(const V1_0::RadioResponseInfo& info,
|
||||
const V1_2::SignalStrength& signalStrength) override;
|
||||
Return<void> getVoiceRegistrationStateResponse_1_2(
|
||||
const V1_0::RadioResponseInfo& info,
|
||||
const V1_2::VoiceRegStateResult& voiceRegResponse) override;
|
||||
Return<void> getDataRegistrationStateResponse_1_2(
|
||||
const V1_0::RadioResponseInfo& info,
|
||||
const V1_2::DataRegStateResult& dataRegResponse) override;
|
||||
|
||||
// IRadioResponse @ 1.3
|
||||
Return<void> setSystemSelectionChannelsResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> enableModemResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getModemStackStatusResponse(const V1_0::RadioResponseInfo& info,
|
||||
bool isEnabled) override;
|
||||
|
||||
// IRadioResponse @ 1.4
|
||||
Return<void> emergencyDialResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> startNetworkScanResponse_1_4(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getCellInfoListResponse_1_4(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_4::CellInfo>& cellInfo) override;
|
||||
Return<void> getDataRegistrationStateResponse_1_4(
|
||||
const V1_0::RadioResponseInfo& info,
|
||||
const V1_4::DataRegStateResult& dataRegResponse) override;
|
||||
Return<void> getIccCardStatusResponse_1_4(const V1_0::RadioResponseInfo& info,
|
||||
const V1_4::CardStatus& cardStatus) override;
|
||||
Return<void> getPreferredNetworkTypeBitmapResponse(
|
||||
const V1_0::RadioResponseInfo& info,
|
||||
hidl_bitfield<V1_4::RadioAccessFamily> networkTypeBitmap) override;
|
||||
Return<void> setPreferredNetworkTypeBitmapResponse(
|
||||
const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getDataCallListResponse_1_4(
|
||||
const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_4::SetupDataCallResult>& dcResponse) override;
|
||||
Return<void> setupDataCallResponse_1_4(const V1_0::RadioResponseInfo& info,
|
||||
const V1_4::SetupDataCallResult& dcResponse) override;
|
||||
Return<void> setAllowedCarriersResponse_1_4(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getAllowedCarriersResponse_1_4(
|
||||
const V1_0::RadioResponseInfo& info,
|
||||
const V1_4::CarrierRestrictionsWithPriority& carriers,
|
||||
V1_4::SimLockMultiSimPolicy multiSimPolicy) override;
|
||||
Return<void> getSignalStrengthResponse_1_4(const V1_0::RadioResponseInfo& info,
|
||||
const V1_4::SignalStrength& signalStrength) override;
|
||||
|
||||
// IRadioResponse @ 1.5
|
||||
Return<void> setSignalStrengthReportingCriteriaResponse_1_5(
|
||||
const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> setLinkCapacityReportingCriteriaResponse_1_5(
|
||||
const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> enableUiccApplicationsResponse(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> areUiccApplicationsEnabledResponse(const V1_0::RadioResponseInfo& info,
|
||||
bool enabled) override;
|
||||
Return<void> setSystemSelectionChannelsResponse_1_5(
|
||||
const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> startNetworkScanResponse_1_5(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> setupDataCallResponse_1_5(const V1_0::RadioResponseInfo& info,
|
||||
const V1_5::SetupDataCallResult& dcResponse) override;
|
||||
Return<void> getDataCallListResponse_1_5(
|
||||
const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_5::SetupDataCallResult>& dcResponse) override;
|
||||
Return<void> setInitialAttachApnResponse_1_5(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> setDataProfileResponse_1_5(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> setRadioPowerResponse_1_5(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> setIndicationFilterResponse_1_5(const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> getBarringInfoResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_5::CellIdentity& cellIdentity,
|
||||
const hidl_vec<V1_5::BarringInfo>& barringInfos) override;
|
||||
Return<void> getVoiceRegistrationStateResponse_1_5(
|
||||
const V1_0::RadioResponseInfo& info,
|
||||
const V1_5::RegStateResult& voiceRegResponse) override;
|
||||
Return<void> getDataRegistrationStateResponse_1_5(
|
||||
const V1_0::RadioResponseInfo& info,
|
||||
const V1_5::RegStateResult& dataRegResponse) override;
|
||||
Return<void> getCellInfoListResponse_1_5(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_5::CellInfo>& cellInfo) override;
|
||||
Return<void> setNetworkSelectionModeManualResponse_1_5(
|
||||
const V1_0::RadioResponseInfo& info) override;
|
||||
Return<void> sendCdmaSmsExpectMoreResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::SendSmsResult& sms) override;
|
||||
Return<void> supplySimDepersonalizationResponse(const V1_0::RadioResponseInfo& info,
|
||||
V1_5::PersoSubstate persoType,
|
||||
int32_t remainingRetries) override;
|
||||
Return<void> getIccCardStatusResponse_1_5(const V1_0::RadioResponseInfo& info,
|
||||
const V1_5::CardStatus& cardStatus) override;
|
||||
|
||||
// IRadioResponse @ 1.6
|
||||
Return<void> setRadioPowerResponse_1_6(const V1_6::RadioResponseInfo& info) override;
|
||||
Return<void> setupDataCallResponse_1_6(const V1_6::RadioResponseInfo& info,
|
||||
const V1_6::SetupDataCallResult& dcResponse) override;
|
||||
Return<void> getDataCallListResponse_1_6(
|
||||
const V1_6::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_6::SetupDataCallResult>& dcResponse) override;
|
||||
Return<void> sendSmsResponse_1_6(const V1_6::RadioResponseInfo& info,
|
||||
const V1_0::SendSmsResult& sms) override;
|
||||
Return<void> sendSmsExpectMoreResponse_1_6(const V1_6::RadioResponseInfo& info,
|
||||
const V1_0::SendSmsResult& sms) override;
|
||||
Return<void> sendCdmaSmsResponse_1_6(const V1_6::RadioResponseInfo& info,
|
||||
const V1_0::SendSmsResult& sms) override;
|
||||
Return<void> sendCdmaSmsExpectMoreResponse_1_6(const V1_6::RadioResponseInfo& info,
|
||||
const V1_0::SendSmsResult& sms) override;
|
||||
Return<void> setSimCardPowerResponse_1_6(const V1_6::RadioResponseInfo& info) override;
|
||||
Return<void> setNrDualConnectivityStateResponse(const V1_6::RadioResponseInfo& info) override;
|
||||
Return<void> isNrDualConnectivityEnabledResponse(const V1_6::RadioResponseInfo& info,
|
||||
bool isEnabled) override;
|
||||
Return<void> allocatePduSessionIdResponse(const V1_6::RadioResponseInfo& info,
|
||||
int32_t id) override;
|
||||
Return<void> releasePduSessionIdResponse(const V1_6::RadioResponseInfo& info) override;
|
||||
Return<void> startHandoverResponse(const V1_6::RadioResponseInfo& info) override;
|
||||
Return<void> cancelHandoverResponse(const V1_6::RadioResponseInfo& info) override;
|
||||
Return<void> setAllowedNetworkTypesBitmapResponse(const V1_6::RadioResponseInfo& info) override;
|
||||
Return<void> getAllowedNetworkTypesBitmapResponse(
|
||||
const V1_6::RadioResponseInfo& info,
|
||||
hidl_bitfield<V1_4::RadioAccessFamily> networkTypeBitmap) override;
|
||||
Return<void> setDataThrottlingResponse(const V1_6::RadioResponseInfo& info) override;
|
||||
Return<void> getSystemSelectionChannelsResponse(
|
||||
const V1_6::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_5::RadioAccessSpecifier>& specifiers) override;
|
||||
Return<void> getCellInfoListResponse_1_6(const V1_6::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_6::CellInfo>& cellInfo) override;
|
||||
Return<void> getSignalStrengthResponse_1_6(const V1_6::RadioResponseInfo& info,
|
||||
const V1_6::SignalStrength& signalStrength) override;
|
||||
Return<void> getVoiceRegistrationStateResponse_1_6(
|
||||
const V1_6::RadioResponseInfo& info,
|
||||
const V1_6::RegStateResult& voiceRegResponse) override;
|
||||
Return<void> getDataRegistrationStateResponse_1_6(
|
||||
const V1_6::RadioResponseInfo& info,
|
||||
const V1_6::RegStateResult& dataRegResponse) override;
|
||||
Return<void> getCurrentCallsResponse_1_6(const V1_6::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_6::Call>& calls) override;
|
||||
Return<void> getSlicingConfigResponse(const V1_6::RadioResponseInfo& info,
|
||||
const V1_6::SlicingConfig& slicingConfig) override;
|
||||
Return<void> getSimPhonebookRecordsResponse(const V1_6::RadioResponseInfo& info) override;
|
||||
Return<void> getSimPhonebookCapacityResponse(const V1_6::RadioResponseInfo& info,
|
||||
const V1_6::PhonebookCapacity& capacity) override;
|
||||
Return<void> updateSimPhonebookRecordsResponse(const V1_6::RadioResponseInfo& info,
|
||||
int32_t updatedRecordIndex) override;
|
||||
|
||||
public:
|
||||
void setResponseFunction(
|
||||
std::shared_ptr<::aidl::android::hardware::radio::messaging::IRadioMessagingResponse>
|
||||
radioMessagingResponse);
|
||||
};
|
||||
|
||||
} // namespace android::hardware::radio::compat
|
||||
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* Copyright (C) 2021 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 <libradiocompat/RadioIndication.h>
|
||||
|
||||
#include "commonStructs.h"
|
||||
#include "debug.h"
|
||||
#include "structs.h"
|
||||
|
||||
#define RADIO_MODULE "MessagingIndication"
|
||||
|
||||
namespace android::hardware::radio::compat {
|
||||
|
||||
namespace aidl = ::aidl::android::hardware::radio::messaging;
|
||||
|
||||
void RadioIndication::setResponseFunction(std::shared_ptr<aidl::IRadioMessagingIndication> rmiCb) {
|
||||
CHECK(rmiCb);
|
||||
mMessagingCb = rmiCb;
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::cdmaNewSms(V1_0::RadioIndicationType type,
|
||||
const V1_0::CdmaSmsMessage& msg) {
|
||||
LOG_CALL << type;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->cdmaNewSms(toAidl(type), toAidl(msg));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::cdmaRuimSmsStorageFull(V1_0::RadioIndicationType type) {
|
||||
LOG_CALL << type;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->cdmaRuimSmsStorageFull(toAidl(type));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::newBroadcastSms(V1_0::RadioIndicationType type,
|
||||
const hidl_vec<uint8_t>& data) {
|
||||
LOG_CALL << type;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->newBroadcastSms(toAidl(type), data);
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::newSms(V1_0::RadioIndicationType type, const hidl_vec<uint8_t>& pdu) {
|
||||
LOG_CALL << type;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->newSms(toAidl(type), pdu);
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::newSmsOnSim(V1_0::RadioIndicationType type, int32_t recordNumber) {
|
||||
LOG_CALL << type;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->newSmsOnSim(toAidl(type), recordNumber);
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::newSmsStatusReport(V1_0::RadioIndicationType type,
|
||||
const hidl_vec<uint8_t>& pdu) {
|
||||
LOG_CALL << type;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->newSmsStatusReport(toAidl(type), pdu);
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::onUssd(V1_0::RadioIndicationType type, V1_0::UssdModeType modeType,
|
||||
const hidl_string& msg) {
|
||||
LOG_CALL << type;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->onUssd(toAidl(type), aidl::UssdModeType(modeType), msg);
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::simSmsStorageFull(V1_0::RadioIndicationType type) {
|
||||
LOG_CALL << type;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->simSmsStorageFull(toAidl(type));
|
||||
return {};
|
||||
}
|
||||
|
||||
} // namespace android::hardware::radio::compat
|
||||
195
radio/aidl/compat/libradiocompat/messaging/RadioMessaging.cpp
Normal file
195
radio/aidl/compat/libradiocompat/messaging/RadioMessaging.cpp
Normal file
@@ -0,0 +1,195 @@
|
||||
/*
|
||||
* Copyright (C) 2021 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 <libradiocompat/RadioMessaging.h>
|
||||
|
||||
#include "debug.h"
|
||||
#include "structs.h"
|
||||
|
||||
#include "collections.h"
|
||||
|
||||
#define RADIO_MODULE "Messaging"
|
||||
|
||||
namespace android::hardware::radio::compat {
|
||||
|
||||
using ::ndk::ScopedAStatus;
|
||||
namespace aidl = ::aidl::android::hardware::radio::messaging;
|
||||
constexpr auto ok = &ScopedAStatus::ok;
|
||||
|
||||
ScopedAStatus RadioMessaging::acknowledgeIncomingGsmSmsWithPdu( //
|
||||
int32_t serial, bool success, const std::string& ackPdu) {
|
||||
LOG_CALL << serial << ' ' << success << ' ' << ackPdu;
|
||||
mHal1_5->acknowledgeIncomingGsmSmsWithPdu(serial, success, ackPdu);
|
||||
return ok();
|
||||
}
|
||||
|
||||
ScopedAStatus RadioMessaging::acknowledgeLastIncomingCdmaSms( //
|
||||
int32_t serial, const aidl::CdmaSmsAck& smsAck) {
|
||||
LOG_CALL << serial;
|
||||
mHal1_5->acknowledgeLastIncomingCdmaSms(serial, toHidl(smsAck));
|
||||
return ok();
|
||||
}
|
||||
|
||||
ScopedAStatus RadioMessaging::acknowledgeLastIncomingGsmSms( //
|
||||
int32_t serial, bool success, aidl::SmsAcknowledgeFailCause cause) {
|
||||
LOG_CALL << serial << ' ' << success;
|
||||
mHal1_5->acknowledgeLastIncomingGsmSms(serial, success, V1_0::SmsAcknowledgeFailCause(cause));
|
||||
return ok();
|
||||
}
|
||||
|
||||
ScopedAStatus RadioMessaging::cancelPendingUssd(int32_t serial) {
|
||||
LOG_CALL << serial;
|
||||
mHal1_5->cancelPendingUssd(serial);
|
||||
return ok();
|
||||
}
|
||||
|
||||
ScopedAStatus RadioMessaging::deleteSmsOnRuim(int32_t serial, int32_t index) {
|
||||
LOG_CALL << serial << ' ' << index;
|
||||
mHal1_5->deleteSmsOnRuim(serial, index);
|
||||
return ok();
|
||||
}
|
||||
|
||||
ScopedAStatus RadioMessaging::deleteSmsOnSim(int32_t serial, int32_t index) {
|
||||
LOG_CALL << serial << ' ' << index;
|
||||
mHal1_5->deleteSmsOnSim(serial, index);
|
||||
return ok();
|
||||
}
|
||||
|
||||
ScopedAStatus RadioMessaging::getCdmaBroadcastConfig(int32_t serial) {
|
||||
LOG_CALL << serial;
|
||||
mHal1_5->getCdmaBroadcastConfig(serial);
|
||||
return ok();
|
||||
}
|
||||
|
||||
ScopedAStatus RadioMessaging::getGsmBroadcastConfig(int32_t serial) {
|
||||
LOG_CALL << serial;
|
||||
mHal1_5->getGsmBroadcastConfig(serial);
|
||||
return ok();
|
||||
}
|
||||
|
||||
ScopedAStatus RadioMessaging::getSmscAddress(int32_t serial) {
|
||||
LOG_CALL << serial;
|
||||
mHal1_5->getSmscAddress(serial);
|
||||
return ok();
|
||||
}
|
||||
|
||||
ScopedAStatus RadioMessaging::reportSmsMemoryStatus(int32_t serial, bool available) {
|
||||
LOG_CALL << serial << ' ' << available;
|
||||
mHal1_5->reportSmsMemoryStatus(serial, available);
|
||||
return ok();
|
||||
}
|
||||
|
||||
ScopedAStatus RadioMessaging::responseAcknowledgement() {
|
||||
LOG_CALL;
|
||||
mHal1_5->responseAcknowledgement();
|
||||
return ok();
|
||||
}
|
||||
|
||||
ScopedAStatus RadioMessaging::sendCdmaSms(int32_t serial, const aidl::CdmaSmsMessage& sms) {
|
||||
LOG_CALL << serial;
|
||||
mHal1_5->sendCdmaSms(serial, toHidl(sms));
|
||||
return ok();
|
||||
}
|
||||
|
||||
ScopedAStatus RadioMessaging::sendCdmaSmsExpectMore(int32_t serial, const aidl::CdmaSmsMessage& m) {
|
||||
LOG_CALL << serial;
|
||||
mHal1_5->sendCdmaSmsExpectMore(serial, toHidl(m));
|
||||
return ok();
|
||||
}
|
||||
|
||||
ScopedAStatus RadioMessaging::sendImsSms(int32_t serial, const aidl::ImsSmsMessage& message) {
|
||||
LOG_CALL << serial;
|
||||
mHal1_5->sendImsSms(serial, toHidl(message));
|
||||
return ok();
|
||||
}
|
||||
|
||||
ScopedAStatus RadioMessaging::sendSms(int32_t serial, const aidl::GsmSmsMessage& message) {
|
||||
LOG_CALL << serial;
|
||||
mHal1_5->sendSms(serial, toHidl(message));
|
||||
return ok();
|
||||
}
|
||||
|
||||
ScopedAStatus RadioMessaging::sendSmsExpectMore(int32_t serial, const aidl::GsmSmsMessage& msg) {
|
||||
LOG_CALL << serial;
|
||||
mHal1_5->sendSMSExpectMore(serial, toHidl(msg));
|
||||
return ok();
|
||||
}
|
||||
|
||||
ScopedAStatus RadioMessaging::sendUssd(int32_t serial, const std::string& ussd) {
|
||||
LOG_CALL << serial << ' ' << ussd;
|
||||
mHal1_5->sendUssd(serial, ussd);
|
||||
return ok();
|
||||
}
|
||||
|
||||
ScopedAStatus RadioMessaging::setCdmaBroadcastActivation(int32_t serial, bool activate) {
|
||||
LOG_CALL << serial << ' ' << activate;
|
||||
mHal1_5->setCdmaBroadcastActivation(serial, activate);
|
||||
return ok();
|
||||
}
|
||||
|
||||
ScopedAStatus RadioMessaging::setCdmaBroadcastConfig(
|
||||
int32_t serial, const std::vector<aidl::CdmaBroadcastSmsConfigInfo>& cfgInfo) {
|
||||
LOG_CALL << serial;
|
||||
mHal1_5->setCdmaBroadcastConfig(serial, toHidl(cfgInfo));
|
||||
return ok();
|
||||
}
|
||||
|
||||
ScopedAStatus RadioMessaging::setGsmBroadcastActivation(int32_t serial, bool activate) {
|
||||
LOG_CALL << serial << ' ' << activate;
|
||||
mHal1_5->setGsmBroadcastActivation(serial, activate);
|
||||
return ok();
|
||||
}
|
||||
|
||||
ScopedAStatus RadioMessaging::setGsmBroadcastConfig(
|
||||
int32_t serial, const std::vector<aidl::GsmBroadcastSmsConfigInfo>& configInfo) {
|
||||
LOG_CALL << serial;
|
||||
mHal1_5->setGsmBroadcastConfig(serial, toHidl(configInfo));
|
||||
return ok();
|
||||
}
|
||||
|
||||
ScopedAStatus RadioMessaging::setResponseFunctions(
|
||||
const std::shared_ptr<aidl::IRadioMessagingResponse>& messagingResponse,
|
||||
const std::shared_ptr<aidl::IRadioMessagingIndication>& messagingIndication) {
|
||||
LOG_CALL << messagingResponse << ' ' << messagingIndication;
|
||||
|
||||
CHECK(messagingResponse);
|
||||
CHECK(messagingIndication);
|
||||
|
||||
mRadioResponse->setResponseFunction(messagingResponse);
|
||||
mRadioIndication->setResponseFunction(messagingIndication);
|
||||
|
||||
return ok();
|
||||
}
|
||||
|
||||
ScopedAStatus RadioMessaging::setSmscAddress(int32_t serial, const std::string& smsc) {
|
||||
LOG_CALL << serial << ' ' << smsc;
|
||||
mHal1_5->setSmscAddress(serial, smsc);
|
||||
return ok();
|
||||
}
|
||||
|
||||
ScopedAStatus RadioMessaging::writeSmsToRuim(int32_t serial, const aidl::CdmaSmsWriteArgs& sms) {
|
||||
LOG_CALL << serial;
|
||||
mHal1_5->writeSmsToRuim(serial, toHidl(sms));
|
||||
return ok();
|
||||
}
|
||||
|
||||
ScopedAStatus RadioMessaging::writeSmsToSim(int32_t serial, const aidl::SmsWriteArgs& smsWrArgs) {
|
||||
LOG_CALL << serial;
|
||||
mHal1_5->writeSmsToSim(serial, toHidl(smsWrArgs));
|
||||
return ok();
|
||||
}
|
||||
|
||||
} // namespace android::hardware::radio::compat
|
||||
@@ -0,0 +1,244 @@
|
||||
/*
|
||||
* Copyright (C) 2021 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 <libradiocompat/RadioResponse.h>
|
||||
|
||||
#include "commonStructs.h"
|
||||
#include "debug.h"
|
||||
#include "structs.h"
|
||||
|
||||
#include "collections.h"
|
||||
|
||||
#define RADIO_MODULE "MessagingResponse"
|
||||
|
||||
namespace android::hardware::radio::compat {
|
||||
|
||||
namespace aidl = ::aidl::android::hardware::radio::messaging;
|
||||
|
||||
void RadioResponse::setResponseFunction(std::shared_ptr<aidl::IRadioMessagingResponse> rmrCb) {
|
||||
CHECK(rmrCb);
|
||||
mMessagingCb = rmrCb;
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::acknowledgeIncomingGsmSmsWithPduResponse(
|
||||
const V1_0::RadioResponseInfo& info) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->acknowledgeIncomingGsmSmsWithPduResponse(toAidl(info));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::acknowledgeLastIncomingCdmaSmsResponse(
|
||||
const V1_0::RadioResponseInfo& info) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->acknowledgeLastIncomingCdmaSmsResponse(toAidl(info));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::acknowledgeLastIncomingGsmSmsResponse(
|
||||
const V1_0::RadioResponseInfo& info) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->acknowledgeLastIncomingGsmSmsResponse(toAidl(info));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::cancelPendingUssdResponse(const V1_0::RadioResponseInfo& info) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->cancelPendingUssdResponse(toAidl(info));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::deleteSmsOnRuimResponse(const V1_0::RadioResponseInfo& info) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->deleteSmsOnRuimResponse(toAidl(info));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::deleteSmsOnSimResponse(const V1_0::RadioResponseInfo& info) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->deleteSmsOnSimResponse(toAidl(info));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getCdmaBroadcastConfigResponse(
|
||||
const V1_0::RadioResponseInfo& info,
|
||||
const hidl_vec<V1_0::CdmaBroadcastSmsConfigInfo>& configs) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->getCdmaBroadcastConfigResponse(toAidl(info), toAidl(configs));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getGsmBroadcastConfigResponse(
|
||||
const V1_0::RadioResponseInfo& info, const hidl_vec<V1_0::GsmBroadcastSmsConfigInfo>& cfg) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->getGsmBroadcastConfigResponse(toAidl(info), toAidl(cfg));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::getSmscAddressResponse(const V1_0::RadioResponseInfo& info,
|
||||
const hidl_string& smsc) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->getSmscAddressResponse(toAidl(info), smsc);
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::reportSmsMemoryStatusResponse(const V1_0::RadioResponseInfo& info) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->reportSmsMemoryStatusResponse(toAidl(info));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::sendCdmaSmsExpectMoreResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::SendSmsResult& sms) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->sendCdmaSmsExpectMoreResponse(toAidl(info), toAidl(sms));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::sendCdmaSmsExpectMoreResponse_1_6(const V1_6::RadioResponseInfo& info,
|
||||
const V1_0::SendSmsResult& sms) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->sendCdmaSmsExpectMoreResponse(toAidl(info), toAidl(sms));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::sendCdmaSmsResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::SendSmsResult& sms) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->sendCdmaSmsResponse(toAidl(info), toAidl(sms));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::sendCdmaSmsResponse_1_6(const V1_6::RadioResponseInfo& info,
|
||||
const V1_0::SendSmsResult& sms) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->sendCdmaSmsResponse(toAidl(info), toAidl(sms));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::sendImsSmsResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::SendSmsResult& sms) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->sendImsSmsResponse(toAidl(info), toAidl(sms));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::sendSMSExpectMoreResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::SendSmsResult& sms) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->sendSmsExpectMoreResponse(toAidl(info), toAidl(sms));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::sendSmsExpectMoreResponse_1_6(const V1_6::RadioResponseInfo& info,
|
||||
const V1_0::SendSmsResult& sms) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->sendSmsExpectMoreResponse(toAidl(info), toAidl(sms));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::sendSmsResponse(const V1_0::RadioResponseInfo& info,
|
||||
const V1_0::SendSmsResult& sms) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->sendSmsResponse(toAidl(info), toAidl(sms));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::sendSmsResponse_1_6(const V1_6::RadioResponseInfo& info,
|
||||
const V1_0::SendSmsResult& sms) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->sendSmsResponse(toAidl(info), toAidl(sms));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::sendUssdResponse(const V1_0::RadioResponseInfo& info) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->sendUssdResponse(toAidl(info));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setCdmaBroadcastActivationResponse(
|
||||
const V1_0::RadioResponseInfo& info) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->setCdmaBroadcastActivationResponse(toAidl(info));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setCdmaBroadcastConfigResponse(const V1_0::RadioResponseInfo& info) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->setCdmaBroadcastConfigResponse(toAidl(info));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setGsmBroadcastActivationResponse(const V1_0::RadioResponseInfo& info) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->setGsmBroadcastActivationResponse(toAidl(info));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setGsmBroadcastConfigResponse(const V1_0::RadioResponseInfo& info) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->setGsmBroadcastConfigResponse(toAidl(info));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::setSmscAddressResponse(const V1_0::RadioResponseInfo& info) {
|
||||
LOG_CALL << info.serial;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->setSmscAddressResponse(toAidl(info));
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::writeSmsToRuimResponse(const V1_0::RadioResponseInfo& info,
|
||||
uint32_t index) {
|
||||
LOG_CALL << info.serial << ' ' << index;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->writeSmsToRuimResponse(toAidl(info), index);
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioResponse::writeSmsToSimResponse(const V1_0::RadioResponseInfo& info,
|
||||
int32_t index) {
|
||||
LOG_CALL << info.serial << ' ' << index;
|
||||
CHECK_CB(mMessagingCb);
|
||||
mMessagingCb->writeSmsToSimResponse(toAidl(info), index);
|
||||
return {};
|
||||
}
|
||||
|
||||
} // namespace android::hardware::radio::compat
|
||||
172
radio/aidl/compat/libradiocompat/messaging/structs.cpp
Normal file
172
radio/aidl/compat/libradiocompat/messaging/structs.cpp
Normal file
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Copyright (C) 2021 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 "structs.h"
|
||||
|
||||
#include "collections.h"
|
||||
|
||||
#include <aidl/android/hardware/radio/messaging/CdmaSmsAddress.h>
|
||||
#include <android-base/logging.h>
|
||||
|
||||
namespace android::hardware::radio::compat {
|
||||
|
||||
namespace aidl = ::aidl::android::hardware::radio::messaging;
|
||||
|
||||
V1_0::CdmaSmsAck toHidl(const aidl::CdmaSmsAck& smsAck) {
|
||||
return {
|
||||
.errorClass = (smsAck.errorClass ? V1_0::CdmaSmsErrorClass::ERROR
|
||||
: V1_0::CdmaSmsErrorClass::NO_ERROR),
|
||||
.smsCauseCode = smsAck.smsCauseCode,
|
||||
};
|
||||
}
|
||||
|
||||
static aidl::CdmaSmsAddress toAidl(const V1_0::CdmaSmsAddress& addr) {
|
||||
return {
|
||||
.digitMode = static_cast<int32_t>(addr.digitMode),
|
||||
.isNumberModeDataNetwork = addr.numberMode == V1_0::CdmaSmsNumberMode::DATA_NETWORK,
|
||||
.numberType = static_cast<int32_t>(addr.numberType),
|
||||
.numberPlan = static_cast<int32_t>(addr.numberPlan),
|
||||
.digits = addr.digits,
|
||||
};
|
||||
}
|
||||
|
||||
static V1_0::CdmaSmsAddress toHidl(const aidl::CdmaSmsAddress& addr) {
|
||||
return {
|
||||
.digitMode = V1_0::CdmaSmsDigitMode{addr.digitMode},
|
||||
.numberMode = addr.isNumberModeDataNetwork ? V1_0::CdmaSmsNumberMode::DATA_NETWORK
|
||||
: V1_0::CdmaSmsNumberMode::NOT_DATA_NETWORK,
|
||||
.numberType = V1_0::CdmaSmsNumberType{addr.numberType},
|
||||
.numberPlan = V1_0::CdmaSmsNumberPlan{addr.numberPlan},
|
||||
.digits = addr.digits,
|
||||
};
|
||||
}
|
||||
|
||||
static aidl::CdmaSmsSubaddress toAidl(const V1_0::CdmaSmsSubaddress& addr) {
|
||||
return {
|
||||
.subaddressType = static_cast<int32_t>(addr.subaddressType),
|
||||
.odd = addr.odd,
|
||||
.digits = addr.digits,
|
||||
};
|
||||
}
|
||||
|
||||
static V1_0::CdmaSmsSubaddress toHidl(const aidl::CdmaSmsSubaddress& addr) {
|
||||
return {
|
||||
.subaddressType = V1_0::CdmaSmsSubaddressType{addr.subaddressType},
|
||||
.odd = addr.odd,
|
||||
.digits = addr.digits,
|
||||
};
|
||||
}
|
||||
|
||||
::aidl::android::hardware::radio::messaging::CdmaSmsMessage toAidl(const V1_0::CdmaSmsMessage& m) {
|
||||
return {
|
||||
.teleserviceId = m.teleserviceId,
|
||||
.isServicePresent = m.isServicePresent,
|
||||
.serviceCategory = m.serviceCategory,
|
||||
.address = toAidl(m.address),
|
||||
.subAddress = toAidl(m.subAddress),
|
||||
.bearerData = m.bearerData,
|
||||
};
|
||||
}
|
||||
|
||||
V1_0::CdmaSmsMessage toHidl(const aidl::CdmaSmsMessage& msg) {
|
||||
return {
|
||||
.teleserviceId = msg.teleserviceId,
|
||||
.isServicePresent = msg.isServicePresent,
|
||||
.serviceCategory = msg.serviceCategory,
|
||||
.address = toHidl(msg.address),
|
||||
.subAddress = toHidl(msg.subAddress),
|
||||
.bearerData = msg.bearerData,
|
||||
};
|
||||
}
|
||||
|
||||
V1_0::ImsSmsMessage toHidl(const aidl::ImsSmsMessage& msg) {
|
||||
return {
|
||||
.tech = V1_0::RadioTechnologyFamily{msg.tech},
|
||||
.retry = msg.retry,
|
||||
.messageRef = msg.messageRef,
|
||||
.cdmaMessage = toHidl(msg.cdmaMessage),
|
||||
.gsmMessage = toHidl(msg.gsmMessage),
|
||||
};
|
||||
}
|
||||
|
||||
V1_0::GsmSmsMessage toHidl(const aidl::GsmSmsMessage& msg) {
|
||||
return {
|
||||
.smscPdu = msg.smscPdu,
|
||||
.pdu = msg.pdu,
|
||||
};
|
||||
}
|
||||
|
||||
aidl::CdmaBroadcastSmsConfigInfo toAidl(const V1_0::CdmaBroadcastSmsConfigInfo& info) {
|
||||
return {
|
||||
.serviceCategory = info.serviceCategory,
|
||||
.language = info.language,
|
||||
.selected = info.selected,
|
||||
};
|
||||
}
|
||||
|
||||
V1_0::CdmaBroadcastSmsConfigInfo toHidl(const aidl::CdmaBroadcastSmsConfigInfo& info) {
|
||||
return {
|
||||
.serviceCategory = info.serviceCategory,
|
||||
.language = info.language,
|
||||
.selected = info.selected,
|
||||
};
|
||||
}
|
||||
|
||||
aidl::GsmBroadcastSmsConfigInfo toAidl(const V1_0::GsmBroadcastSmsConfigInfo& info) {
|
||||
return {
|
||||
.fromServiceId = info.fromServiceId,
|
||||
.toServiceId = info.toServiceId,
|
||||
.fromCodeScheme = info.fromCodeScheme,
|
||||
.toCodeScheme = info.toCodeScheme,
|
||||
.selected = info.selected,
|
||||
};
|
||||
}
|
||||
|
||||
V1_0::GsmBroadcastSmsConfigInfo toHidl(const aidl::GsmBroadcastSmsConfigInfo& info) {
|
||||
return {
|
||||
.fromServiceId = info.fromServiceId,
|
||||
.toServiceId = info.toServiceId,
|
||||
.fromCodeScheme = info.fromCodeScheme,
|
||||
.toCodeScheme = info.toCodeScheme,
|
||||
.selected = info.selected,
|
||||
};
|
||||
}
|
||||
|
||||
V1_0::CdmaSmsWriteArgs toHidl(const aidl::CdmaSmsWriteArgs& args) {
|
||||
return {
|
||||
.status = V1_0::CdmaSmsWriteArgsStatus{args.status},
|
||||
.message = toHidl(args.message),
|
||||
};
|
||||
}
|
||||
|
||||
V1_0::SmsWriteArgs toHidl(const aidl::SmsWriteArgs& args) {
|
||||
return {
|
||||
.status = V1_0::SmsWriteArgsStatus{args.status},
|
||||
.pdu = args.pdu,
|
||||
.smsc = args.smsc,
|
||||
};
|
||||
}
|
||||
|
||||
::aidl::android::hardware::radio::messaging::SendSmsResult toAidl(
|
||||
const V1_0::SendSmsResult& result) {
|
||||
return {
|
||||
.messageRef = result.messageRef,
|
||||
.ackPDU = result.ackPDU,
|
||||
.errorCode = result.errorCode,
|
||||
};
|
||||
}
|
||||
|
||||
} // namespace android::hardware::radio::compat
|
||||
57
radio/aidl/compat/libradiocompat/messaging/structs.h
Normal file
57
radio/aidl/compat/libradiocompat/messaging/structs.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (C) 2021 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.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <aidl/android/hardware/radio/messaging/CdmaBroadcastSmsConfigInfo.h>
|
||||
#include <aidl/android/hardware/radio/messaging/CdmaSmsAck.h>
|
||||
#include <aidl/android/hardware/radio/messaging/CdmaSmsMessage.h>
|
||||
#include <aidl/android/hardware/radio/messaging/CdmaSmsWriteArgs.h>
|
||||
#include <aidl/android/hardware/radio/messaging/GsmBroadcastSmsConfigInfo.h>
|
||||
#include <aidl/android/hardware/radio/messaging/GsmSmsMessage.h>
|
||||
#include <aidl/android/hardware/radio/messaging/ImsSmsMessage.h>
|
||||
#include <aidl/android/hardware/radio/messaging/SendSmsResult.h>
|
||||
#include <aidl/android/hardware/radio/messaging/SmsWriteArgs.h>
|
||||
#include <android/hardware/radio/1.0/types.h>
|
||||
|
||||
namespace android::hardware::radio::compat {
|
||||
|
||||
V1_0::CdmaSmsAck toHidl(const ::aidl::android::hardware::radio::messaging::CdmaSmsAck& ack);
|
||||
|
||||
::aidl::android::hardware::radio::messaging::CdmaSmsMessage toAidl(const V1_0::CdmaSmsMessage& msg);
|
||||
V1_0::CdmaSmsMessage toHidl(const ::aidl::android::hardware::radio::messaging::CdmaSmsMessage& msg);
|
||||
|
||||
V1_0::ImsSmsMessage toHidl(const ::aidl::android::hardware::radio::messaging::ImsSmsMessage& msg);
|
||||
|
||||
V1_0::GsmSmsMessage toHidl(const ::aidl::android::hardware::radio::messaging::GsmSmsMessage& msg);
|
||||
|
||||
::aidl::android::hardware::radio::messaging::CdmaBroadcastSmsConfigInfo //
|
||||
toAidl(const V1_0::CdmaBroadcastSmsConfigInfo& info);
|
||||
V1_0::CdmaBroadcastSmsConfigInfo //
|
||||
toHidl(const ::aidl::android::hardware::radio::messaging::CdmaBroadcastSmsConfigInfo& info);
|
||||
|
||||
::aidl::android::hardware::radio::messaging::GsmBroadcastSmsConfigInfo //
|
||||
toAidl(const V1_0::GsmBroadcastSmsConfigInfo& info);
|
||||
V1_0::GsmBroadcastSmsConfigInfo //
|
||||
toHidl(const ::aidl::android::hardware::radio::messaging::GsmBroadcastSmsConfigInfo& info);
|
||||
|
||||
V1_0::CdmaSmsWriteArgs //
|
||||
toHidl(const ::aidl::android::hardware::radio::messaging::CdmaSmsWriteArgs& args);
|
||||
|
||||
V1_0::SmsWriteArgs toHidl(const ::aidl::android::hardware::radio::messaging::SmsWriteArgs& args);
|
||||
|
||||
::aidl::android::hardware::radio::messaging::SendSmsResult toAidl(const V1_0::SendSmsResult& res);
|
||||
|
||||
} // namespace android::hardware::radio::compat
|
||||
@@ -39,6 +39,14 @@ cc_binary {
|
||||
"android.hardware.radio.config@1.1",
|
||||
"android.hardware.radio.config@1.2",
|
||||
"android.hardware.radio.config@1.3",
|
||||
"android.hardware.radio.messaging-V1-ndk",
|
||||
"android.hardware.radio@1.0",
|
||||
"android.hardware.radio@1.1",
|
||||
"android.hardware.radio@1.2",
|
||||
"android.hardware.radio@1.3",
|
||||
"android.hardware.radio@1.4",
|
||||
"android.hardware.radio@1.5",
|
||||
"android.hardware.radio@1.6",
|
||||
"libbase",
|
||||
"libbinder_ndk",
|
||||
"libhidlbase",
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "hidl-utils.h"
|
||||
|
||||
#include <android-base/logging.h>
|
||||
#include <android/hidl/manager/1.2/IServiceManager.h>
|
||||
|
||||
namespace android::hardware::hidl_utils {
|
||||
|
||||
@@ -33,4 +34,13 @@ void linkDeathToDeath(sp<::android::hidl::base::V1_0::IBase> hal) {
|
||||
CHECK(linkStatus.withDefault(false)) << "Failed to link to HAL death";
|
||||
}
|
||||
|
||||
hidl_vec<hidl_string> listManifestByInterface(const char* descriptor) {
|
||||
auto manager = hidl::manager::V1_2::IServiceManager::getService();
|
||||
hidl_vec<hidl_string> services;
|
||||
manager->listManifestByInterface(descriptor, hidl_utils::fill(&services));
|
||||
CHECK_GT(services.size(), 0u) << "No " << descriptor
|
||||
<< " services in manifest (missing privileges?)" << std::endl;
|
||||
return services;
|
||||
}
|
||||
|
||||
} // namespace android::hardware::hidl_utils
|
||||
|
||||
@@ -18,13 +18,61 @@
|
||||
|
||||
#include <android/hidl/base/1.0/IBase.h>
|
||||
|
||||
#include <functional>
|
||||
|
||||
namespace android::hardware::hidl_utils {
|
||||
|
||||
/**
|
||||
* Link to a given HALs death and restart the current process in such a case.
|
||||
* Helper functor to fetch results from multi-return HIDL calls.
|
||||
* It's meant to be used in place of _hidl_cb callbacks.
|
||||
*
|
||||
* Please note extracting these return variables outside of the callback scope requires making
|
||||
* a copy of each return variable. This may be costly for frequently called HIDL methods with
|
||||
* non-negligible return object size. Please be cautious about performance when using this.
|
||||
*
|
||||
* Example usage:
|
||||
* Result result;
|
||||
* sp<ISomeInterface> iface;
|
||||
* hidlObject->someMethod(arg1, arg2, hidl_utils::fill(&result, &iface)).assertOk();
|
||||
* // use result and iface
|
||||
*/
|
||||
template <typename... T>
|
||||
struct fill : public std::function<void(const T&...)> {
|
||||
/**
|
||||
* Create _hidl_cb functor that copies the call arguments to specified pointers.
|
||||
*
|
||||
* \param args... Targets to copy the call arguments to
|
||||
*/
|
||||
fill(T*... args) : mTargets(args...) {}
|
||||
|
||||
void operator()(const T&... args) { copy<0, T...>(args...); }
|
||||
|
||||
private:
|
||||
std::tuple<T*...> mTargets;
|
||||
|
||||
template <int Pos, typename First>
|
||||
inline void copy(const First& first) {
|
||||
*std::get<Pos>(mTargets) = first;
|
||||
}
|
||||
|
||||
template <int Pos, typename First, typename... Rest>
|
||||
inline void copy(const First& first, const Rest&... rest) {
|
||||
*std::get<Pos>(mTargets) = first;
|
||||
copy<Pos + 1, Rest...>(rest...);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Link to a given HALs death and restart the current process in such a case.
|
||||
* \param hal HAL to which death to link
|
||||
*/
|
||||
void linkDeathToDeath(sp<hidl::base::V1_0::IBase> hal);
|
||||
|
||||
/**
|
||||
* List HAL instances of a given interface.
|
||||
*
|
||||
* \descriptor HIDL HAL descriptor
|
||||
*/
|
||||
hidl_vec<hidl_string> listManifestByInterface(const char* descriptor);
|
||||
|
||||
} // namespace android::hardware::hidl_utils
|
||||
|
||||
@@ -3,4 +3,15 @@
|
||||
<name>android.hardware.radio.config</name>
|
||||
<fqname>IRadioConfig/default</fqname>
|
||||
</hal>
|
||||
<!--
|
||||
Instances other than config are configured per-device, depending on the slot count (framework
|
||||
currently supports slot1, slot2 and slot3 instances) and Radio HALs device wishes to provide.
|
||||
You can either copy the following tags to device manifest or simply uncomment them here for
|
||||
quick testing.
|
||||
|
||||
<hal format="aidl">
|
||||
<name>android.hardware.radio.messaging</name>
|
||||
<fqname>IRadioMessaging/slot1</fqname>
|
||||
</hal>
|
||||
-->
|
||||
</manifest>
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
#include <android/binder_manager.h>
|
||||
#include <android/binder_process.h>
|
||||
#include <libradiocompat/RadioConfig.h>
|
||||
#include <libradiocompat/RadioIndication.h>
|
||||
#include <libradiocompat/RadioMessaging.h>
|
||||
#include <libradiocompat/RadioResponse.h>
|
||||
|
||||
namespace android::hardware::radio::service {
|
||||
|
||||
@@ -27,6 +30,35 @@ using namespace std::string_literals;
|
||||
|
||||
static std::vector<std::shared_ptr<ndk::ICInterface>> gPublishedHals;
|
||||
|
||||
template <typename T>
|
||||
static void publishRadioHal(sp<V1_5::IRadio> hidlHal, sp<compat::RadioResponse> responseCb,
|
||||
sp<compat::RadioIndication> indicationCb, const std::string& slot) {
|
||||
const auto instance = T::descriptor + "/"s + slot;
|
||||
if (!AServiceManager_isDeclared(instance.c_str())) {
|
||||
LOG(INFO) << instance << " is not declared in VINTF (this may be intentional)";
|
||||
return;
|
||||
}
|
||||
LOG(DEBUG) << "Publishing " << instance;
|
||||
|
||||
auto aidlHal = ndk::SharedRefBase::make<T>(hidlHal, responseCb, indicationCb);
|
||||
gPublishedHals.push_back(aidlHal);
|
||||
const auto status = AServiceManager_addService(aidlHal->asBinder().get(), instance.c_str());
|
||||
CHECK_EQ(status, STATUS_OK);
|
||||
}
|
||||
|
||||
static void publishRadio(std::string slot) {
|
||||
auto radioHidl = V1_5::IRadio::getService(slot);
|
||||
CHECK(radioHidl) << "HIDL IRadio not present in VINTF";
|
||||
|
||||
hidl_utils::linkDeathToDeath(radioHidl);
|
||||
|
||||
auto responseCb = sp<compat::RadioResponse>::make();
|
||||
auto indicationCb = sp<compat::RadioIndication>::make();
|
||||
radioHidl->setResponseFunctions(responseCb, indicationCb).assertOk();
|
||||
|
||||
publishRadioHal<compat::RadioMessaging>(radioHidl, responseCb, indicationCb, slot);
|
||||
}
|
||||
|
||||
static void publishRadioConfig() {
|
||||
auto hidlHal = config::V1_1::IRadioConfig::getService();
|
||||
CHECK(hidlHal) << "HIDL IRadioConfig not present in VINTF";
|
||||
@@ -47,6 +79,12 @@ static void main() {
|
||||
|
||||
publishRadioConfig();
|
||||
|
||||
const auto slots = hidl_utils::listManifestByInterface(V1_0::IRadio::descriptor);
|
||||
LOG(INFO) << "Found " << slots.size() << " slot(s)";
|
||||
for (const auto& slot : slots) {
|
||||
publishRadio(slot);
|
||||
}
|
||||
|
||||
LOG(DEBUG) << "Radio HAL compat service is operational";
|
||||
ABinderProcess_joinThreadPool();
|
||||
LOG(FATAL) << "Radio HAL compat service has stopped";
|
||||
|
||||
Reference in New Issue
Block a user