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 | |
| 19 | import @1.4::IRadio; |
sqian | f1850bf | 2019-11-12 18:26:30 -0800 | [diff] [blame] | 20 | import @1.5::AccessNetwork; |
Sarah Chin | b7709bb | 2019-11-01 13:19:31 -0700 | [diff] [blame] | 21 | import @1.5::NetworkScanRequest; |
| 22 | import @1.5::RadioAccessSpecifier; |
sqian | f1850bf | 2019-11-12 18:26:30 -0800 | [diff] [blame] | 23 | import @1.5::SignalThresholdInfo; |
Malcolm Chen | 360e1f9 | 2019-10-02 11:38:13 -0700 | [diff] [blame] | 24 | |
| 25 | /** |
| 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.5::IRadioResponse and @1.5::IRadioIndication. |
| 32 | */ |
| 33 | interface IRadio extends @1.4::IRadio { |
sqian | f1850bf | 2019-11-12 18:26:30 -0800 | [diff] [blame] | 34 | /** |
| 35 | * Sets the signal strength reporting criteria. |
| 36 | * |
| 37 | * The resulting reporting rules are the AND of all the supplied criteria. For each RAN |
| 38 | * The hysteresisDb and thresholds apply to only the following measured quantities: |
| 39 | * -GERAN - RSSI |
| 40 | * -CDMA2000 - RSSI |
| 41 | * -UTRAN - RSCP |
| 42 | * -EUTRAN - RSRP/RSRQ/RSSNR |
| 43 | * -NGRAN - SSRSRP/SSRSRQ/SSSINR |
| 44 | * |
| 45 | * Note: Reporting criteria must be individually set for each RAN. For any unset reporting |
| 46 | * criteria, the value is implementation-defined. |
| 47 | * |
| 48 | * Response callback is |
| 49 | * IRadioResponse.setSignalStrengthReportingCriteriaResponse_1_5() |
| 50 | * |
| 51 | * @param serial Serial number of request. |
| 52 | * @param signalThresholdInfo Signal threshold info including the threshold values, |
| 53 | * hysteresisDb, and hysteresisMs. See @1.5::SignalThresholdInfo |
| 54 | * for details. |
| 55 | * @param accessNetwork The type of network for which to apply these thresholds. |
| 56 | */ |
| 57 | oneway setSignalStrengthReportingCriteria_1_5(int32_t serial, |
| 58 | SignalThresholdInfo signalThresholdInfo, AccessNetwork accessNetwork); |
Malcolm Chen | fb6d624 | 2019-11-12 19:03:12 -0800 | [diff] [blame] | 59 | |
| 60 | /** |
| 61 | * Enable or disable UiccApplications on the SIM. If disabled: |
| 62 | * - Modem will not register on any network. |
| 63 | * - SIM must be PRESENT, and the IccId of the SIM must still be accessible. |
| 64 | * - The corresponding modem stack is still functional, e.g. able to make emergency calls or |
| 65 | * do network scan. |
| 66 | * By default if this API is not called, the uiccApplications must be enabled automatically. |
| 67 | * It must work for both single SIM and DSDS cases for UX consistency. |
| 68 | * The preference is per SIM, and must be remembered over power cycle, modem reboot, or SIM |
| 69 | * insertion / unplug. |
| 70 | * |
| 71 | * @param serial: Serial number of request. |
| 72 | * @param enable: true if to enable uiccApplications, false to disable. |
| 73 | |
| 74 | * Response callback is IRadioResponse.enableUiccApplicationsResponse() |
| 75 | */ |
| 76 | oneway enableUiccApplications(int32_t serial, bool enable); |
| 77 | |
| 78 | /** |
| 79 | * Whether uiccApplications are enabled, or disabled. |
| 80 | * |
| 81 | * By default uiccApplications must be enabled, unless enableUiccApplications() with enable |
| 82 | * being false is called. |
| 83 | * |
| 84 | * @param serial Serial number of request. |
| 85 | * |
| 86 | * Response callback is IRadioResponse.areUiccApplicationsEnabledResponse() |
| 87 | */ |
| 88 | oneway areUiccApplicationsEnabled(int32_t serial); |
| 89 | |
| 90 | /** |
| 91 | * Query whether disabling and enabling UiccApplications functionality is supported. If not, |
| 92 | * calling enableUiccApplications with a different value will return |
| 93 | * RadioError:REQUEST_NOT_SUPPORTED. |
| 94 | * |
| 95 | * @param serial Serial number of request. |
| 96 | * |
| 97 | * Response callback is IRadioResponse.canToggleUiccApplicationsEnablementResponse() |
| 98 | */ |
| 99 | oneway canToggleUiccApplicationsEnablement(int32_t serial); |
Sarah Chin | b7709bb | 2019-11-01 13:19:31 -0700 | [diff] [blame] | 100 | |
| 101 | /** |
| 102 | * Specify which bands modem's background scan must act on. |
| 103 | * If specifyChannels is true, it only scans bands specified in specifiers. |
| 104 | * If specifyChannels is false, it scans all bands. |
| 105 | * |
| 106 | * For example, CBRS is only on LTE band 48. By specifying this band, |
| 107 | * modem saves more power. |
| 108 | * |
| 109 | * @param serial Serial number of request. |
| 110 | * @param specifyChannels whether to scan bands defined in specifiers. |
| 111 | * @param specifiers which bands to scan. Only used if specifyChannels is true. |
| 112 | * |
| 113 | * Response callback is IRadioResponse.setSystemSelectionChannelsResponse() |
| 114 | */ |
| 115 | oneway setSystemSelectionChannels_1_5(int32_t serial, bool specifyChannels, |
| 116 | vec<RadioAccessSpecifier> specifiers); |
| 117 | |
| 118 | /** |
| 119 | * Starts a network scan |
| 120 | * |
| 121 | * @param serial Serial number of request. |
| 122 | * @param request Defines the radio networks/bands/channels which need to be scanned. |
| 123 | * |
| 124 | * Same API as @1.4::IRadio.startNetworkScan_1_4, except using |
| 125 | * 1.5 version of NetworkScanRequest |
| 126 | */ |
| 127 | oneway startNetworkScan_1_5(int32_t serial, NetworkScanRequest request); |
Malcolm Chen | 360e1f9 | 2019-10-02 11:38:13 -0700 | [diff] [blame] | 128 | }; |