Malcolm Chen | ded4399 | 2018-11-27 20:23:13 -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.config@1.1; |
| 18 | |
| 19 | import @1.0::IRadioConfig; |
| 20 | import @1.1::IRadioConfigResponse; |
| 21 | import @1.1::PhoneCapability; |
Nazanin Bakhshi | 28cd645 | 2018-12-27 11:58:16 -0800 | [diff] [blame] | 22 | import @1.1::ModemsConfig; |
Malcolm Chen | ded4399 | 2018-11-27 20:23:13 -0800 | [diff] [blame] | 23 | |
| 24 | /** |
| 25 | * Note: IRadioConfig 1.1 is an intermediate layer between Android P and Android Q. |
| 26 | * It's specifically designed for CBRS related interfaces. All other interfaces |
| 27 | * for Q are added in IRadioConfig 1.2. |
| 28 | * |
| 29 | * This interface is used by telephony and telecom to talk to cellular radio for the purpose of |
| 30 | * radio configuration, and it is not associated with any specific modem or slot. |
| 31 | * All the functions have minimum one parameter: |
| 32 | * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the |
| 33 | * duration of a method call. If clients provide colliding serials (including passing the same |
| 34 | * serial to different methods), multiple responses (one for each method call) must still be served. |
| 35 | */ |
| 36 | interface IRadioConfig extends @1.0::IRadioConfig { |
| 37 | /** |
| 38 | * Request current phone capability. |
| 39 | * |
| 40 | * @param serial Serial number of request. |
| 41 | * |
| 42 | * Response callback is IRadioResponse.getPhoneCapabilityResponse() which |
| 43 | * will return <@1.1::PhoneCapability>. |
| 44 | */ |
| 45 | oneway getPhoneCapability(int32_t serial); |
| 46 | |
| 47 | /** |
| 48 | * Set preferred data modem Id. |
| 49 | * In a multi-SIM device, notify modem layer which logical modem will be used primarily |
| 50 | * for data. It helps modem with resource optimization and decisions of what data connections |
| 51 | * should be satisfied. |
| 52 | * |
| 53 | * @param serial Serial number of request. |
| 54 | * @param modem Id the logical modem ID, which should match one of modem IDs returned |
| 55 | * from getPhoneCapability(). |
| 56 | * |
| 57 | * Response callback is IRadioConfigResponse.setPreferredDataModemResponse() |
| 58 | */ |
| 59 | oneway setPreferredDataModem(int32_t serial, uint8_t modemId); |
Nazanin Bakhshi | 28cd645 | 2018-12-27 11:58:16 -0800 | [diff] [blame] | 60 | |
| 61 | /** |
| 62 | * Set modems configurations by specifying the number of live modems (i.e modems that are |
| 63 | * enabled and actively working as part of a working telephony stack). |
| 64 | * |
| 65 | * Example: this interface can be used to switch to single/multi sim mode by specifying |
| 66 | * the number of live modems as 1, 2, etc |
| 67 | * |
| 68 | * Note: by setting the number of live modems in this API, that number of modems will |
| 69 | * subsequently get enabled/disabled |
| 70 | * |
| 71 | * @param serial serial number of request. |
| 72 | * @param modemsConfig ModemsConfig object including the number of live modems |
| 73 | * |
| 74 | * Response callback is IRadioResponse.setModemsConfigResponse() |
| 75 | */ |
| 76 | oneway setModemsConfig(int32_t serial, ModemsConfig modemsConfig); |
| 77 | |
| 78 | /** |
| 79 | * Get modems configurations. This interface is used to get modem configurations |
| 80 | * which includes the number of live modems (i.e modems that are |
| 81 | * enabled and actively working as part of a working telephony stack) |
| 82 | * |
| 83 | * Note: in order to get the overall number of modems available on the phone, |
| 84 | * refer to getPhoneCapability API |
| 85 | * |
| 86 | * @param serial Serial number of request. |
| 87 | * |
| 88 | * Response callback is IRadioResponse.getModemsConfigResponse() which |
| 89 | * will return <@1.1::ModemsConfig>. |
| 90 | */ |
| 91 | oneway getModemsConfig(int32_t serial); |
Malcolm Chen | ded4399 | 2018-11-27 20:23:13 -0800 | [diff] [blame] | 92 | }; |