blob: 6b8977d09c7d2269f77bbb52d8058388e0b24622 [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
sqian8ffbfa52018-08-29 20:26:03 -070043 * RadioError:NO_RESOURCES
44 * RadioError:INTERNAL_ERR
45 * RadioError:FDN_CHECK_FAILURE
46 * RadioError:MODEM_ERR
47 * RadioError:NO_SUBSCRIPTION
48 * RadioError:NO_NETWORK_FOUND
49 * RadioError:INVALID_CALL_ID
50 * RadioError:DEVICE_IN_USE
51 * RadioError:ABORTED
52 * RadioError:INVALID_MODEM_STATE
sqian8ffbfa52018-08-29 20:26:03 -070053 */
54 oneway emergencyDialResponse(RadioResponseInfo info);
Amruth Ramachandrand146a722018-09-10 20:48:49 -070055
56 /**
57 * @param info Response info struct containing response type, serial no. and error
Youming Ye9f94a152019-01-02 15:55:29 -080058 *
59 * Same API as @1.1::IRadioResponse.startNetworkScanResponse, except disallowing error codes
60 * OPERATION_NOT_ALLOWED and REQUEST_NOT_SUPPORTED.
61 *
62 * Valid errors returned:
63 * RadioError:NONE
64 * RadioError:RADIO_NOT_AVAILABLE
65 * RadioError:DEVICE_IN_USE
66 * RadioError:INTERNAL_ERR
Youming Ye9f94a152019-01-02 15:55:29 -080067 * RadioError:MODEM_ERR
68 * RadioError:INVALID_ARGUMENTS
69 */
70 oneway startNetworkScanResponse_1_4(RadioResponseInfo info);
71
72 /**
73 * @param info Response info struct containing response type, serial no. and error
Pengquan Meng1d4e8ae2018-11-07 16:22:32 -080074 * @param cellInfo List of current cell information known to radio
75 *
76 * Valid errors returned:
77 * RadioError:NONE
78 * RadioError:RADIO_NOT_AVAILABLE
79 * RadioError:INTERNAL_ERR
80 */
Malcolm Chen638f0052018-11-26 13:11:03 -080081 oneway getCellInfoListResponse_1_4(RadioResponseInfo info, vec<CellInfo> cellInfo);
Pengquan Meng1d4e8ae2018-11-07 16:22:32 -080082
83 /**
84 * @param info Response info struct containing response type, serial no. and error
Amruth Ramachandrand146a722018-09-10 20:48:49 -070085 * @param dataRegResponse Current Data registration response as defined by DataRegStateResult in
86 * types.hal
87 *
88 * Valid errors returned:
89 * RadioError:NONE
90 * RadioError:RADIO_NOT_AVAILABLE
91 * RadioError:INTERNAL_ERR
92 * RadioError:NOT_PROVISIONED
93 */
Malcolm Chen638f0052018-11-26 13:11:03 -080094 oneway getDataRegistrationStateResponse_1_4(RadioResponseInfo info,
Amruth Ramachandrand146a722018-09-10 20:48:49 -070095 DataRegStateResult dataRegResponse);
Jordan Liu398e84d2018-11-12 10:49:10 -080096
97 /**
98 * @param info Response info struct containing response type, serial no. and error
99 * @param cardStatus ICC card status as defined by CardStatus in types.hal
100 *
101 * Valid errors returned:
102 * RadioError:NONE
103 * RadioError:RADIO_NOT_AVAILABLE
104 * RadioError:INTERNAL_ERR
Jordan Liu398e84d2018-11-12 10:49:10 -0800105 * RadioError:NO_RESOURCES
Jordan Liu398e84d2018-11-12 10:49:10 -0800106 * RadioError:REQUEST_NOT_SUPPORTED
107 */
Malcolm Chen638f0052018-11-26 13:11:03 -0800108 oneway getIccCardStatusResponse_1_4(RadioResponseInfo info, CardStatus cardStatus);
Pengquan Meng1ed39242018-12-10 18:22:47 -0800109
110 /**
111 * @param info Response info struct containing response type, serial no. and error
112 * @param networkTypeBitmap a 32-bit bitmap of RadioAccessFamily.
113 *
114 * Valid errors returned:
115 * RadioError:NONE
116 * RadioError:RADIO_NOT_AVAILABLE
Pengquan Meng1ed39242018-12-10 18:22:47 -0800117 * RadioError:INTERNAL_ERR
Pengquan Meng1ed39242018-12-10 18:22:47 -0800118 * RadioError:INVALID_ARGUMENTS
119 * RadioError:MODEM_ERR
120 * RadioError:REQUEST_NOT_SUPPORTED
121 * RadioError:NO_RESOURCES
Pengquan Meng1ed39242018-12-10 18:22:47 -0800122 */
123 oneway getPreferredNetworkTypeBitmapResponse(RadioResponseInfo info,
124 bitfield<RadioAccessFamily> networkTypeBitmap);
125
126 /**
127 * Callback of IRadio.setPreferredNetworkTypeBitmap(int, bitfield<RadioAccessFamily>)
128 *
129 * @param info Response info struct containing response type, serial no. and error
130 *
131 * Valid errors returned:
132 * RadioError:NONE
133 * RadioError:RADIO_NOT_AVAILABLE
134 * RadioError:OPERATION_NOT_ALLOWED
135 * RadioError:MODE_NOT_SUPPORTED
Pengquan Meng1ed39242018-12-10 18:22:47 -0800136 * RadioError:INTERNAL_ERR
Pengquan Meng1ed39242018-12-10 18:22:47 -0800137 * RadioError:INVALID_ARGUMENTS
138 * RadioError:MODEM_ERR
139 * RadioError:REQUEST_NOT_SUPPORTED
140 * RadioError:NO_RESOURCES
Pengquan Meng1ed39242018-12-10 18:22:47 -0800141 */
142 oneway setPreferredNetworkTypeBitmapResponse(RadioResponseInfo info);
paulhu31aed672018-12-18 19:30:16 +0800143
144 /**
145 * @param info Response info struct containing response type, serial no. and error
146 * @param dcResponse List of DataCallResult as defined in types.hal
147 *
148 * Valid errors returned:
149 * RadioError:NONE
150 * RadioError:RADIO_NOT_AVAILABLE
151 * RadioError:INTERNAL_ERR
paulhu31aed672018-12-18 19:30:16 +0800152 * RadioError:NO_RESOURCES
paulhu31aed672018-12-18 19:30:16 +0800153 * RadioError:REQUEST_NOT_SUPPORTED
154 * RadioError:SIM_ABSENT
155 */
156 oneway getDataCallListResponse_1_4(RadioResponseInfo info, vec<SetupDataCallResult> dcResponse);
157
158 /**
159 * @param info Response info struct containing response type, serial no. and error
160 * @param dcResponse SetupDataCallResult defined in types.hal
161 *
162 * Valid errors returned:
163 * RadioError:NONE must be returned on both success and failure of setup with the
164 * DataCallResponse.status containing the actual status
165 * For all other errors the DataCallResponse is ignored.
166 * RadioError:RADIO_NOT_AVAILABLE
167 * RadioError:OP_NOT_ALLOWED_BEFORE_REG_TO_NW
168 * RadioError:OP_NOT_ALLOWED_DURING_VOICE_CALL
169 * RadioError:REQUEST_NOT_SUPPORTED
170 * RadioError:INVALID_ARGUMENTS
171 * RadioError:INTERNAL_ERR
paulhu31aed672018-12-18 19:30:16 +0800172 * RadioError:NO_RESOURCES
paulhu31aed672018-12-18 19:30:16 +0800173 * RadioError:SIM_ABSENT
174 */
175 oneway setupDataCallResponse_1_4(RadioResponseInfo info, SetupDataCallResult dcResponse);
Michele Berionneef9ab4a2018-11-27 19:01:59 -0800176
177 /**
178 * @param info Response info struct containing response type, serial no. and error
179 *
180 * Valid errors returned:
181 * RadioError:NONE
182 * RadioError:RADIO_NOT_AVAILABLE
183 * RadioError:INVALID_ARGUMENTS
184 * RadioError:REQUEST_NOT_SUPPORTED
185 */
186 oneway setAllowedCarriersResponse_1_4(RadioResponseInfo info);
187
188 /**
189 * Expected modem behavior:
190 * Return list of allowed carriers, and if all carriers are allowed.
191 *
192 * @param info Response info struct containing response type, serial no. and error
193 * @param carriers Carrier restriction information.
194 * @param multiSimPolicy Policy used for devices with multiple SIM cards.
195 *
196 * Valid errors returned:
197 * RadioError:NONE
198 * RadioError:RADIO_NOT_AVAILABLE
199 * RadioError:REQUEST_NOT_SUPPORTED
200 */
201 oneway getAllowedCarriersResponse_1_4(RadioResponseInfo info,
202 CarrierRestrictionsWithPriority carriers, SimLockMultiSimPolicy multiSimPolicy);
Pengquan Meng1ed39242018-12-10 18:22:47 -0800203};