blob: cc5b8605bc63474d7c1146252374351ebfcd7ede [file] [log] [blame]
Malcolm Chenf168f0b2018-11-26 15:16:10 -08001/*
2 * Copyright (C) 2018 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
17package android.hardware.radio@1.3;
18
19import @1.2::IRadio;
Malcolm Chended43992018-11-27 20:23:13 -080020import @1.1::RadioAccessSpecifier;
Malcolm Chenf168f0b2018-11-26 15:16:10 -080021
22/**
Malcolm Chended43992018-11-27 20:23:13 -080023 * Note: IRadio 1.3 is an intermediate layer between Android P and Android Q. It's specifically
24 * designed for CBRS related interfaces. All other interfaces for Q are added in IRadio 1.4.
25 *
Malcolm Chenf168f0b2018-11-26 15:16:10 -080026 * This interface is used by telephony and telecom to talk to cellular radio.
27 * All the functions have minimum one parameter:
28 * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
29 * duration of a method call. If clients provide colliding serials (including passing the same
30 * serial to different methods), multiple responses (one for each method call) must still be served.
31 * setResponseFunctions must work with @1.1::IRadioResponse and @1.1::IRadioIndication.
32 */
33interface IRadio extends @1.2::IRadio {
Malcolm Chended43992018-11-27 20:23:13 -080034 /**
35 * Specify which bands modem's background scan must act on.
36 * If specifyChannels is true, it only scans bands specified in specifiers.
37 * If specifyChannels is false, it scans all bands.
38 *
39 * For example, CBRS is only on LTE band 48. By specifying this band,
40 * modem saves more power.
41 *
42 * @param serial Serial number of request.
43 * @param specifyChannels whether to scan bands defined in specifiers.
44 * @param specifiers which bands to scan. Only used if specifyChannels is true.
45 *
46 * Response callback is IRadioResponse.setSystemSelectionChannelsResponse()
47 */
48 oneway setSystemSelectionChannels(int32_t serial, bool specifyChannels,
49 vec<RadioAccessSpecifier> specifiers);
50
51 /**
52 * Toggle logical modem on and off. It should put the logical modem in low power
53 * mode without any activity, while the SIM card remains visible. The difference
54 * with setRadioPower is, setRadioPower affects all logical modem while this controls
55 * just one.
56 *
57 * @param serial Serial number of request.
58 * @param on True to turn on the logical modem, otherwise turn it off.
59 *
60 * Response function is IRadioResponse.enableModemResponse()
61 */
62 oneway enableModem(int32_t serial, bool on);
Nazanin Bakhshida4e7932019-01-17 10:05:10 -080063
64 /**
65 * Request status of logical modem associated with the given serial number. It returns
66 * isEnabled=true if the logical modem is in low power mode without any activity, while
67 * the SIM card remains visible.
68 *
69 * @param serial Serial number of request.
70 *
71 * Response function is IRadioResponse.getModemStackStatusResponse()
72 */
73 oneway getModemStackStatus(int32_t serial);
74};