blob: aa93ef328d9770dd03a2e6badbc96011f4c71cec [file] [log] [blame]
Malcolm Chen360e1f92019-10-02 11:38:13 -07001/*
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
17package android.hardware.radio@1.5;
18
19import @1.4::IRadio;
sqianf1850bf2019-11-12 18:26:30 -080020import @1.5::AccessNetwork;
Sarah Chinb7709bb2019-11-01 13:19:31 -070021import @1.5::NetworkScanRequest;
22import @1.5::RadioAccessSpecifier;
sqianf1850bf2019-11-12 18:26:30 -080023import @1.5::SignalThresholdInfo;
Malcolm Chen360e1f92019-10-02 11:38:13 -070024
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 */
33interface IRadio extends @1.4::IRadio {
sqianf1850bf2019-11-12 18:26:30 -080034 /**
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 *
Shuo Qian511264a2019-11-26 19:37:05 -080045 * Note: Reporting criteria must be individually set for each RAN. For each RAN, if none of
46 * reporting criteria of any measurement is set enabled
47 * (see @1.5::SignalThresholdInfo.isEnabled), the reporting criteria for this RAN is
48 * implementation-defined. For each RAN, if any of reporting criteria of any measure is set
49 * enabled, the reporting criteria of the other measures in this RAN are set disabled
50 * (see @1.5::SignalThresholdInfo.isEnabled) until they are set enabled.
sqianf1850bf2019-11-12 18:26:30 -080051 *
52 * Response callback is
53 * IRadioResponse.setSignalStrengthReportingCriteriaResponse_1_5()
54 *
55 * @param serial Serial number of request.
56 * @param signalThresholdInfo Signal threshold info including the threshold values,
Shuo Qian511264a2019-11-26 19:37:05 -080057 * hysteresisDb, hysteresisMs and isEnabled.
58 * See @1.5::SignalThresholdInfo for details.
sqianf1850bf2019-11-12 18:26:30 -080059 * @param accessNetwork The type of network for which to apply these thresholds.
60 */
61 oneway setSignalStrengthReportingCriteria_1_5(int32_t serial,
62 SignalThresholdInfo signalThresholdInfo, AccessNetwork accessNetwork);
Malcolm Chenfb6d6242019-11-12 19:03:12 -080063
64 /**
65 * Enable or disable UiccApplications on the SIM. If disabled:
66 * - Modem will not register on any network.
67 * - SIM must be PRESENT, and the IccId of the SIM must still be accessible.
68 * - The corresponding modem stack is still functional, e.g. able to make emergency calls or
69 * do network scan.
70 * By default if this API is not called, the uiccApplications must be enabled automatically.
71 * It must work for both single SIM and DSDS cases for UX consistency.
72 * The preference is per SIM, and must be remembered over power cycle, modem reboot, or SIM
73 * insertion / unplug.
74 *
75 * @param serial: Serial number of request.
76 * @param enable: true if to enable uiccApplications, false to disable.
77
78 * Response callback is IRadioResponse.enableUiccApplicationsResponse()
79 */
80 oneway enableUiccApplications(int32_t serial, bool enable);
81
82 /**
83 * Whether uiccApplications are enabled, or disabled.
84 *
85 * By default uiccApplications must be enabled, unless enableUiccApplications() with enable
86 * being false is called.
87 *
88 * @param serial Serial number of request.
89 *
90 * Response callback is IRadioResponse.areUiccApplicationsEnabledResponse()
91 */
92 oneway areUiccApplicationsEnabled(int32_t serial);
93
94 /**
95 * Query whether disabling and enabling UiccApplications functionality is supported. If not,
96 * calling enableUiccApplications with a different value will return
97 * RadioError:REQUEST_NOT_SUPPORTED.
98 *
99 * @param serial Serial number of request.
100 *
101 * Response callback is IRadioResponse.canToggleUiccApplicationsEnablementResponse()
102 */
103 oneway canToggleUiccApplicationsEnablement(int32_t serial);
Sarah Chinb7709bb2019-11-01 13:19:31 -0700104
105 /**
106 * Specify which bands modem's background scan must act on.
107 * If specifyChannels is true, it only scans bands specified in specifiers.
108 * If specifyChannels is false, it scans all bands.
109 *
110 * For example, CBRS is only on LTE band 48. By specifying this band,
111 * modem saves more power.
112 *
113 * @param serial Serial number of request.
114 * @param specifyChannels whether to scan bands defined in specifiers.
115 * @param specifiers which bands to scan. Only used if specifyChannels is true.
116 *
117 * Response callback is IRadioResponse.setSystemSelectionChannelsResponse()
118 */
119 oneway setSystemSelectionChannels_1_5(int32_t serial, bool specifyChannels,
120 vec<RadioAccessSpecifier> specifiers);
121
122 /**
123 * Starts a network scan
124 *
125 * @param serial Serial number of request.
126 * @param request Defines the radio networks/bands/channels which need to be scanned.
127 *
128 * Same API as @1.4::IRadio.startNetworkScan_1_4, except using
129 * 1.5 version of NetworkScanRequest
130 */
131 oneway startNetworkScan_1_5(int32_t serial, NetworkScanRequest request);
Malcolm Chen360e1f92019-10-02 11:38:13 -0700132};