Malcolm Chen | f168f0b | 2018-11-26 15:16:10 -0800 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package android.hardware.radio@1.3; |
| 18 | |
| 19 | import @1.2::IRadio; |
Malcolm Chen | ded4399 | 2018-11-27 20:23:13 -0800 | [diff] [blame] | 20 | import @1.1::RadioAccessSpecifier; |
Malcolm Chen | f168f0b | 2018-11-26 15:16:10 -0800 | [diff] [blame] | 21 | |
| 22 | /** |
Malcolm Chen | ded4399 | 2018-11-27 20:23:13 -0800 | [diff] [blame] | 23 | * 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 Chen | f168f0b | 2018-11-26 15:16:10 -0800 | [diff] [blame] | 26 | * 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 | */ |
| 33 | interface IRadio extends @1.2::IRadio { |
Malcolm Chen | ded4399 | 2018-11-27 20:23:13 -0800 | [diff] [blame] | 34 | /** |
| 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 Mahajan | 60bc204 | 2019-03-01 15:10:57 -0800 | [diff] [blame] | 52 | * 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 Chen | ded4399 | 2018-11-27 20:23:13 -0800 | [diff] [blame] | 59 | * |
| 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 Bakhshi | da4e793 | 2019-01-17 10:05:10 -0800 | [diff] [blame] | 66 | |
| 67 | /** |
Nazanin Bakhshi | 22df069 | 2019-02-27 10:10:29 -0800 | [diff] [blame] | 68 | * 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 Bakhshi | da4e793 | 2019-01-17 10:05:10 -0800 | [diff] [blame] | 70 | * |
| 71 | * @param serial Serial number of request. |
| 72 | * |
| 73 | * Response function is IRadioResponse.getModemStackStatusResponse() |
| 74 | */ |
| 75 | oneway getModemStackStatus(int32_t serial); |
| 76 | }; |