1/* 2 * Copyright (C) 2020 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.6; 18 19import @1.0::SendSmsResult; 20import @1.4::RadioAccessFamily; 21import @1.5::IRadioResponse; 22import @1.5::RadioAccessSpecifier; 23import @1.6::Call; 24import @1.6::CellInfo; 25import @1.6::RegStateResult; 26import @1.6::RadioResponseInfo; 27import @1.6::SetupDataCallResult; 28import @1.6::SignalStrength; 29import @1.6::SlicingConfig; 30import @1.6::PhonebookCapacity; 31 32/** 33 * Interface declaring response functions to solicited radio requests. 34 */ 35interface IRadioResponse extends @1.5::IRadioResponse { 36 /** 37 * @param info Response info struct containing response type, serial no. and error 38 * 39 * Valid errors returned: 40 * RadioError:NONE 41 * RadioError:INTERNAL_ERR 42 * RadioError:INVALID_ARGUMENTS 43 * RadioError:RF_HARDWARE_ISSUE 44 * RadioError:NO_RF_CALIBRATION_INFO 45 */ 46 oneway setRadioPowerResponse_1_6(RadioResponseInfo info); 47 48 /** 49 * @param info Response info struct containing response type, serial no. and error 50 * @param dcResponse SetupDataCallResult defined in types.hal 51 * 52 * Valid errors returned: 53 * RadioError:NONE must be returned on both success and failure of setup with the 54 * DataCallResponse.status containing the actual status 55 * For all other errors the DataCallResponse is ignored. 56 * RadioError:RADIO_NOT_AVAILABLE 57 * RadioError:OP_NOT_ALLOWED_BEFORE_REG_TO_NW 58 * RadioError:OP_NOT_ALLOWED_DURING_VOICE_CALL 59 * RadioError:INVALID_ARGUMENTS 60 * RadioError:INTERNAL_ERR 61 * RadioError:NO_RESOURCES if the vendor is unable handle due to resources 62 * are full. 63 * RadioError:SIM_ABSENT 64 */ 65 oneway setupDataCallResponse_1_6(RadioResponseInfo info, SetupDataCallResult dcResponse); 66 67 /** 68 * @param info Response info struct containing response type, serial no. and error 69 * @param dcResponse List of SetupDataCallResult as defined in types.hal 70 * 71 * Valid errors returned: 72 * RadioError:NONE 73 * RadioError:RADIO_NOT_AVAILABLE 74 * RadioError:INTERNAL_ERR 75 * RadioError:SIM_ABSENT 76 */ 77 oneway getDataCallListResponse_1_6(RadioResponseInfo info, vec<SetupDataCallResult> dcResponse); 78 79 /** 80 * @param info Response info struct containing response type, serial no. and error 81 * @param sms Response to sms sent as defined by SendSmsResult in types.hal 82 * 83 * Valid errors returned: 84 * RadioError:NONE 85 * RadioError:RADIO_NOT_AVAILABLE 86 * RadioError:SMS_SEND_FAIL_RETRY 87 * RadioError:NETWORK_REJECT 88 * RadioError:INVALID_STATE 89 * RadioError:INVALID_ARGUMENTS 90 * RadioError:NO_MEMORY 91 * RadioError:REQUEST_RATE_LIMITED 92 * RadioError:INVALID_SMS_FORMAT 93 * RadioError:SYSTEM_ERR 94 * RadioError:ENCODING_ERR 95 * RadioError:INVALID_SMSC_ADDRESS 96 * RadioError:MODEM_ERR 97 * RadioError:NETWORK_ERR 98 * RadioError:INTERNAL_ERR 99 * RadioError:REQUEST_NOT_SUPPORTED 100 * RadioError:INVALID_MODEM_STATE 101 * RadioError:NETWORK_NOT_READY 102 * RadioError:OPERATION_NOT_ALLOWED 103 * RadioError:NO_RESOURCES 104 * RadioError:CANCELLED 105 * RadioError:SIM_ABSENT 106 * RadioError:ACCESS_BARRED 107 * RadioError:BLOCKED_DUE_TO_CALL 108 */ 109 oneway sendSmsResponse_1_6(RadioResponseInfo info, SendSmsResult sms); 110 111 /** 112 * @param info Response info struct containing response type, serial no. and error 113 * @param sms Response to sms sent as defined by SendSmsResult in types.hal 114 * 115 * Valid errors returned: 116 * RadioError:NONE 117 * RadioError:RADIO_NOT_AVAILABLE 118 * RadioError:SMS_SEND_FAIL_RETRY 119 * RadioError:NETWORK_REJECT 120 * RadioError:INVALID_STATE 121 * RadioError:INVALID_ARGUMENTS 122 * RadioError:NO_MEMORY 123 * RadioError:REQUEST_RATE_LIMITED 124 * RadioError:INVALID_SMS_FORMAT 125 * RadioError:SYSTEM_ERR 126 * RadioError:FDN_CHECK_FAILURE 127 * RadioError:ENCODING_ERR 128 * RadioError:INVALID_SMSC_ADDRESS 129 * RadioError:MODEM_ERR 130 * RadioError:NETWORK_ERR 131 * RadioError:INTERNAL_ERR 132 * RadioError:REQUEST_NOT_SUPPORTED 133 * RadioError:INVALID_MODEM_STATE 134 * RadioError:NETWORK_NOT_READY 135 * RadioError:OPERATION_NOT_ALLOWED 136 * RadioError:NO_RESOURCES 137 * RadioError:CANCELLED 138 * RadioError:SIM_ABSENT 139 * RadioError:ACCESS_BARRED 140 * RadioError:BLOCKED_DUE_TO_CALL 141 */ 142 oneway sendSmsExpectMoreResponse_1_6(RadioResponseInfo info, SendSmsResult sms); 143 144 /** 145 * @param info Response info struct containing response type, serial no. and error 146 * @param sms Sms result struct as defined by SendSmsResult in types.hal 147 * 148 * Valid errors returned: 149 * RadioError:NONE 150 * RadioError:RADIO_NOT_AVAILABLE 151 * RadioError:INVALID_ARGUMENTS 152 * RadioError:SMS_SEND_FAIL_RETRY 153 * RadioError:NETWORK_REJECT 154 * RadioError:INVALID_STATE 155 * RadioError:NO_MEMORY 156 * RadioError:REQUEST_RATE_LIMITED 157 * RadioError:INVALID_SMS_FORMAT 158 * RadioError:SYSTEM_ERR 159 * RadioError:FDN_CHECK_FAILURE 160 * RadioError:MODEM_ERR 161 * RadioError:NETWORK_ERR 162 * RadioError:ENCODING_ERR 163 * RadioError:INVALID_SMSC_ADDRESS 164 * RadioError:INTERNAL_ERR 165 * RadioError:SYSTEM_ERR 166 * RadioError:REQUEST_NOT_SUPPORTED 167 * RadioError:OPERATION_NOT_ALLOWED 168 * RadioError:ENCODING_ERR 169 * RadioError:NO_RESOURCES 170 * RadioError:CANCELLED 171 * RadioError:SIM_ABSENT 172 * RadioError:SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED 173 * RadioError:ACCESS_BARRED 174 * RadioError:BLOCKED_DUE_TO_CALL 175 */ 176 oneway sendCdmaSmsResponse_1_6(RadioResponseInfo info, SendSmsResult sms); 177 178 /** 179 * @param info Response info struct containing response type, serial no. and error 180 * @param sms Response to sms sent as defined by SendSmsResult in types.hal 181 * 182 * Valid errors returned: 183 * RadioError:NONE 184 * RadioError:RADIO_NOT_AVAILABLE 185 * RadioError:SMS_SEND_FAIL_RETRY 186 * RadioError:NETWORK_REJECT 187 * RadioError:INVALID_STATE 188 * RadioError:INVALID_ARGUMENTS 189 * RadioError:NO_MEMORY 190 * RadioError:REQUEST_RATE_LIMITED 191 * RadioError:INVALID_SMS_FORMAT 192 * RadioError:SYSTEM_ERR 193 * RadioError:FDN_CHECK_FAILURE 194 * RadioError:ENCODING_ERR 195 * RadioError:INVALID_SMSC_ADDRESS 196 * RadioError:MODEM_ERR 197 * RadioError:NETWORK_ERR 198 * RadioError:INTERNAL_ERR 199 * RadioError:REQUEST_NOT_SUPPORTED 200 * RadioError:INVALID_MODEM_STATE 201 * RadioError:NETWORK_NOT_READY 202 * RadioError:OPERATION_NOT_ALLOWED 203 * RadioError:NO_RESOURCES 204 * RadioError:CANCELLED 205 * RadioError:SIM_ABSENT 206 * RadioError:SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED 207 * RadioError:ACCESS_BARRED 208 * RadioError:BLOCKED_DUE_TO_CALL 209 */ 210 oneway sendCdmaSmsExpectMoreResponse_1_6(RadioResponseInfo info, SendSmsResult sms); 211 212 /** 213 * @param info Response info struct containing response type, serial no. and error 214 * 215 * Valid errors returned: 216 * RadioError:NONE 217 * RadioError:RADIO_NOT_AVAILABLE 218 * RadioError:INVALID_ARGUMENTS 219 * RadioError:SIM_ERR (indicates a timeout or other issue making the SIM unresponsive) 220 * 221 * Note that this differs from setSimCardPowerResponse_1_1 in that the response 222 * should only be sent once the request from setSimCardPower_1_6 is complete 223 * (the SIM has finished powering on or off). 224 */ 225 oneway setSimCardPowerResponse_1_6(RadioResponseInfo info); 226 227 /** 228 * @param info Response info struct containing response type, serial no. and error 229 * 230 * Valid errors returned: 231 * RadioError:NONE 232 * RadioError:RADIO_NOT_AVAILABLE 233 * RadioError:INTERNAL_ERR 234 * RadioError:REQUEST_NOT_SUPPORTED 235 * RadioError:INVALID_STATE 236 */ 237 oneway setNrDualConnectivityStateResponse(RadioResponseInfo info); 238 239 /** 240 * @param info Response info struct containing response type, serial no. and error 241 * 242 * @param isEnabled Indicates whether NR dual connectivity is enabled or not, True if enabled 243 * else false. 244 * Valid errors returned: 245 * RadioError:NONE 246 * RadioError:RADIO_NOT_AVAILABLE 247 * RadioError:INTERNAL_ERR 248 * RadioError:REQUEST_NOT_SUPPORTED 249 */ 250 oneway isNrDualConnectivityEnabledResponse(RadioResponseInfo info, bool isEnabled); 251 252 /** 253 * @param info Response info struct containing response type, serial no. and error 254 * @param id The allocated id. On an error, this is set to 0. 255 * 256 * Valid errors returned: 257 * RadioError:NONE 258 * RadioError:RADIO_NOT_AVAILABLE 259 * RadioError:INTERNAL_ERR 260 * RadioError:NO_RESOURCES- Indicates that no pdu session ids are available 261 * RadioError:REQUEST_NOT_SUPPORTED 262 */ 263 oneway allocatePduSessionIdResponse(RadioResponseInfo info, int32_t id); 264 265 /** 266 * @param info Response info struct containing response type, serial no. and error 267 * 268 * Valid errors returned: 269 * RadioError:NONE 270 * RadioError:RADIO_NOT_AVAILABLE 271 * RadioError:INTERNAL_ERR 272 * RadioError:NO_RESOURCES 273 * RadioError:REQUEST_NOT_SUPPORTED 274 */ 275 oneway releasePduSessionIdResponse(RadioResponseInfo info); 276 277 /** 278 * @param info Response info struct containing response type, serial no. and error 279 * 280 * Valid errors returned: 281 * RadioError:NONE 282 * RadioError:RADIO_NOT_AVAILABLE 283 * RadioError:INTERNAL_ERR 284 * RadioError:NO_RESOURCES 285 * RadioError:REQUEST_NOT_SUPPORTED 286 * RadioError:INVALID_CALL_ID 287 */ 288 oneway startHandoverResponse(RadioResponseInfo info); 289 290 /** 291 * @param info Response info struct containing response type, serial no. and error 292 * @param dcResponse Attributes of data call 293 * 294 * Valid errors returned: 295 * RadioError:NONE 296 * RadioError:RADIO_NOT_AVAILABLE 297 * RadioError:INTERNAL_ERR 298 * RadioError:NO_RESOURCES 299 * RadioError:REQUEST_NOT_SUPPORTED 300 * RadioError:INVALID_CALL_ID 301 */ 302 oneway cancelHandoverResponse(RadioResponseInfo info); 303 304 /** 305 * Callback of IRadio.setAllowedNetworkTypesBitmap(int, bitfield<RadioAccessFamily>) 306 * 307 * Valid errors returned: 308 * RadioError:NONE 309 * RadioError:RADIO_NOT_AVAILABLE 310 * RadioError:OPERATION_NOT_ALLOWED 311 * RadioError:MODE_NOT_SUPPORTED 312 * RadioError:INTERNAL_ERR 313 * RadioError:INVALID_ARGUMENTS 314 * RadioError:MODEM_ERR 315 * RadioError:REQUEST_NOT_SUPPORTED 316 * RadioError:NO_RESOURCES 317 */ 318 oneway setAllowedNetworkTypesBitmapResponse(RadioResponseInfo info); 319 320 /** 321 * Callback of IRadio.getAllowedNetworkTypesBitmap(int, bitfield<RadioAccessFamily>) 322 * @param info Response info struct containing response type, serial no. and error 323 * @param networkTypeBitmap a 32-bit bitmap of RadioAccessFamily. 324 * 325 * Valid errors returned: 326 * RadioError:NONE 327 * RadioError:RADIO_NOT_AVAILABLE 328 * RadioError:OPERATION_NOT_ALLOWED 329 * RadioError:MODE_NOT_SUPPORTED 330 * RadioError:INTERNAL_ERR 331 * RadioError:INVALID_ARGUMENTS 332 * RadioError:MODEM_ERR 333 * RadioError:REQUEST_NOT_SUPPORTED 334 * RadioError:NO_RESOURCES 335 */ 336 oneway getAllowedNetworkTypesBitmapResponse( 337 RadioResponseInfo info, bitfield<RadioAccessFamily> networkTypeBitmap); 338 339 /** 340 * @param info Response info struct containing response type, serial no. and error 341 * 342 * Valid errors returned: 343 * RadioError:NONE 344 * RadioError:RADIO_NOT_AVAILABLE 345 * RadioError:MODEM_ERR 346 * RadioError:INVALID_ARGUMENTS 347 * RadioError:REQUEST_NOT_SUPPORTED 348 */ 349 oneway setDataThrottlingResponse(RadioResponseInfo info); 350 351 /** 352 * @param info Response info struct containing response type, serial no. and error 353 * @param specifiers List of RadioAccessSpecifiers that are scanned. 354 * 355 * Valid errors returned: 356 * RadioError:NONE 357 * RadioError:RADIO_NOT_AVAILABLE 358 * RadioError:INTERNAL_ERR 359 * RadioError:INVALID_ARGUMENTS 360 */ 361 oneway getSystemSelectionChannelsResponse( 362 RadioResponseInfo info, vec<RadioAccessSpecifier> specifiers); 363 364 /** 365 * This is identical to getCellInfoListResponse_1_5 but uses an updated version of CellInfo. 366 * 367 * @param info Response info struct containing response type, serial no. and error 368 * @param cellInfo List of current cell information known to radio 369 * 370 * Valid errors returned: 371 * RadioError:NONE 372 * RadioError:RADIO_NOT_AVAILABLE 373 * RadioError:INTERNAL_ERR 374 */ 375 oneway getCellInfoListResponse_1_6(RadioResponseInfo info, vec<CellInfo> cellInfo); 376 377 /** 378 * This is identical to getSignalStrengthResponse_1_4 but uses an updated version of 379 * SignalStrength. 380 * 381 * @param signalStrength Current signal strength 382 * 383 * Valid errors returned: 384 * RadioError:NONE 385 * RadioError:RADIO_NOT_AVAILABLE 386 * RadioError:INTERNAL_ERR 387 */ 388 oneway getSignalStrengthResponse_1_6(RadioResponseInfo info, SignalStrength signalStrength); 389 390 /** 391 * @param info Response info struct containing response type, serial no. and error 392 * @param voiceRegResponse Current Voice registration response as defined by RegStateResult 393 * in types.hal 394 * 395 * Valid errors returned: 396 * RadioError:NONE 397 * RadioError:RADIO_NOT_AVAILABLE 398 * RadioError:INTERNAL_ERR 399 */ 400 oneway getVoiceRegistrationStateResponse_1_6(RadioResponseInfo info, 401 RegStateResult voiceRegResponse); 402 403 /** 404 * @param info Response info struct containing response type, serial no. and error 405 * @param dataRegResponse Current Data registration response as defined by RegStateResult in 406 * types.hal 407 * 408 * Valid errors returned: 409 * RadioError:NONE 410 * RadioError:RADIO_NOT_AVAILABLE 411 * RadioError:INTERNAL_ERR 412 * RadioError:NOT_PROVISIONED 413 */ 414 oneway getDataRegistrationStateResponse_1_6(RadioResponseInfo info, 415 RegStateResult dataRegResponse); 416 417 /** 418 * @param calls Current call list 419 * RadioError:NO_MEMORY 420 * RadioError:INTERNAL_ERR 421 * RadioError:SYSTEM_ERR 422 * RadioError:INVALID_ARGUMENTS 423 * RadioError:REQUEST_NOT_SUPPORTED 424 * RadioError:NO_RESOURCES 425 * RadioError:CANCELLED 426 */ 427 oneway getCurrentCallsResponse_1_6(RadioResponseInfo info, vec<Call> calls); 428 429 /** 430 * @param info Response info struct containing response type, serial no. and error 431 * @param slicingConfig Current slicing configuration 432 * 433 * Valid errors returned: 434 * RadioError:NONE 435 * RadioError:RADIO_NOT_AVAILABLE 436 * RadioError:INTERNAL_ERR 437 * RadioError:MODEM_ERR 438 * RadioError:REQUEST_NOT_SUPPORTED 439 */ 440 oneway getSlicingConfigResponse(RadioResponseInfo info, 441 SlicingConfig slicingConfig); 442 443 /** 444 * @param info Response info struct containing response type, serial no. and error 445 * Valid errors returned: 446 * RadioError:NONE 447 * RadioError:RADIO_NOT_AVAILABLE 448 * RadioError:REQUEST_NOT_SUPPORTED 449 * RadioError:INVALID_ARGUMENTS 450 * RadioError:INVALID_SIM_STATE 451 * RadioError:MODEM_ERR 452 * RadioError:INTERNAL_ERR 453 * REQUEST_NOT_SUPPORTED may only be returned on devices that don't support this API, 454 * indicated by the HAL capability CAPABILITY_SIM_PHONEBOOK_IN_MODEM. 455 */ 456 oneway getSimPhonebookRecordsResponse(RadioResponseInfo info); 457 458 /** 459 * @param info Response info struct containing response type, serial no. and error 460 * @param capacity Response capacity enum indicating response processing status 461 * 462 * Valid errors returned: 463 * RadioError:NONE 464 * RadioError:RADIO_NOT_AVAILABLE 465 * RadioError:REQUEST_NOT_SUPPORTED 466 * RadioError:INVALID_ARGUMENTS 467 * RadioError:INVALID_SIM_STATE 468 * RadioError:MODEM_ERR 469 * RadioError:INTERNAL_ERR 470 * REQUEST_NOT_SUPPORTED may only be returned on devices that don't support this API, 471 * indicated by the HAL capability CAPABILITY_SIM_PHONEBOOK_IN_MODEM. 472 */ 473 oneway getSimPhonebookCapacityResponse(RadioResponseInfo info, PhonebookCapacity capacity); 474 475 /** 476 * @param info Response info struct containing response type, serial no. and error 477 * @param updatedRecordIndex The index of the updated or inserted record in the phonebook and 478 * the minimum value is 1 479 * 480 * Valid errors returned: 481 * RadioError:NONE 482 * RadioError:RADIO_NOT_AVAILABLE 483 * RadioError:REQUEST_NOT_SUPPORTED 484 * RadioError:INVALID_ARGUMENTS 485 * RadioError:INVALID_SIM_STATE 486 * RadioError:MODEM_ERR 487 * RadioError:INTERNAL_ERR 488 * RadioError:SIM_ERR 489 * RadioError:NO_SUCH_ENTRY 490 * RadioError:NO_RESOURCES 491 * REQUEST_NOT_SUPPORTED may only be returned on devices that don't support this API, 492 * indicated by the HAL capability CAPABILITY_SIM_PHONEBOOK_IN_MODEM. 493 */ 494 oneway updateSimPhonebookRecordsResponse(RadioResponseInfo info, int32_t updatedRecordIndex); 495}; 496