Tomasz Wasilczyk | 9ddc87f | 2021-10-25 20:20:49 -0700 | [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 <libradiocompat/RadioResponse.h> |
| 18 | |
| 19 | #include "debug.h" |
| 20 | |
Tomasz Wasilczyk | 9ddc87f | 2021-10-25 20:20:49 -0700 | [diff] [blame] | 21 | #define RADIO_MODULE "Common" |
| 22 | |
| 23 | namespace android::hardware::radio::compat { |
| 24 | |
Sarah Chin | e98dd0e | 2021-12-09 00:33:37 -0800 | [diff] [blame] | 25 | RadioResponse::RadioResponse(std::shared_ptr<DriverContext> context) : mContext(context) {} |
| 26 | |
Tomasz Wasilczyk | 9ddc87f | 2021-10-25 20:20:49 -0700 | [diff] [blame] | 27 | Return<void> RadioResponse::acknowledgeRequest(int32_t serial) { |
| 28 | LOG_CALL << serial; |
Tomasz Wasilczyk | 7f51a9a | 2021-10-28 13:22:47 -0700 | [diff] [blame] | 29 | // TODO(b/203699028): send to correct requestor or confirm if spam is not a problem |
Tomasz Wasilczyk | 6063857 | 2021-12-13 17:13:48 -0800 | [diff] [blame^] | 30 | if (mDataCb) mDataCb.get()->acknowledgeRequest(serial); |
| 31 | if (mMessagingCb) mMessagingCb.get()->acknowledgeRequest(serial); |
| 32 | if (mModemCb) mModemCb.get()->acknowledgeRequest(serial); |
| 33 | if (mNetworkCb) mNetworkCb.get()->acknowledgeRequest(serial); |
| 34 | if (mSimCb) mSimCb.get()->acknowledgeRequest(serial); |
| 35 | if (mVoiceCb) mVoiceCb.get()->acknowledgeRequest(serial); |
Tomasz Wasilczyk | 9ddc87f | 2021-10-25 20:20:49 -0700 | [diff] [blame] | 36 | return {}; |
| 37 | } |
| 38 | |
Tomasz Wasilczyk | 9ddc87f | 2021-10-25 20:20:49 -0700 | [diff] [blame] | 39 | } // namespace android::hardware::radio::compat |