Hunsuk Choi | 1a5f1cc | 2022-11-02 06:28:35 +0000 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) 2022 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #include <libradiocompat/RadioIms.h> |
| 18 | |
| 19 | #include "commonStructs.h" |
| 20 | #include "debug.h" |
| 21 | |
| 22 | #include "collections.h" |
| 23 | |
| 24 | #define RADIO_MODULE "Ims" |
| 25 | |
| 26 | namespace android::hardware::radio::compat { |
| 27 | |
| 28 | using ::ndk::ScopedAStatus; |
| 29 | namespace aidl = ::aidl::android::hardware::radio::ims; |
| 30 | constexpr auto ok = &ScopedAStatus::ok; |
| 31 | |
| 32 | std::shared_ptr<aidl::IRadioImsResponse> RadioIms::respond() { |
| 33 | return mCallbackManager->response().imsCb(); |
| 34 | } |
| 35 | |
| 36 | ScopedAStatus RadioIms::setSrvccCallInfo( |
| 37 | int32_t serial, const std::vector<aidl::SrvccCall>& /*srvccCalls*/) { |
| 38 | LOG_CALL << serial; |
| 39 | LOG(ERROR) << " setSrvccCallInfo is unsupported by HIDL HALs"; |
| 40 | return ok(); |
| 41 | } |
| 42 | ScopedAStatus RadioIms::updateImsRegistrationInfo( |
| 43 | int32_t serial, const aidl::ImsRegistration& /*imsRegistration*/) { |
| 44 | LOG_CALL << serial; |
| 45 | LOG(ERROR) << " updateImsRegistrationInfo is unsupported by HIDL HALs"; |
| 46 | return ok(); |
| 47 | } |
| 48 | ScopedAStatus RadioIms::startImsTraffic( |
| 49 | int32_t serial, int32_t /*token*/, aidl::ImsTrafficType /*imsTrafficType*/, |
| 50 | ::aidl::android::hardware::radio::AccessNetwork /*accessNetworkType*/, |
| 51 | ::aidl::android::hardware::radio::ims::ImsCall::Direction /*trafficDirection*/) { |
| 52 | LOG_CALL << serial; |
| 53 | LOG(ERROR) << " startImsTraffic is unsupported by HIDL HALs"; |
| 54 | return ok(); |
| 55 | } |
| 56 | ScopedAStatus RadioIms::stopImsTraffic(int32_t serial, int32_t /*token*/) { |
| 57 | LOG_CALL << serial; |
| 58 | LOG(ERROR) << " stopImsTraffic is unsupported by HIDL HALs"; |
| 59 | return ok(); |
| 60 | } |
| 61 | ScopedAStatus RadioIms::triggerEpsFallback(int32_t serial, aidl::EpsFallbackReason /*reason*/) { |
| 62 | LOG_CALL << serial; |
| 63 | LOG(ERROR) << " triggerEpsFallback is unsupported by HIDL HALs"; |
| 64 | return ok(); |
| 65 | } |
| 66 | ScopedAStatus RadioIms::sendAnbrQuery( |
| 67 | int32_t serial, aidl::ImsStreamType /*mediaType*/, aidl::ImsStreamDirection /*direction*/, |
| 68 | int32_t /*bitsPerSecond*/) { |
| 69 | LOG_CALL << serial; |
| 70 | LOG(ERROR) << " sendAnbrQuery is unsupported by HIDL HALs"; |
| 71 | return ok(); |
| 72 | } |
| 73 | ScopedAStatus RadioIms::updateImsCallStatus( |
| 74 | int32_t serial, const std::vector<aidl::ImsCall>& /*imsCalls*/) { |
| 75 | LOG_CALL << serial; |
| 76 | LOG(ERROR) << " updateImsCallStatus is unsupported by HIDL HALs"; |
| 77 | return ok(); |
| 78 | } |
| 79 | |
| 80 | ScopedAStatus RadioIms::setResponseFunctions( |
| 81 | const std::shared_ptr<aidl::IRadioImsResponse>& response, |
| 82 | const std::shared_ptr<aidl::IRadioImsIndication>& indication) { |
| 83 | LOG_CALL << response << ' ' << indication; |
| 84 | mCallbackManager->setResponseFunctions(response, indication); |
| 85 | return ok(); |
| 86 | } |
| 87 | |
| 88 | } // namespace android::hardware::radio::compat |