blob: f43295ae714e92e80cab5dc31eb9a0df9f1b485d [file] [log] [blame]
sqian8ffbfa52018-08-29 20:26:03 -07001/*
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
Malcolm Chen638f0052018-11-26 13:11:03 -080017package android.hardware.radio@1.4;
sqian8ffbfa52018-08-29 20:26:03 -070018
19import @1.0::RadioResponseInfo;
Malcolm Chen638f0052018-11-26 13:11:03 -080020import @1.3::IRadioResponse;
Michele Berionneef9ab4a2018-11-27 19:01:59 -080021import @1.4::CardStatus;
22import @1.4::CarrierRestrictionsWithPriority;
23import @1.4::CellInfo;
24import @1.4::DataRegStateResult;
25import @1.4::RadioAccessFamily;
26import @1.4::SetupDataCallResult;
Pengquan Menge32a7552019-01-28 16:38:10 -080027import @1.4::SignalStrength;
Michele Berionneef9ab4a2018-11-27 19:01:59 -080028import @1.4::SimLockMultiSimPolicy;
sqian8ffbfa52018-08-29 20:26:03 -070029
30/**
31 * Interface declaring response functions to solicited radio requests.
32 */
Malcolm Chen638f0052018-11-26 13:11:03 -080033interface IRadioResponse extends @1.3::IRadioResponse {
sqian8ffbfa52018-08-29 20:26:03 -070034 /**
35 * @param info Response info struct containing response type, serial no. and error
sqian8ffbfa52018-08-29 20:26:03 -070036 *
37 * Valid errors returned:
38 * RadioError:NONE
39 * RadioError:RADIO_NOT_AVAILABLE (radio resetting)
40 * RadioError:DIAL_MODIFIED_TO_USSD
41 * RadioError:DIAL_MODIFIED_TO_SS
42 * RadioError:DIAL_MODIFIED_TO_DIAL
43 * RadioError:INVALID_ARGUMENTS
sqian8ffbfa52018-08-29 20:26:03 -070044 * RadioError:NO_RESOURCES
45 * RadioError:INTERNAL_ERR
46 * RadioError:FDN_CHECK_FAILURE
47 * RadioError:MODEM_ERR
48 * RadioError:NO_SUBSCRIPTION
49 * RadioError:NO_NETWORK_FOUND
50 * RadioError:INVALID_CALL_ID
51 * RadioError:DEVICE_IN_USE
52 * RadioError:ABORTED
53 * RadioError:INVALID_MODEM_STATE
sqian8ffbfa52018-08-29 20:26:03 -070054 */
55 oneway emergencyDialResponse(RadioResponseInfo info);
Amruth Ramachandrand146a722018-09-10 20:48:49 -070056
57 /**
58 * @param info Response info struct containing response type, serial no. and error
Youming Ye9f94a152019-01-02 15:55:29 -080059 *
60 * Same API as @1.1::IRadioResponse.startNetworkScanResponse, except disallowing error codes
61 * OPERATION_NOT_ALLOWED and REQUEST_NOT_SUPPORTED.
62 *
63 * Valid errors returned:
64 * RadioError:NONE
65 * RadioError:RADIO_NOT_AVAILABLE
66 * RadioError:DEVICE_IN_USE
67 * RadioError:INTERNAL_ERR
Youming Ye9f94a152019-01-02 15:55:29 -080068 * RadioError:MODEM_ERR
69 * RadioError:INVALID_ARGUMENTS
70 */
71 oneway startNetworkScanResponse_1_4(RadioResponseInfo info);
72
73 /**
74 * @param info Response info struct containing response type, serial no. and error
Pengquan Meng1d4e8ae2018-11-07 16:22:32 -080075 * @param cellInfo List of current cell information known to radio
76 *
77 * Valid errors returned:
78 * RadioError:NONE
79 * RadioError:RADIO_NOT_AVAILABLE
80 * RadioError:INTERNAL_ERR
81 */
Malcolm Chen638f0052018-11-26 13:11:03 -080082 oneway getCellInfoListResponse_1_4(RadioResponseInfo info, vec<CellInfo> cellInfo);
Pengquan Meng1d4e8ae2018-11-07 16:22:32 -080083
84 /**
85 * @param info Response info struct containing response type, serial no. and error
Amruth Ramachandrand146a722018-09-10 20:48:49 -070086 * @param dataRegResponse Current Data registration response as defined by DataRegStateResult in
87 * types.hal
88 *
89 * Valid errors returned:
90 * RadioError:NONE
91 * RadioError:RADIO_NOT_AVAILABLE
92 * RadioError:INTERNAL_ERR
93 * RadioError:NOT_PROVISIONED
94 */
Malcolm Chen638f0052018-11-26 13:11:03 -080095 oneway getDataRegistrationStateResponse_1_4(RadioResponseInfo info,
Amruth Ramachandrand146a722018-09-10 20:48:49 -070096 DataRegStateResult dataRegResponse);
Jordan Liu398e84d2018-11-12 10:49:10 -080097
98 /**
99 * @param info Response info struct containing response type, serial no. and error
100 * @param cardStatus ICC card status as defined by CardStatus in types.hal
101 *
102 * Valid errors returned:
103 * RadioError:NONE
104 * RadioError:RADIO_NOT_AVAILABLE
105 * RadioError:INTERNAL_ERR
Jordan Liu398e84d2018-11-12 10:49:10 -0800106 * RadioError:NO_RESOURCES
Jordan Liu398e84d2018-11-12 10:49:10 -0800107 * RadioError:REQUEST_NOT_SUPPORTED
108 */
Malcolm Chen638f0052018-11-26 13:11:03 -0800109 oneway getIccCardStatusResponse_1_4(RadioResponseInfo info, CardStatus cardStatus);
Pengquan Meng1ed39242018-12-10 18:22:47 -0800110
111 /**
112 * @param info Response info struct containing response type, serial no. and error
113 * @param networkTypeBitmap a 32-bit bitmap of RadioAccessFamily.
114 *
115 * Valid errors returned:
116 * RadioError:NONE
117 * RadioError:RADIO_NOT_AVAILABLE
Pengquan Meng1ed39242018-12-10 18:22:47 -0800118 * RadioError:INTERNAL_ERR
Pengquan Meng1ed39242018-12-10 18:22:47 -0800119 * RadioError:INVALID_ARGUMENTS
120 * RadioError:MODEM_ERR
121 * RadioError:REQUEST_NOT_SUPPORTED
122 * RadioError:NO_RESOURCES
Pengquan Meng1ed39242018-12-10 18:22:47 -0800123 */
124 oneway getPreferredNetworkTypeBitmapResponse(RadioResponseInfo info,
125 bitfield<RadioAccessFamily> networkTypeBitmap);
126
127 /**
128 * Callback of IRadio.setPreferredNetworkTypeBitmap(int, bitfield<RadioAccessFamily>)
129 *
130 * @param info Response info struct containing response type, serial no. and error
131 *
132 * Valid errors returned:
133 * RadioError:NONE
134 * RadioError:RADIO_NOT_AVAILABLE
135 * RadioError:OPERATION_NOT_ALLOWED
136 * RadioError:MODE_NOT_SUPPORTED
Pengquan Meng1ed39242018-12-10 18:22:47 -0800137 * RadioError:INTERNAL_ERR
Pengquan Meng1ed39242018-12-10 18:22:47 -0800138 * RadioError:INVALID_ARGUMENTS
139 * RadioError:MODEM_ERR
140 * RadioError:REQUEST_NOT_SUPPORTED
141 * RadioError:NO_RESOURCES
Pengquan Meng1ed39242018-12-10 18:22:47 -0800142 */
143 oneway setPreferredNetworkTypeBitmapResponse(RadioResponseInfo info);
paulhu31aed672018-12-18 19:30:16 +0800144
145 /**
146 * @param info Response info struct containing response type, serial no. and error
147 * @param dcResponse List of DataCallResult as defined in types.hal
148 *
149 * Valid errors returned:
150 * RadioError:NONE
151 * RadioError:RADIO_NOT_AVAILABLE
152 * RadioError:INTERNAL_ERR
paulhu31aed672018-12-18 19:30:16 +0800153 * RadioError:NO_RESOURCES
paulhu31aed672018-12-18 19:30:16 +0800154 * RadioError:REQUEST_NOT_SUPPORTED
155 * RadioError:SIM_ABSENT
156 */
157 oneway getDataCallListResponse_1_4(RadioResponseInfo info, vec<SetupDataCallResult> dcResponse);
158
159 /**
160 * @param info Response info struct containing response type, serial no. and error
161 * @param dcResponse SetupDataCallResult defined in types.hal
162 *
163 * Valid errors returned:
164 * RadioError:NONE must be returned on both success and failure of setup with the
165 * DataCallResponse.status containing the actual status
166 * For all other errors the DataCallResponse is ignored.
167 * RadioError:RADIO_NOT_AVAILABLE
168 * RadioError:OP_NOT_ALLOWED_BEFORE_REG_TO_NW
169 * RadioError:OP_NOT_ALLOWED_DURING_VOICE_CALL
170 * RadioError:REQUEST_NOT_SUPPORTED
171 * RadioError:INVALID_ARGUMENTS
172 * RadioError:INTERNAL_ERR
paulhu31aed672018-12-18 19:30:16 +0800173 * RadioError:NO_RESOURCES
paulhu31aed672018-12-18 19:30:16 +0800174 * RadioError:SIM_ABSENT
175 */
176 oneway setupDataCallResponse_1_4(RadioResponseInfo info, SetupDataCallResult dcResponse);
Michele Berionneef9ab4a2018-11-27 19:01:59 -0800177
178 /**
179 * @param info Response info struct containing response type, serial no. and error
180 *
181 * Valid errors returned:
182 * RadioError:NONE
183 * RadioError:RADIO_NOT_AVAILABLE
184 * RadioError:INVALID_ARGUMENTS
185 * RadioError:REQUEST_NOT_SUPPORTED
186 */
187 oneway setAllowedCarriersResponse_1_4(RadioResponseInfo info);
188
189 /**
190 * Expected modem behavior:
191 * Return list of allowed carriers, and if all carriers are allowed.
192 *
193 * @param info Response info struct containing response type, serial no. and error
194 * @param carriers Carrier restriction information.
195 * @param multiSimPolicy Policy used for devices with multiple SIM cards.
196 *
197 * Valid errors returned:
198 * RadioError:NONE
199 * RadioError:RADIO_NOT_AVAILABLE
200 * RadioError:REQUEST_NOT_SUPPORTED
201 */
202 oneway getAllowedCarriersResponse_1_4(RadioResponseInfo info,
203 CarrierRestrictionsWithPriority carriers, SimLockMultiSimPolicy multiSimPolicy);
Pengquan Menge32a7552019-01-28 16:38:10 -0800204
205 /**
206 * @param signalStrength Current signal strength
207 *
208 * Valid errors returned:
209 * RadioError:NONE
210 * RadioError:RADIO_NOT_AVAILABLE
211 * RadioError:INTERNAL_ERR
212 */
213 oneway getSignalStrengthResponse_1_4(RadioResponseInfo info, SignalStrength signalStrength);
Pengquan Meng1ed39242018-12-10 18:22:47 -0800214};