Sarah Chin | d2a4119 | 2021-12-21 11:34:00 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2021 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 "radio_voice_utils.h" |
| 18 | |
| 19 | RadioVoiceResponse::RadioVoiceResponse(RadioResponseWaiter& parent) : parent_voice(parent) {} |
| 20 | |
| 21 | ndk::ScopedAStatus RadioVoiceResponse::acceptCallResponse(const RadioResponseInfo& /*info*/) { |
| 22 | return ndk::ScopedAStatus::ok(); |
| 23 | } |
| 24 | |
| 25 | ndk::ScopedAStatus RadioVoiceResponse::acknowledgeRequest(int32_t /*serial*/) { |
| 26 | return ndk::ScopedAStatus::ok(); |
| 27 | } |
| 28 | |
| 29 | ndk::ScopedAStatus RadioVoiceResponse::conferenceResponse(const RadioResponseInfo& /*info*/) { |
| 30 | return ndk::ScopedAStatus::ok(); |
| 31 | } |
| 32 | |
| 33 | ndk::ScopedAStatus RadioVoiceResponse::dialResponse(const RadioResponseInfo& /*info*/) { |
| 34 | return ndk::ScopedAStatus::ok(); |
| 35 | } |
| 36 | |
| 37 | ndk::ScopedAStatus RadioVoiceResponse::emergencyDialResponse(const RadioResponseInfo& info) { |
| 38 | rspInfo = info; |
| 39 | parent_voice.notify(info.serial); |
| 40 | return ndk::ScopedAStatus::ok(); |
| 41 | } |
| 42 | |
| 43 | ndk::ScopedAStatus RadioVoiceResponse::exitEmergencyCallbackModeResponse( |
| 44 | const RadioResponseInfo& /*info*/) { |
| 45 | return ndk::ScopedAStatus::ok(); |
| 46 | } |
| 47 | |
| 48 | ndk::ScopedAStatus RadioVoiceResponse::explicitCallTransferResponse( |
| 49 | const RadioResponseInfo& /*info*/) { |
| 50 | return ndk::ScopedAStatus::ok(); |
| 51 | } |
| 52 | |
| 53 | ndk::ScopedAStatus RadioVoiceResponse::getCallForwardStatusResponse( |
| 54 | const RadioResponseInfo& /*info*/, |
| 55 | const std::vector<CallForwardInfo>& /*callForwardInfos*/) { |
| 56 | return ndk::ScopedAStatus::ok(); |
| 57 | } |
| 58 | |
| 59 | ndk::ScopedAStatus RadioVoiceResponse::getCallWaitingResponse(const RadioResponseInfo& /*info*/, |
| 60 | bool /*enable*/, |
| 61 | int32_t /*serviceClass*/) { |
| 62 | return ndk::ScopedAStatus::ok(); |
| 63 | } |
| 64 | |
| 65 | ndk::ScopedAStatus RadioVoiceResponse::getClipResponse(const RadioResponseInfo& /*info*/, |
| 66 | ClipStatus /*status*/) { |
| 67 | return ndk::ScopedAStatus::ok(); |
| 68 | } |
| 69 | |
| 70 | ndk::ScopedAStatus RadioVoiceResponse::getClirResponse(const RadioResponseInfo& /*info*/, |
| 71 | int32_t /*n*/, int32_t /*m*/) { |
| 72 | return ndk::ScopedAStatus::ok(); |
| 73 | } |
| 74 | |
| 75 | ndk::ScopedAStatus RadioVoiceResponse::getCurrentCallsResponse(const RadioResponseInfo& info, |
| 76 | const std::vector<Call>& calls) { |
| 77 | rspInfo = info; |
| 78 | currentCalls = calls; |
| 79 | parent_voice.notify(info.serial); |
| 80 | return ndk::ScopedAStatus::ok(); |
| 81 | } |
| 82 | |
| 83 | ndk::ScopedAStatus RadioVoiceResponse::getLastCallFailCauseResponse( |
| 84 | const RadioResponseInfo& /*info*/, const LastCallFailCauseInfo& /*failCauseInfo*/) { |
| 85 | return ndk::ScopedAStatus::ok(); |
| 86 | } |
| 87 | |
| 88 | ndk::ScopedAStatus RadioVoiceResponse::getMuteResponse(const RadioResponseInfo& /*info*/, |
| 89 | bool /*enable*/) { |
| 90 | return ndk::ScopedAStatus::ok(); |
| 91 | } |
| 92 | |
| 93 | ndk::ScopedAStatus RadioVoiceResponse::getPreferredVoicePrivacyResponse( |
| 94 | const RadioResponseInfo& /*info*/, bool /*enable*/) { |
| 95 | return ndk::ScopedAStatus::ok(); |
| 96 | } |
| 97 | |
| 98 | ndk::ScopedAStatus RadioVoiceResponse::getTtyModeResponse(const RadioResponseInfo& /*info*/, |
| 99 | TtyMode /*mode*/) { |
| 100 | return ndk::ScopedAStatus::ok(); |
| 101 | } |
| 102 | |
| 103 | ndk::ScopedAStatus RadioVoiceResponse::handleStkCallSetupRequestFromSimResponse( |
| 104 | const RadioResponseInfo& /*info*/) { |
| 105 | return ndk::ScopedAStatus::ok(); |
| 106 | } |
| 107 | |
| 108 | ndk::ScopedAStatus RadioVoiceResponse::hangupConnectionResponse(const RadioResponseInfo& info) { |
| 109 | rspInfo = info; |
| 110 | parent_voice.notify(info.serial); |
| 111 | return ndk::ScopedAStatus::ok(); |
| 112 | } |
| 113 | |
| 114 | ndk::ScopedAStatus RadioVoiceResponse::hangupForegroundResumeBackgroundResponse( |
| 115 | const RadioResponseInfo& /*info*/) { |
| 116 | return ndk::ScopedAStatus::ok(); |
| 117 | } |
| 118 | |
| 119 | ndk::ScopedAStatus RadioVoiceResponse::hangupWaitingOrBackgroundResponse( |
| 120 | const RadioResponseInfo& /*info*/) { |
| 121 | return ndk::ScopedAStatus::ok(); |
| 122 | } |
| 123 | |
| 124 | ndk::ScopedAStatus RadioVoiceResponse::isVoNrEnabledResponse(const RadioResponseInfo& /*info*/, |
| 125 | bool /*enabled*/) { |
| 126 | return ndk::ScopedAStatus::ok(); |
| 127 | } |
| 128 | |
| 129 | ndk::ScopedAStatus RadioVoiceResponse::rejectCallResponse(const RadioResponseInfo& /*info*/) { |
| 130 | return ndk::ScopedAStatus::ok(); |
| 131 | } |
| 132 | |
| 133 | ndk::ScopedAStatus RadioVoiceResponse::sendBurstDtmfResponse(const RadioResponseInfo& /*info*/) { |
| 134 | return ndk::ScopedAStatus::ok(); |
| 135 | } |
| 136 | |
| 137 | ndk::ScopedAStatus RadioVoiceResponse::sendCdmaFeatureCodeResponse( |
| 138 | const RadioResponseInfo& /*info*/) { |
| 139 | return ndk::ScopedAStatus::ok(); |
| 140 | } |
| 141 | |
| 142 | ndk::ScopedAStatus RadioVoiceResponse::sendDtmfResponse(const RadioResponseInfo& /*info*/) { |
| 143 | return ndk::ScopedAStatus::ok(); |
| 144 | } |
| 145 | |
| 146 | ndk::ScopedAStatus RadioVoiceResponse::separateConnectionResponse( |
| 147 | const RadioResponseInfo& /*info*/) { |
| 148 | return ndk::ScopedAStatus::ok(); |
| 149 | } |
| 150 | |
| 151 | ndk::ScopedAStatus RadioVoiceResponse::setCallForwardResponse(const RadioResponseInfo& /*info*/) { |
| 152 | return ndk::ScopedAStatus::ok(); |
| 153 | } |
| 154 | |
| 155 | ndk::ScopedAStatus RadioVoiceResponse::setCallWaitingResponse(const RadioResponseInfo& /*info*/) { |
| 156 | return ndk::ScopedAStatus::ok(); |
| 157 | } |
| 158 | |
| 159 | ndk::ScopedAStatus RadioVoiceResponse::setClirResponse(const RadioResponseInfo& /*info*/) { |
| 160 | return ndk::ScopedAStatus::ok(); |
| 161 | } |
| 162 | |
| 163 | ndk::ScopedAStatus RadioVoiceResponse::setMuteResponse(const RadioResponseInfo& /*info*/) { |
| 164 | return ndk::ScopedAStatus::ok(); |
| 165 | } |
| 166 | |
| 167 | ndk::ScopedAStatus RadioVoiceResponse::setPreferredVoicePrivacyResponse( |
| 168 | const RadioResponseInfo& /*info*/) { |
| 169 | return ndk::ScopedAStatus::ok(); |
| 170 | } |
| 171 | |
| 172 | ndk::ScopedAStatus RadioVoiceResponse::setTtyModeResponse(const RadioResponseInfo& /*info*/) { |
| 173 | return ndk::ScopedAStatus::ok(); |
| 174 | } |
| 175 | |
| 176 | ndk::ScopedAStatus RadioVoiceResponse::setVoNrEnabledResponse(const RadioResponseInfo& /*info*/) { |
| 177 | return ndk::ScopedAStatus::ok(); |
| 178 | } |
| 179 | |
| 180 | ndk::ScopedAStatus RadioVoiceResponse::startDtmfResponse(const RadioResponseInfo& /*info*/) { |
| 181 | return ndk::ScopedAStatus::ok(); |
| 182 | } |
| 183 | |
| 184 | ndk::ScopedAStatus RadioVoiceResponse::stopDtmfResponse(const RadioResponseInfo& /*info*/) { |
| 185 | return ndk::ScopedAStatus::ok(); |
| 186 | } |
| 187 | |
| 188 | ndk::ScopedAStatus RadioVoiceResponse::switchWaitingOrHoldingAndActiveResponse( |
| 189 | const RadioResponseInfo& /*info*/) { |
| 190 | return ndk::ScopedAStatus::ok(); |
| 191 | } |