blob: 922b35d58c6e5f7c89813c6c74ac0efdf056c5cb [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 /**
Amit Mahajan60bc2042019-03-01 15:10:57 -080052 * Toggle logical modem on/off. This is similar to @1.0::IRadio.setRadioPower(), however that
53 * does not enforce that radio power is toggled only for the corresponding radio and certain
54 * vendor implementations do it for all radios. This new API should affect only the modem for
55 * which it is called. A modem stack must be on/active only when both setRadioPower() and
56 * enableModem() are set to on for it.
57 *
58 * SIM must be read if available even if modem is off/inactive.
Malcolm Chended43992018-11-27 20:23:13 -080059 *
60 * @param serial Serial number of request.
61 * @param on True to turn on the logical modem, otherwise turn it off.
62 *
63 * Response function is IRadioResponse.enableModemResponse()
64 */
65 oneway enableModem(int32_t serial, bool on);
Nazanin Bakhshida4e7932019-01-17 10:05:10 -080066
67 /**
Nazanin Bakhshi22df0692019-02-27 10:10:29 -080068 * Request status of logical modem. It returns isEnabled=true if the logical modem is on.
69 * This method is the getter method for enableModem.
Nazanin Bakhshida4e7932019-01-17 10:05:10 -080070 *
71 * @param serial Serial number of request.
72 *
73 * Response function is IRadioResponse.getModemStackStatusResponse()
74 */
75 oneway getModemStackStatus(int32_t serial);
76};