blob: 8d8160519abd03c01b6b00cd32bec9aa392cf85e [file] [log] [blame]
Sarah Chin91997ac2021-12-29 00:35:12 -08001/*
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_config_utils.h"
18
19RadioConfigResponse::RadioConfigResponse(RadioServiceTest& parent) : parent_config(parent) {}
20
21ndk::ScopedAStatus RadioConfigResponse::getSimSlotsStatusResponse(
Sarah Chin52de0ad2022-01-28 01:02:16 -080022 const RadioResponseInfo& info, const std::vector<SimSlotStatus>& /* slotStatus */) {
23 rspInfo = info;
24 parent_config.notify(info.serial);
Sarah Chin91997ac2021-12-29 00:35:12 -080025 return ndk::ScopedAStatus::ok();
26}
27
Sarah Chin52de0ad2022-01-28 01:02:16 -080028ndk::ScopedAStatus RadioConfigResponse::setSimSlotsMappingResponse(const RadioResponseInfo& info) {
29 rspInfo = info;
30 parent_config.notify(info.serial);
Sarah Chin91997ac2021-12-29 00:35:12 -080031 return ndk::ScopedAStatus::ok();
32}
33
34ndk::ScopedAStatus RadioConfigResponse::getPhoneCapabilityResponse(
35 const RadioResponseInfo& info, const PhoneCapability& phoneCapability) {
36 rspInfo = info;
37 phoneCap = phoneCapability;
38 parent_config.notify(info.serial);
39 return ndk::ScopedAStatus::ok();
40}
41
42ndk::ScopedAStatus RadioConfigResponse::setPreferredDataModemResponse(
Sarah Chin52de0ad2022-01-28 01:02:16 -080043 const RadioResponseInfo& info) {
44 rspInfo = info;
45 parent_config.notify(info.serial);
Sarah Chin91997ac2021-12-29 00:35:12 -080046 return ndk::ScopedAStatus::ok();
47}
48
49ndk::ScopedAStatus RadioConfigResponse::getNumOfLiveModemsResponse(
Sarah Chin52de0ad2022-01-28 01:02:16 -080050 const RadioResponseInfo& info, const int8_t /* numOfLiveModems */) {
51 rspInfo = info;
52 parent_config.notify(info.serial);
Sarah Chin91997ac2021-12-29 00:35:12 -080053 return ndk::ScopedAStatus::ok();
54}
55
Sarah Chin52de0ad2022-01-28 01:02:16 -080056ndk::ScopedAStatus RadioConfigResponse::setNumOfLiveModemsResponse(const RadioResponseInfo& info) {
57 rspInfo = info;
58 parent_config.notify(info.serial);
Sarah Chin91997ac2021-12-29 00:35:12 -080059 return ndk::ScopedAStatus::ok();
60}
61
62ndk::ScopedAStatus RadioConfigResponse::getHalDeviceCapabilitiesResponse(
63 const RadioResponseInfo& info, bool modemReducedFeatures) {
Sarah Chin52de0ad2022-01-28 01:02:16 -080064 rspInfo = info;
Sarah Chin91997ac2021-12-29 00:35:12 -080065 modemReducedFeatureSet1 = modemReducedFeatures;
66 parent_config.notify(info.serial);
67 return ndk::ScopedAStatus::ok();
68}