Malcolm Chen | 360e1f9 | 2019-10-02 11:38:13 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2019 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.5; |
| 18 | |
Nazish Tabassum | ba2f830 | 2019-12-10 14:35:09 +0530 | [diff] [blame] | 19 | import @1.0::CdmaSmsMessage; |
Sarah Chin | 039d542 | 2019-11-05 15:39:32 -0800 | [diff] [blame] | 20 | import @1.2::DataRequestReason; |
Jack Yu | 7f6c8d0 | 2019-12-09 14:02:56 -0800 | [diff] [blame] | 21 | import @1.4::DataProfileInfo; |
Nazish Tabassum | ba2f830 | 2019-12-10 14:35:09 +0530 | [diff] [blame] | 22 | import @1.4::IRadio; |
sqian | f1850bf | 2019-11-12 18:26:30 -0800 | [diff] [blame] | 23 | import @1.5::AccessNetwork; |
Nathan Harold | 4bb9d31 | 2019-12-23 14:34:26 -0800 | [diff] [blame] | 24 | import @1.5::BarringInfo; |
Sarah Chin | 039d542 | 2019-11-05 15:39:32 -0800 | [diff] [blame] | 25 | import @1.5::DataProfileInfo; |
Nathan Harold | bacb821 | 2019-12-27 12:58:32 -0800 | [diff] [blame] | 26 | import @1.5::IndicationFilter; |
Jack Yu | 7f6c8d0 | 2019-12-09 14:02:56 -0800 | [diff] [blame] | 27 | import @1.5::LinkAddress; |
Sarah Chin | b7709bb | 2019-11-01 13:19:31 -0700 | [diff] [blame] | 28 | import @1.5::NetworkScanRequest; |
Nazish Tabassum | 79f575e | 2019-12-13 02:19:39 +0530 | [diff] [blame] | 29 | import @1.5::PersoSubstate; |
Sarah Chin | 3efba53 | 2019-12-18 17:37:27 -0800 | [diff] [blame] | 30 | import @1.5::RadioAccessNetworks; |
Sarah Chin | b7709bb | 2019-11-01 13:19:31 -0700 | [diff] [blame] | 31 | import @1.5::RadioAccessSpecifier; |
sqian | f1850bf | 2019-11-12 18:26:30 -0800 | [diff] [blame] | 32 | import @1.5::SignalThresholdInfo; |
Malcolm Chen | 360e1f9 | 2019-10-02 11:38:13 -0700 | [diff] [blame] | 33 | |
| 34 | /** |
| 35 | * This interface is used by telephony and telecom to talk to cellular radio. |
| 36 | * All the functions have minimum one parameter: |
| 37 | * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the |
| 38 | * duration of a method call. If clients provide colliding serials (including passing the same |
| 39 | * serial to different methods), multiple responses (one for each method call) must still be served. |
| 40 | * setResponseFunctions must work with @1.5::IRadioResponse and @1.5::IRadioIndication. |
| 41 | */ |
| 42 | interface IRadio extends @1.4::IRadio { |
sqian | f1850bf | 2019-11-12 18:26:30 -0800 | [diff] [blame] | 43 | /** |
| 44 | * Sets the signal strength reporting criteria. |
| 45 | * |
| 46 | * The resulting reporting rules are the AND of all the supplied criteria. For each RAN |
| 47 | * The hysteresisDb and thresholds apply to only the following measured quantities: |
| 48 | * -GERAN - RSSI |
| 49 | * -CDMA2000 - RSSI |
| 50 | * -UTRAN - RSCP |
| 51 | * -EUTRAN - RSRP/RSRQ/RSSNR |
| 52 | * -NGRAN - SSRSRP/SSRSRQ/SSSINR |
| 53 | * |
Shuo Qian | 511264a | 2019-11-26 19:37:05 -0800 | [diff] [blame] | 54 | * Note: Reporting criteria must be individually set for each RAN. For each RAN, if none of |
| 55 | * reporting criteria of any measurement is set enabled |
| 56 | * (see @1.5::SignalThresholdInfo.isEnabled), the reporting criteria for this RAN is |
| 57 | * implementation-defined. For each RAN, if any of reporting criteria of any measure is set |
| 58 | * enabled, the reporting criteria of the other measures in this RAN are set disabled |
| 59 | * (see @1.5::SignalThresholdInfo.isEnabled) until they are set enabled. |
sqian | f1850bf | 2019-11-12 18:26:30 -0800 | [diff] [blame] | 60 | * |
| 61 | * Response callback is |
| 62 | * IRadioResponse.setSignalStrengthReportingCriteriaResponse_1_5() |
| 63 | * |
| 64 | * @param serial Serial number of request. |
| 65 | * @param signalThresholdInfo Signal threshold info including the threshold values, |
Shuo Qian | 511264a | 2019-11-26 19:37:05 -0800 | [diff] [blame] | 66 | * hysteresisDb, hysteresisMs and isEnabled. |
| 67 | * See @1.5::SignalThresholdInfo for details. |
sqian | f1850bf | 2019-11-12 18:26:30 -0800 | [diff] [blame] | 68 | * @param accessNetwork The type of network for which to apply these thresholds. |
| 69 | */ |
| 70 | oneway setSignalStrengthReportingCriteria_1_5(int32_t serial, |
| 71 | SignalThresholdInfo signalThresholdInfo, AccessNetwork accessNetwork); |
Malcolm Chen | fb6d624 | 2019-11-12 19:03:12 -0800 | [diff] [blame] | 72 | |
| 73 | /** |
| 74 | * Enable or disable UiccApplications on the SIM. If disabled: |
| 75 | * - Modem will not register on any network. |
| 76 | * - SIM must be PRESENT, and the IccId of the SIM must still be accessible. |
| 77 | * - The corresponding modem stack is still functional, e.g. able to make emergency calls or |
| 78 | * do network scan. |
| 79 | * By default if this API is not called, the uiccApplications must be enabled automatically. |
| 80 | * It must work for both single SIM and DSDS cases for UX consistency. |
| 81 | * The preference is per SIM, and must be remembered over power cycle, modem reboot, or SIM |
| 82 | * insertion / unplug. |
| 83 | * |
Malcolm Chen | 2e7b82a | 2019-12-10 18:54:23 -0800 | [diff] [blame] | 84 | * @param serial Serial number of request. |
| 85 | * @param enable true if to enable uiccApplications, false to disable. |
Malcolm Chen | fb6d624 | 2019-11-12 19:03:12 -0800 | [diff] [blame] | 86 | |
| 87 | * Response callback is IRadioResponse.enableUiccApplicationsResponse() |
| 88 | */ |
| 89 | oneway enableUiccApplications(int32_t serial, bool enable); |
| 90 | |
| 91 | /** |
| 92 | * Whether uiccApplications are enabled, or disabled. |
| 93 | * |
| 94 | * By default uiccApplications must be enabled, unless enableUiccApplications() with enable |
| 95 | * being false is called. |
| 96 | * |
| 97 | * @param serial Serial number of request. |
| 98 | * |
| 99 | * Response callback is IRadioResponse.areUiccApplicationsEnabledResponse() |
| 100 | */ |
| 101 | oneway areUiccApplicationsEnabled(int32_t serial); |
| 102 | |
| 103 | /** |
Sarah Chin | b7709bb | 2019-11-01 13:19:31 -0700 | [diff] [blame] | 104 | * Specify which bands modem's background scan must act on. |
| 105 | * If specifyChannels is true, it only scans bands specified in specifiers. |
| 106 | * If specifyChannels is false, it scans all bands. |
| 107 | * |
| 108 | * For example, CBRS is only on LTE band 48. By specifying this band, |
| 109 | * modem saves more power. |
| 110 | * |
| 111 | * @param serial Serial number of request. |
| 112 | * @param specifyChannels whether to scan bands defined in specifiers. |
| 113 | * @param specifiers which bands to scan. Only used if specifyChannels is true. |
| 114 | * |
| 115 | * Response callback is IRadioResponse.setSystemSelectionChannelsResponse() |
| 116 | */ |
| 117 | oneway setSystemSelectionChannels_1_5(int32_t serial, bool specifyChannels, |
| 118 | vec<RadioAccessSpecifier> specifiers); |
| 119 | |
| 120 | /** |
| 121 | * Starts a network scan |
| 122 | * |
| 123 | * @param serial Serial number of request. |
| 124 | * @param request Defines the radio networks/bands/channels which need to be scanned. |
| 125 | * |
| 126 | * Same API as @1.4::IRadio.startNetworkScan_1_4, except using |
| 127 | * 1.5 version of NetworkScanRequest |
| 128 | */ |
| 129 | oneway startNetworkScan_1_5(int32_t serial, NetworkScanRequest request); |
Sarah Chin | 039d542 | 2019-11-05 15:39:32 -0800 | [diff] [blame] | 130 | |
| 131 | /** |
| 132 | * Setup a packet data connection. If DataCallResponse.status returns DataCallFailCause:NONE, |
| 133 | * the data connection must be added to data calls and a unsolDataCallListChanged() must be |
| 134 | * sent. The call remains until removed by subsequent unsolDataCallIstChanged(). It may be |
| 135 | * lost due to many factors, including deactivateDataCall() being issued, the radio powered |
| 136 | * off, reception lost or even transient factors like congestion. This data call list is |
| 137 | * returned by getDataCallList() and dataCallListChanged(). |
| 138 | * |
| 139 | * The Radio is expected to: |
| 140 | * - Create one data call context. |
| 141 | * - Create and configure a dedicated interface for the context. |
| 142 | * - The interface must be point to point. |
| 143 | * - The interface is configured with one or more addresses and is capable of sending and |
| 144 | * receiving packets. The prefix length of the addresses must be /32 for IPv4 and /128 |
| 145 | * for IPv6. |
| 146 | * - Must not modify routing configuration related to this interface; routing management is |
| 147 | * exclusively within the purview of the Android OS. |
| 148 | * - Support simultaneous data call contexts up to DataRegStateResult.maxDataCalls specified |
| 149 | * in the response of getDataRegistrationState. |
| 150 | * |
| 151 | * @param serial Serial number of request. |
| 152 | * @param accessNetwork The access network to setup the data call. If the data connection cannot |
| 153 | * be established on the specified access network, the setup request must be failed. |
| 154 | * @param dataProfileInfo Data profile info. |
| 155 | * @param roamingAllowed Indicates whether or not data roaming is allowed by the user. |
| 156 | * @param reason The request reason. Must be DataRequestReason.NORMAL or |
| 157 | * DataRequestReason.HANDOVER. |
| 158 | * @param addresses If the reason is DataRequestReason.HANDOVER, this indicates the list of link |
Nathan Harold | 755bf30 | 2020-01-08 14:55:05 -0800 | [diff] [blame] | 159 | * addresses of the existing data connection. This parameter must be ignored unless reason |
| 160 | * is DataRequestReason.HANDOVER. |
Sarah Chin | 039d542 | 2019-11-05 15:39:32 -0800 | [diff] [blame] | 161 | * @param dnses If the reason is DataRequestReason.HANDOVER, this indicates the list of DNS |
| 162 | * addresses of the existing data connection. The format is defined in RFC-4291 section |
| 163 | * 2.2. For example, "192.0.1.3" or "2001:db8::1". This parameter must be ignored unless |
| 164 | * reason is DataRequestReason.HANDOVER. |
| 165 | * |
| 166 | * Response function is IRadioResponse.setupDataCallResponse_1_5() |
| 167 | * |
| 168 | * Note this API is the same as the 1.4 version except using the |
Nathan Harold | 755bf30 | 2020-01-08 14:55:05 -0800 | [diff] [blame] | 169 | * 1.5 AccessNetwork, DataProfileInto, and link addresses as the input param. |
Sarah Chin | 039d542 | 2019-11-05 15:39:32 -0800 | [diff] [blame] | 170 | */ |
| 171 | oneway setupDataCall_1_5(int32_t serial, AccessNetwork accessNetwork, |
| 172 | DataProfileInfo dataProfileInfo, bool roamingAllowed, |
Jack Yu | 7f6c8d0 | 2019-12-09 14:02:56 -0800 | [diff] [blame] | 173 | DataRequestReason reason, vec<LinkAddress> addresses, vec<string> dnses); |
Sarah Chin | 039d542 | 2019-11-05 15:39:32 -0800 | [diff] [blame] | 174 | |
| 175 | /** |
| 176 | * Set an apn to initial attach network |
| 177 | * |
| 178 | * @param serial Serial number of request. |
| 179 | * @param dataProfileInfo data profile containing APN settings |
| 180 | * |
| 181 | * Response callback is IRadioResponse.setInitialAttachApnResponse_1_5() |
| 182 | * |
| 183 | * Note this API is the same as the 1.4 version except using the 1.5 DataProfileInfo |
| 184 | * as the input param. |
| 185 | */ |
| 186 | oneway setInitialAttachApn_1_5(int32_t serial, DataProfileInfo dataProfileInfo); |
| 187 | |
| 188 | /** |
| 189 | * Send data profiles of the current carrier to the modem. |
| 190 | * |
| 191 | * @param serial Serial number of request. |
| 192 | * @param profiles Array of DataProfile to set. |
| 193 | * |
| 194 | * Response callback is IRadioResponse.setDataProfileResponse_1_5() |
| 195 | * |
| 196 | * Note this API is the same as the 1.4 version except using the 1.5 DataProfileInfo |
Nathan Harold | 755bf30 | 2020-01-08 14:55:05 -0800 | [diff] [blame] | 197 | * as the input param. |
Sarah Chin | 039d542 | 2019-11-05 15:39:32 -0800 | [diff] [blame] | 198 | */ |
| 199 | oneway setDataProfile_1_5(int32_t serial, vec<DataProfileInfo> profiles); |
Malcolm Chen | 8f8e3d7 | 2019-12-16 18:53:58 -0800 | [diff] [blame] | 200 | |
| 201 | /** |
| 202 | * Toggle radio on and off (for "airplane" mode) |
| 203 | * If the radio is turned off/on the radio modem subsystem |
| 204 | * is expected return to an initialized state. For instance, |
| 205 | * any voice and data calls must be terminated and all associated |
| 206 | * lists emptied. |
| 207 | * |
| 208 | * When setting radio power on to exit from airplane mode to place an emergency call on this |
| 209 | * logical modem, powerOn, forEmergencyCall and preferredForEmergencyCall must be true. In |
| 210 | * this case, this modem is optimized to scan only emergency call bands, until: |
| 211 | * 1) Emergency call is completed; or |
| 212 | * 2) Another setRadioPower_1_5 is issued with forEmergencyCall being false or |
| 213 | * preferredForEmergencyCall being false; or |
| 214 | * 3) Timeout after a long period of time. |
| 215 | * |
| 216 | * @param serial Serial number of request. |
| 217 | * @param powerOn To turn on radio -> on = true, to turn off radio -> on = false. |
| 218 | * @param forEmergencyCall To indication to radio if this request is due to emergency call. |
| 219 | * No effect if powerOn is false. |
| 220 | * @param preferredForEmergencyCall indicate whether the following emergency call will be sent |
| 221 | * on this modem or not. No effect if forEmergencyCall is false, or powerOn is false. |
| 222 | * |
| 223 | * Response callback is IRadioConfigResponse. setRadioPowerResponse_1_5. |
| 224 | */ |
| 225 | oneway setRadioPower_1_5(int32_t serial, bool powerOn, bool forEmergencyCall, |
| 226 | bool preferredForEmergencyCall); |
Nathan Harold | bacb821 | 2019-12-27 12:58:32 -0800 | [diff] [blame] | 227 | |
| 228 | /** |
| 229 | * Sets the indication filter. |
| 230 | * |
| 231 | * Prevents the reporting of specified unsolicited indications from the radio. This is used |
| 232 | * for power saving in instances when those indications are not needed. If unset, defaults to |
| 233 | * @1.2::IndicationFilter:ALL. |
| 234 | * |
| 235 | * @param serial Serial number of request. |
| 236 | * @param indicationFilter 32-bit bitmap of IndicationFilter. Bits set to 1 indicate the |
| 237 | * indications are enabled. See @1.5::IndicationFilter for the definition of each bit. |
| 238 | * |
| 239 | * Response callback is IRadioResponse.setIndicationFilterResponse() |
| 240 | */ |
| 241 | oneway setIndicationFilter_1_5(int32_t serial, bitfield<IndicationFilter> indicationFilter); |
Nathan Harold | 4bb9d31 | 2019-12-23 14:34:26 -0800 | [diff] [blame] | 242 | |
| 243 | /** |
| 244 | * Get all the barring info for the current camped cell applicable to the current user. |
| 245 | * |
| 246 | * @param serial Serial number of request. |
| 247 | * |
| 248 | * Response callback is IRadioResponse.getBarringInfoResponse() |
| 249 | */ |
| 250 | oneway getBarringInfo(int32_t serial); |
Nathan Harold | 8f6b67b | 2020-01-16 17:00:49 -0800 | [diff] [blame] | 251 | |
| 252 | /** |
| 253 | * Request current voice registration state |
| 254 | * |
| 255 | * @param serial Serial number of request. |
| 256 | * |
| 257 | * Response function is IRadioResponse.getVoiceRegistrationStateResponse_1_5() |
| 258 | */ |
| 259 | oneway getVoiceRegistrationState_1_5(int32_t serial); |
| 260 | |
| 261 | /** |
| 262 | * Request current data registration state |
| 263 | * |
| 264 | * @param serial Serial number of request. |
| 265 | * |
| 266 | * Response function is IRadioResponse.getDataRegistrationStateResponse_1_5() |
| 267 | */ |
| 268 | oneway getDataRegistrationState_1_5(int32_t serial); |
Sarah Chin | 3efba53 | 2019-12-18 17:37:27 -0800 | [diff] [blame] | 269 | |
| 270 | /* |
| 271 | * Manually select a specified network. |
| 272 | * This request must not respond until the new operator is selected and registered. |
| 273 | * Per TS 23.122, the RAN is just the initial suggested value. |
| 274 | * If registration fails, the RAN is not available afterwards, or the RAN is not within |
| 275 | * the network types specified by IRadio::setPreferredNetworkTypeBitmap, then the modem |
| 276 | * will need to select the next best RAN for network registration. |
| 277 | * |
| 278 | * @param serial Serial number of request. |
| 279 | * @param operatorNumeric String specifying MCCMNC of network to select (eg "310170"). |
| 280 | * @param ran Initial suggested radio access network type. If value is UNKNOWN, the modem |
| 281 | * will select the next best RAN for network registration. |
| 282 | * |
| 283 | * Response function is IRadioResponse.setNetworkSelectionModeManualResponse_1_5() |
| 284 | */ |
| 285 | oneway setNetworkSelectionModeManual_1_5(int32_t serial, string operatorNumeric, |
| 286 | RadioAccessNetworks ran); |
Nazish Tabassum | ba2f830 | 2019-12-10 14:35:09 +0530 | [diff] [blame] | 287 | |
| 288 | /** |
| 289 | * Send an SMS message. Identical to sendCdmaSms, |
| 290 | * except that more messages are expected to be sent soon. |
| 291 | * |
| 292 | * @param serial Serial number of request. |
| 293 | * @param sms Cdma Sms to be sent described by CdmaSmsMessage in types.hal |
| 294 | * |
| 295 | * Response callback is IRadioResponse.sendCdmaSMSExpectMoreResponse() |
| 296 | */ |
| 297 | oneway sendCdmaSmsExpectMore(int32_t serial, CdmaSmsMessage sms); |
Robert Greenwalt | d674835 | 2020-01-23 20:01:12 -0800 | [diff] [blame] | 298 | |
| 299 | /** |
Nazish Tabassum | 79f575e | 2019-12-13 02:19:39 +0530 | [diff] [blame] | 300 | * Requests that deactivates one category of the device personalization. |
| 301 | * |
| 302 | * @param serial Serial number of request. |
| 303 | * @param persoType SIM personalization type. |
| 304 | * @param controlKey depersonalization code corresponding to persoType |
| 305 | * |
| 306 | * Response function is IRadioResponse.supplySimDepersonalizationResponse() |
| 307 | */ |
| 308 | oneway supplySimDepersonalization(int32_t serial, PersoSubstate persoType, string controlKey); |
Malcolm Chen | 360e1f9 | 2019-10-02 11:38:13 -0700 | [diff] [blame] | 309 | }; |