blob: 0320ad77caf96c405f44ceff25505d29a92162f5 [file] [log] [blame]
Tomasz Wasilczyk6301e8f2021-10-18 16:53:40 -07001/*
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 "RadioConfigIndication.h"
18
19#include "commonStructs.h"
20#include "debug.h"
21#include "structs.h"
22
23#include "collections.h"
24
25#define RADIO_MODULE "ConfigIndication"
26
27namespace android::hardware::radio::compat {
28
29namespace aidl = ::aidl::android::hardware::radio::config;
30
31RadioConfigIndication::RadioConfigIndication(std::shared_ptr<aidl::IRadioConfigIndication> callback)
32 : mCallback(callback) {}
33
34Return<void> RadioConfigIndication::simSlotsStatusChanged(
35 V1_0::RadioIndicationType type, const hidl_vec<config::V1_0::SimSlotStatus>& slotStatus) {
36 LOG_CALL << type;
37 mCallback->simSlotsStatusChanged(toAidl(type), toAidl(slotStatus));
38 return {};
39}
40
41Return<void> RadioConfigIndication::simSlotsStatusChanged_1_2(
42 V1_0::RadioIndicationType type, const hidl_vec<config::V1_2::SimSlotStatus>& slotStatus) {
43 LOG_CALL << type;
44 mCallback->simSlotsStatusChanged(toAidl(type), toAidl(slotStatus));
45 return {};
46}
47
48} // namespace android::hardware::radio::compat