blob: 77aad03730365dffc5532b4edb6a1b93bbbf64f7 [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;
27import @1.4::SimLockMultiSimPolicy;
sqian8ffbfa52018-08-29 20:26:03 -070028
29/**
30 * Interface declaring response functions to solicited radio requests.
31 */
Malcolm Chen638f0052018-11-26 13:11:03 -080032interface IRadioResponse extends @1.3::IRadioResponse {
sqian8ffbfa52018-08-29 20:26:03 -070033 /**
34 * @param info Response info struct containing response type, serial no. and error
sqian8ffbfa52018-08-29 20:26:03 -070035 *
36 * Valid errors returned:
37 * RadioError:NONE
38 * RadioError:RADIO_NOT_AVAILABLE (radio resetting)
39 * RadioError:DIAL_MODIFIED_TO_USSD
40 * RadioError:DIAL_MODIFIED_TO_SS
41 * RadioError:DIAL_MODIFIED_TO_DIAL
42 * RadioError:INVALID_ARGUMENTS
43 * RadioError:NO_MEMORY
44 * 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
54 * RadioError:CANCELLED
55 */
56 oneway emergencyDialResponse(RadioResponseInfo info);
Amruth Ramachandrand146a722018-09-10 20:48:49 -070057
58 /**
59 * @param info Response info struct containing response type, serial no. and error
Youming Ye9f94a152019-01-02 15:55:29 -080060 *
61 * Same API as @1.1::IRadioResponse.startNetworkScanResponse, except disallowing error codes
62 * OPERATION_NOT_ALLOWED and REQUEST_NOT_SUPPORTED.
63 *
64 * Valid errors returned:
65 * RadioError:NONE
66 * RadioError:RADIO_NOT_AVAILABLE
67 * RadioError:DEVICE_IN_USE
68 * RadioError:INTERNAL_ERR
69 * RadioError:NO_MEMORY
70 * RadioError:MODEM_ERR
71 * RadioError:INVALID_ARGUMENTS
72 */
73 oneway startNetworkScanResponse_1_4(RadioResponseInfo info);
74
75 /**
76 * @param info Response info struct containing response type, serial no. and error
Pengquan Meng1d4e8ae2018-11-07 16:22:32 -080077 * @param cellInfo List of current cell information known to radio
78 *
79 * Valid errors returned:
80 * RadioError:NONE
81 * RadioError:RADIO_NOT_AVAILABLE
82 * RadioError:INTERNAL_ERR
83 */
Malcolm Chen638f0052018-11-26 13:11:03 -080084 oneway getCellInfoListResponse_1_4(RadioResponseInfo info, vec<CellInfo> cellInfo);
Pengquan Meng1d4e8ae2018-11-07 16:22:32 -080085
86 /**
87 * @param info Response info struct containing response type, serial no. and error
Amruth Ramachandrand146a722018-09-10 20:48:49 -070088 * @param dataRegResponse Current Data registration response as defined by DataRegStateResult in
89 * types.hal
90 *
91 * Valid errors returned:
92 * RadioError:NONE
93 * RadioError:RADIO_NOT_AVAILABLE
94 * RadioError:INTERNAL_ERR
95 * RadioError:NOT_PROVISIONED
96 */
Malcolm Chen638f0052018-11-26 13:11:03 -080097 oneway getDataRegistrationStateResponse_1_4(RadioResponseInfo info,
Amruth Ramachandrand146a722018-09-10 20:48:49 -070098 DataRegStateResult dataRegResponse);
Jordan Liu398e84d2018-11-12 10:49:10 -080099
100 /**
101 * @param info Response info struct containing response type, serial no. and error
102 * @param cardStatus ICC card status as defined by CardStatus in types.hal
103 *
104 * Valid errors returned:
105 * RadioError:NONE
106 * RadioError:RADIO_NOT_AVAILABLE
107 * RadioError:INTERNAL_ERR
108 * RadioError:NO_MEMORY
109 * RadioError:NO_RESOURCES
110 * RadioError:CANCELLED
111 * RadioError:REQUEST_NOT_SUPPORTED
112 */
Malcolm Chen638f0052018-11-26 13:11:03 -0800113 oneway getIccCardStatusResponse_1_4(RadioResponseInfo info, CardStatus cardStatus);
Pengquan Meng1ed39242018-12-10 18:22:47 -0800114
115 /**
116 * @param info Response info struct containing response type, serial no. and error
117 * @param networkTypeBitmap a 32-bit bitmap of RadioAccessFamily.
118 *
119 * Valid errors returned:
120 * RadioError:NONE
121 * RadioError:RADIO_NOT_AVAILABLE
122 * RadioError:NO_MEMORY
123 * RadioError:INTERNAL_ERR
124 * RadioError:SYSTEM_ERR
125 * RadioError:INVALID_ARGUMENTS
126 * RadioError:MODEM_ERR
127 * RadioError:REQUEST_NOT_SUPPORTED
128 * RadioError:NO_RESOURCES
129 * RadioError:CANCELLED
130 */
131 oneway getPreferredNetworkTypeBitmapResponse(RadioResponseInfo info,
132 bitfield<RadioAccessFamily> networkTypeBitmap);
133
134 /**
135 * Callback of IRadio.setPreferredNetworkTypeBitmap(int, bitfield<RadioAccessFamily>)
136 *
137 * @param info Response info struct containing response type, serial no. and error
138 *
139 * Valid errors returned:
140 * RadioError:NONE
141 * RadioError:RADIO_NOT_AVAILABLE
142 * RadioError:OPERATION_NOT_ALLOWED
143 * RadioError:MODE_NOT_SUPPORTED
144 * RadioError:NO_MEMORY
145 * RadioError:INTERNAL_ERR
146 * RadioError:SYSTEM_ERR
147 * RadioError:INVALID_ARGUMENTS
148 * RadioError:MODEM_ERR
149 * RadioError:REQUEST_NOT_SUPPORTED
150 * RadioError:NO_RESOURCES
151 * RadioError:CANCELLED
152 */
153 oneway setPreferredNetworkTypeBitmapResponse(RadioResponseInfo info);
paulhu31aed672018-12-18 19:30:16 +0800154
155 /**
156 * @param info Response info struct containing response type, serial no. and error
157 * @param dcResponse List of DataCallResult as defined in types.hal
158 *
159 * Valid errors returned:
160 * RadioError:NONE
161 * RadioError:RADIO_NOT_AVAILABLE
162 * RadioError:INTERNAL_ERR
163 * RadioError:NO_MEMORY
164 * RadioError:NO_RESOURCES
165 * RadioError:CANCELLED
166 * RadioError:REQUEST_NOT_SUPPORTED
167 * RadioError:SIM_ABSENT
168 */
169 oneway getDataCallListResponse_1_4(RadioResponseInfo info, vec<SetupDataCallResult> dcResponse);
170
171 /**
172 * @param info Response info struct containing response type, serial no. and error
173 * @param dcResponse SetupDataCallResult defined in types.hal
174 *
175 * Valid errors returned:
176 * RadioError:NONE must be returned on both success and failure of setup with the
177 * DataCallResponse.status containing the actual status
178 * For all other errors the DataCallResponse is ignored.
179 * RadioError:RADIO_NOT_AVAILABLE
180 * RadioError:OP_NOT_ALLOWED_BEFORE_REG_TO_NW
181 * RadioError:OP_NOT_ALLOWED_DURING_VOICE_CALL
182 * RadioError:REQUEST_NOT_SUPPORTED
183 * RadioError:INVALID_ARGUMENTS
184 * RadioError:INTERNAL_ERR
185 * RadioError:NO_MEMORY
186 * RadioError:NO_RESOURCES
187 * RadioError:CANCELLED
188 * RadioError:SIM_ABSENT
189 */
190 oneway setupDataCallResponse_1_4(RadioResponseInfo info, SetupDataCallResult dcResponse);
Michele Berionneef9ab4a2018-11-27 19:01:59 -0800191
192 /**
193 * @param info Response info struct containing response type, serial no. and error
194 *
195 * Valid errors returned:
196 * RadioError:NONE
197 * RadioError:RADIO_NOT_AVAILABLE
198 * RadioError:INVALID_ARGUMENTS
199 * RadioError:REQUEST_NOT_SUPPORTED
200 */
201 oneway setAllowedCarriersResponse_1_4(RadioResponseInfo info);
202
203 /**
204 * Expected modem behavior:
205 * Return list of allowed carriers, and if all carriers are allowed.
206 *
207 * @param info Response info struct containing response type, serial no. and error
208 * @param carriers Carrier restriction information.
209 * @param multiSimPolicy Policy used for devices with multiple SIM cards.
210 *
211 * Valid errors returned:
212 * RadioError:NONE
213 * RadioError:RADIO_NOT_AVAILABLE
214 * RadioError:REQUEST_NOT_SUPPORTED
215 */
216 oneway getAllowedCarriersResponse_1_4(RadioResponseInfo info,
217 CarrierRestrictionsWithPriority carriers, SimLockMultiSimPolicy multiSimPolicy);
Pengquan Meng1ed39242018-12-10 18:22:47 -0800218};