1 /*
2  * Copyright (C) 2006 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 com.android.internal.telephony;
18 
19 import android.compat.annotation.UnsupportedAppUsage;
20 import android.sysprop.TelephonyProperties;
21 
22 import java.util.Optional;
23 
24 /**
25  * {@hide}
26  */
27 public interface RILConstants {
28     // From the top of ril.cpp
29     int RIL_ERRNO_INVALID_RESPONSE = -1;
30 
31     // from RIL_Errno
32     int SUCCESS = 0;
33     int RADIO_NOT_AVAILABLE = 1;                    /* If radio did not start or is resetting */
34     int GENERIC_FAILURE = 2;
35     int PASSWORD_INCORRECT = 3;                     /* for PIN/PIN2 methods only! */
36     int SIM_PIN2 = 4;                               /* Operation requires SIM PIN2 to be entered */
37     int SIM_PUK2 = 5;                               /* Operation requires SIM PIN2 to be entered */
38     int REQUEST_NOT_SUPPORTED = 6;
39     int REQUEST_CANCELLED = 7;
40     int OP_NOT_ALLOWED_DURING_VOICE_CALL = 8;       /* data operation is not allowed during voice
41                                                        call in class C */
42     int OP_NOT_ALLOWED_BEFORE_REG_NW = 9;           /* request is not allowed before device
43                                                        registers to network */
44     int SMS_SEND_FAIL_RETRY = 10;                   /* send sms fail and need retry */
45     int SIM_ABSENT = 11;                            /* ICC card is absent */
46     int SUBSCRIPTION_NOT_AVAILABLE = 12;            /* fail to find CDMA subscription from specified
47                                                        location */
48     int MODE_NOT_SUPPORTED = 13;                    /* HW does not support preferred network type */
49     int FDN_CHECK_FAILURE = 14;                     /* send operation barred error when FDN is
50                                                        enabled */
51     int ILLEGAL_SIM_OR_ME = 15;                     /* network selection failure due to wrong
52                                                        SIM/ME and no retries needed */
53     int MISSING_RESOURCE = 16;                      /* no logical channel available */
54     int NO_SUCH_ELEMENT = 17;                       /* application not found on SIM */
55     int DIAL_MODIFIED_TO_USSD = 18;                 /* DIAL request modified to USSD */
56     int DIAL_MODIFIED_TO_SS = 19;                   /* DIAL request modified to SS */
57     int DIAL_MODIFIED_TO_DIAL = 20;                 /* DIAL request modified to DIAL with
58                                                        different data*/
59     int USSD_MODIFIED_TO_DIAL = 21;                 /* USSD request modified to DIAL */
60     int USSD_MODIFIED_TO_SS = 22;                   /* USSD request modified to SS */
61     int USSD_MODIFIED_TO_USSD = 23;                 /* USSD request modified to different USSD
62                                                        request */
63     int SS_MODIFIED_TO_DIAL = 24;                   /* SS request modified to DIAL */
64     int SS_MODIFIED_TO_USSD = 25;                   /* SS request modified to USSD */
65     int SUBSCRIPTION_NOT_SUPPORTED = 26;            /* Subscription not supported */
66     int SS_MODIFIED_TO_SS = 27;                     /* SS request modified to different SS
67                                                        request */
68     int SIM_ALREADY_POWERED_OFF = 29;               /* SAP: 0x03, Error card aleready powered off */
69     int SIM_ALREADY_POWERED_ON = 30;                /* SAP: 0x05, Error card already powered on */
70     int SIM_DATA_NOT_AVAILABLE = 31;                /* SAP: 0x06, Error data not available */
71     int SIM_SAP_CONNECT_FAILURE = 32;
72     int SIM_SAP_MSG_SIZE_TOO_LARGE = 33;
73     int SIM_SAP_MSG_SIZE_TOO_SMALL = 34;
74     int SIM_SAP_CONNECT_OK_CALL_ONGOING = 35;
75     int LCE_NOT_SUPPORTED = 36;                     /* Link Capacity Estimation (LCE) not
76                                                        supported */
77     int NO_MEMORY = 37;                             /* Not sufficient memory to process the
78                                                        request */
79     int INTERNAL_ERR = 38;                          /* Hit unexpected vendor internal error
80                                                        scenario */
81     int SYSTEM_ERR = 39;                            /* Hit platform or system error */
82     int MODEM_ERR = 40;                             /* Hit unexpected modem error */
83     int INVALID_STATE = 41;                         /* Unexpected request for the current state */
84     int NO_RESOURCES = 42;                          /* Not sufficient resource to process the
85                                                        request */
86     int SIM_ERR = 43;                               /* Received error from SIM card */
87     int INVALID_ARGUMENTS = 44;                     /* Received invalid arguments in request */
88     int INVALID_SIM_STATE = 45;                     /* Can not process the request in current SIM
89                                                        state */
90     int INVALID_MODEM_STATE = 46;                   /* Can not process the request in current Modem
91                                                        state */
92     int INVALID_CALL_ID = 47;                       /* Received invalid call id in request */
93     int NO_SMS_TO_ACK = 48;                         /* ACK received when there is no SMS to ack */
94     int NETWORK_ERR = 49;                           /* Received error from network */
95     int REQUEST_RATE_LIMITED = 50;                  /* Operation denied due to overly-frequent
96                                                        requests */
97     int SIM_BUSY = 51;                              /* SIM is busy */
98     int SIM_FULL = 52;                              /* The target EF is full */
99     int NETWORK_REJECT = 53;                        /* Request is rejected by network */
100     int OPERATION_NOT_ALLOWED = 54;                 /* Not allowed the request now */
101     int EMPTY_RECORD = 55;                          /* The request record is empty */
102     int INVALID_SMS_FORMAT = 56;                    /* Invalid sms format */
103     int ENCODING_ERR = 57;                          /* Message not encoded properly */
104     int INVALID_SMSC_ADDRESS = 58;                  /* SMSC address specified is invalid */
105     int NO_SUCH_ENTRY = 59;                         /* No such entry present to perform the
106                                                        request */
107     int NETWORK_NOT_READY = 60;                     /* Network is not ready to perform the
108                                                        request */
109     int NOT_PROVISIONED = 61;                       /* Device doesnot have this value
110                                                        provisioned */
111     int NO_SUBSCRIPTION = 62;                       /* Device doesnot have subscription */
112     int NO_NETWORK_FOUND = 63;                      /* Network cannot be found */
113     int DEVICE_IN_USE = 64;                         /* Operation cannot be performed because the
114                                                        device is currently in use */
115     int ABORTED = 65;                               /* Operation aborted */
116     int INVALID_RESPONSE = 66;                      /* Invalid response sent by vendor code */
117     int SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED = 67; /* 1X voice and SMS are not allowed
118                                                        simulteneously */
119     int ACCESS_BARRED = 68;                         /* SMS access is barred */
120     int BLOCKED_DUE_TO_CALL = 69;                   /* SMS is blocked due to call control */
121     int RF_HARDWARE_ISSUE = 70;                     /* RF HW issue is detected */
122     int NO_RF_CALIBRATION_INFO = 71;                /* No RF calibration in device */
123     int ENCODING_NOT_SUPPORTED = 72;                /* The encoding scheme is not supported by
124                                                        either the network or the MS. */
125     int FEATURE_NOT_SUPPORTED = 73;                 /* The requesting feature is not supported by
126                                                        the service provider. */
127     int INVALID_CONTACT = 74;                       /* The contact to be added is either not
128                                                        existing or not valid. */
129     int MODEM_INCOMPATIBLE = 75;                    /* The modem of the MS is not compatible with
130                                                        the service provider. */
131     int NETWORK_TIMEOUT = 76;                       /* Modem timeout to receive ACK or response from
132                                                        network after sending a request to it. */
133     int NO_SATELLITE_SIGNAL = 77;                   /* Modem fails to communicate with the satellite
134                                                        network since there is no satellite signal.*/
135     int NOT_SUFFICIENT_ACCOUNT_BALANCE = 78;        /* The request cannot be performed since the
136                                                        subscriber's account balance is not
137                                                        sufficient. */
138     int RADIO_TECHNOLOGY_NOT_SUPPORTED = 79;        /* The radio technology is not supported by the
139                                                        service provider. */
140     int SUBSCRIBER_NOT_AUTHORIZED = 80;             /* The subscription is not authorized to
141                                                        register with the service provider. */
142     int SWITCHED_FROM_SATELLITE_TO_TERRESTRIAL = 81; /* While processing a request from the
143                                                        Framework the satellite modem detects
144                                                        terrestrial signal, aborts the request, and
145                                                        switches to the terrestrial network. */
146     int UNIDENTIFIED_SUBSCRIBER = 82;               /* The subscriber is not registered with the
147                                                        service provider */
148 
149     // Below is list of OEM specific error codes which can by used by OEMs in case they don't want to
150     // reveal particular replacement for Generic failure
151     int OEM_ERROR_1 = 501;
152     int OEM_ERROR_2 = 502;
153     int OEM_ERROR_3 = 503;
154     int OEM_ERROR_4 = 504;
155     int OEM_ERROR_5 = 505;
156     int OEM_ERROR_6 = 506;
157     int OEM_ERROR_7 = 507;
158     int OEM_ERROR_8 = 508;
159     int OEM_ERROR_9 = 509;
160     int OEM_ERROR_10 = 510;
161     int OEM_ERROR_11 = 511;
162     int OEM_ERROR_12 = 512;
163     int OEM_ERROR_13 = 513;
164     int OEM_ERROR_14 = 514;
165     int OEM_ERROR_15 = 515;
166     int OEM_ERROR_16 = 516;
167     int OEM_ERROR_17 = 517;
168     int OEM_ERROR_18 = 518;
169     int OEM_ERROR_19 = 519;
170     int OEM_ERROR_20 = 520;
171     int OEM_ERROR_21 = 521;
172     int OEM_ERROR_22 = 522;
173     int OEM_ERROR_23 = 523;
174     int OEM_ERROR_24 = 524;
175     int OEM_ERROR_25 = 525;
176 
177     /* NETWORK_MODE_* See ril.h RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE */
178     /** GSM, WCDMA (WCDMA preferred) */
179     int NETWORK_MODE_WCDMA_PREF = 0;
180 
181     /** GSM only */
182     int NETWORK_MODE_GSM_ONLY = 1;
183 
184     /** WCDMA only */
185     int NETWORK_MODE_WCDMA_ONLY = 2;
186 
187     /** GSM, WCDMA (auto mode, according to PRL) */
188     int NETWORK_MODE_GSM_UMTS = 3;
189 
190     /** CDMA and EvDo (auto mode, according to PRL) */
191     int NETWORK_MODE_CDMA = 4;
192 
193     /** CDMA only */
194     int NETWORK_MODE_CDMA_NO_EVDO = 5;
195 
196     /** EvDo only */
197     int NETWORK_MODE_EVDO_NO_CDMA = 6;
198 
199     /** GSM, WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
200     int NETWORK_MODE_GLOBAL = 7;
201 
202     /** LTE, CDMA and EvDo */
203     int NETWORK_MODE_LTE_CDMA_EVDO = 8;
204 
205     /** LTE, GSM and WCDMA */
206     int NETWORK_MODE_LTE_GSM_WCDMA = 9;
207 
208     /** LTE, CDMA, EvDo, GSM, and WCDMA */
209     int NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA = 10;
210 
211     /** LTE only mode. */
212     int NETWORK_MODE_LTE_ONLY = 11;
213 
214     /** LTE and WCDMA */
215     int NETWORK_MODE_LTE_WCDMA = 12;
216 
217     /** TD-SCDMA only */
218     int NETWORK_MODE_TDSCDMA_ONLY = 13;
219 
220     /** TD-SCDMA and WCDMA */
221     int NETWORK_MODE_TDSCDMA_WCDMA = 14;
222 
223     /** LTE and TD-SCDMA*/
224     int NETWORK_MODE_LTE_TDSCDMA = 15;
225 
226     /** TD-SCDMA and GSM */
227     int NETWORK_MODE_TDSCDMA_GSM = 16;
228 
229     /** TD-SCDMA, GSM and LTE */
230     int NETWORK_MODE_LTE_TDSCDMA_GSM = 17;
231 
232     /** TD-SCDMA, GSM and WCDMA */
233     int NETWORK_MODE_TDSCDMA_GSM_WCDMA = 18;
234 
235     /** LTE, TD-SCDMA and WCDMA */
236     int NETWORK_MODE_LTE_TDSCDMA_WCDMA = 19;
237 
238     /** LTE, TD-SCDMA, GSM, and WCDMA */
239     int NETWORK_MODE_LTE_TDSCDMA_GSM_WCDMA = 20;
240 
241     /** TD-SCDMA, CDMA, EVDO, GSM and WCDMA */
242     int NETWORK_MODE_TDSCDMA_CDMA_EVDO_GSM_WCDMA = 21;
243 
244     /** LTE, TDCSDMA, CDMA, EVDO, GSM and WCDMA */
245     int NETWORK_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA = 22;
246 
247     /** NR 5G only mode */
248     int NETWORK_MODE_NR_ONLY = 23;
249 
250     /** NR 5G, LTE */
251     int NETWORK_MODE_NR_LTE = 24;
252 
253     /** NR 5G, LTE, CDMA and EvDo */
254     int NETWORK_MODE_NR_LTE_CDMA_EVDO = 25;
255 
256     /** NR 5G, LTE, GSM and WCDMA */
257     int NETWORK_MODE_NR_LTE_GSM_WCDMA = 26;
258 
259     /** NR 5G, LTE, CDMA, EvDo, GSM and WCDMA */
260     int NETWORK_MODE_NR_LTE_CDMA_EVDO_GSM_WCDMA = 27;
261 
262     /** NR 5G, LTE and WCDMA */
263     int NETWORK_MODE_NR_LTE_WCDMA = 28;
264 
265     /** NR 5G, LTE and TDSCDMA */
266     int NETWORK_MODE_NR_LTE_TDSCDMA = 29;
267 
268     /** NR 5G, LTE, TD-SCDMA and GSM */
269     int NETWORK_MODE_NR_LTE_TDSCDMA_GSM = 30;
270 
271     /** NR 5G, LTE, TD-SCDMA, WCDMA */
272     int NETWORK_MODE_NR_LTE_TDSCDMA_WCDMA = 31;
273 
274     /** NR 5G, LTE, TD-SCDMA, GSM and WCDMA */
275     int NETWORK_MODE_NR_LTE_TDSCDMA_GSM_WCDMA = 32;
276 
277     /** NR 5G, LTE, TD-SCDMA, CDMA, EVDO, GSM and WCDMA */
278     int NETWORK_MODE_NR_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA = 33;
279 
280     @UnsupportedAppUsage
281     int PREFERRED_NETWORK_MODE = Optional.of(TelephonyProperties.default_network())
282             .filter(list -> !list.isEmpty())
283             .map(list -> list.get(0))
284             .orElse(NETWORK_MODE_WCDMA_PREF);
285 
286     int BAND_MODE_UNSPECIFIED = 0;      //"unspecified" (selected by baseband automatically)
287     int BAND_MODE_EURO = 1;             //"EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
288     int BAND_MODE_USA = 2;              //"US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
289     int BAND_MODE_JPN = 3;              //"JPN band" (WCDMA-800 / WCDMA-IMT-2000)
290     int BAND_MODE_AUS = 4;              //"AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
291     int BAND_MODE_AUS_2 = 5;            //"AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
292     int BAND_MODE_CELL_800 = 6;         //"Cellular" (800-MHz Band)
293     int BAND_MODE_PCS = 7;              //"PCS" (1900-MHz Band)
294     int BAND_MODE_JTACS = 8;            //"Band Class 3" (JTACS Band)
295     int BAND_MODE_KOREA_PCS = 9;        //"Band Class 4" (Korean PCS Band)
296     int BAND_MODE_5_450M = 10;          //"Band Class 5" (450-MHz Band)
297     int BAND_MODE_IMT2000 = 11;         //"Band Class 6" (2-GMHz IMT2000 Band)
298     int BAND_MODE_7_700M_2 = 12;        //"Band Class 7" (Upper 700-MHz Band)
299     int BAND_MODE_8_1800M = 13;         //"Band Class 8" (1800-MHz Band)
300     int BAND_MODE_9_900M = 14;          //"Band Class 9" (900-MHz Band)
301     int BAND_MODE_10_800M_2 = 15;       //"Band Class 10" (Secondary 800-MHz Band)
302     int BAND_MODE_EURO_PAMR_400M = 16;  //"Band Class 11" (400-MHz European PAMR Band)
303     int BAND_MODE_AWS = 17;             //"Band Class 15" (AWS Band)
304     int BAND_MODE_USA_2500M = 18;       //"Band Class 16" (US 2.5-GHz Band)
305 
306     int CDMA_CELL_BROADCAST_SMS_DISABLED = 1;
307     int CDMA_CELL_BROADCAST_SMS_ENABLED  = 0;
308 
309     int NO_PHONE = 0;
310     int GSM_PHONE = 1;
311     int CDMA_PHONE = 2;
312     int SIP_PHONE  = 3;
313     int THIRD_PARTY_PHONE = 4;
314     int IMS_PHONE = 5;
315     int CDMA_LTE_PHONE = 6;
316 
317     int LTE_ON_CDMA_UNKNOWN = -1;
318     int LTE_ON_CDMA_FALSE = 0;
319     int LTE_ON_CDMA_TRUE = 1;
320 
321     int SETUP_DATA_AUTH_NONE      = 0;
322     int SETUP_DATA_AUTH_PAP       = 1;
323     int SETUP_DATA_AUTH_CHAP      = 2;
324     int SETUP_DATA_AUTH_PAP_CHAP  = 3;
325 
326     /* LCE service related constants. */
327     int LCE_NOT_AVAILABLE = -1;
328     int LCE_STOPPED = 0;
329     int LCE_ACTIVE = 1;
330 
331     /**
332      * No restriction at all including voice/SMS/USSD/SS/AV64
333      * and packet data.
334      */
335     int RIL_RESTRICTED_STATE_NONE = 0x00;
336     /**
337      * Block emergency call due to restriction.
338      * But allow all normal voice/SMS/USSD/SS/AV64.
339      */
340     int RIL_RESTRICTED_STATE_CS_EMERGENCY = 0x01;
341     /**
342      * Block all normal voice/SMS/USSD/SS/AV64 due to restriction.
343      * Only Emergency call allowed.
344      */
345     int RIL_RESTRICTED_STATE_CS_NORMAL = 0x02;
346     /**
347      * Block all voice/SMS/USSD/SS/AV64
348      * including emergency call due to restriction.
349      */
350     int RIL_RESTRICTED_STATE_CS_ALL = 0x04;
351     /**
352      * Block packet data access due to restriction.
353      */
354     int RIL_RESTRICTED_STATE_PS_ALL = 0x10;
355 
356     /** Data profile for RIL_REQUEST_SETUP_DATA_CALL */
357     public static final int DATA_PROFILE_DEFAULT   = 0;
358     public static final int DATA_PROFILE_TETHERED  = 1;
359     public static final int DATA_PROFILE_IMS       = 2;
360     public static final int DATA_PROFILE_FOTA      = 3;
361     public static final int DATA_PROFILE_CBS       = 4;
362     public static final int DATA_PROFILE_OEM_BASE  = 1000;
363     public static final int DATA_PROFILE_INVALID   = 0xFFFFFFFF;
364 
365     /**
366      * The request/response/unsol message IDs below match RIL.h through Android O-MR1.
367      *
368      * RIL.h is at hardware/ril/include/telephony.ril.h; RIL support is deprecated and may
369      * be removed in the future.
370      *
371      * Messages defined after O-MR1 have no corresponding definition in RIL.h.
372      * P-and-later messages start at RIL_REQUEST_HAL_NON_RIL_BASE and
373      * RIL_UNSOL_HAL_NON_RIL_BASE.
374      */
375 
376     /* Requests begin */
377     int RIL_REQUEST_GET_SIM_STATUS = 1;
378     int RIL_REQUEST_ENTER_SIM_PIN = 2;
379     int RIL_REQUEST_ENTER_SIM_PUK = 3;
380     int RIL_REQUEST_ENTER_SIM_PIN2 = 4;
381     int RIL_REQUEST_ENTER_SIM_PUK2 = 5;
382     int RIL_REQUEST_CHANGE_SIM_PIN = 6;
383     int RIL_REQUEST_CHANGE_SIM_PIN2 = 7;
384     int RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION = 8;
385     int RIL_REQUEST_GET_CURRENT_CALLS = 9;
386     int RIL_REQUEST_DIAL = 10;
387     int RIL_REQUEST_GET_IMSI = 11;
388     int RIL_REQUEST_HANGUP = 12;
389     int RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND = 13;
390     int RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND = 14;
391     int RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE = 15;
392     int RIL_REQUEST_CONFERENCE = 16;
393     int RIL_REQUEST_UDUB = 17;
394     int RIL_REQUEST_LAST_CALL_FAIL_CAUSE = 18;
395     int RIL_REQUEST_SIGNAL_STRENGTH = 19;
396     int RIL_REQUEST_VOICE_REGISTRATION_STATE = 20;
397     int RIL_REQUEST_DATA_REGISTRATION_STATE = 21;
398     int RIL_REQUEST_OPERATOR = 22;
399     int RIL_REQUEST_RADIO_POWER = 23;
400     int RIL_REQUEST_DTMF = 24;
401     int RIL_REQUEST_SEND_SMS = 25;
402     int RIL_REQUEST_SEND_SMS_EXPECT_MORE = 26;
403     int RIL_REQUEST_SETUP_DATA_CALL = 27;
404     int RIL_REQUEST_SIM_IO = 28;
405     int RIL_REQUEST_SEND_USSD = 29;
406     int RIL_REQUEST_CANCEL_USSD = 30;
407     int RIL_REQUEST_GET_CLIR = 31;
408     int RIL_REQUEST_SET_CLIR = 32;
409     int RIL_REQUEST_QUERY_CALL_FORWARD_STATUS = 33;
410     int RIL_REQUEST_SET_CALL_FORWARD = 34;
411     int RIL_REQUEST_QUERY_CALL_WAITING = 35;
412     int RIL_REQUEST_SET_CALL_WAITING = 36;
413     int RIL_REQUEST_SMS_ACKNOWLEDGE = 37;
414     int RIL_REQUEST_GET_IMEI = 38;
415     int RIL_REQUEST_GET_IMEISV = 39;
416     int RIL_REQUEST_ANSWER = 40;
417     int RIL_REQUEST_DEACTIVATE_DATA_CALL = 41;
418     int RIL_REQUEST_QUERY_FACILITY_LOCK = 42;
419     int RIL_REQUEST_SET_FACILITY_LOCK = 43;
420     int RIL_REQUEST_CHANGE_BARRING_PASSWORD = 44;
421     int RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE = 45;
422     int RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC = 46;
423     int RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL = 47;
424     int RIL_REQUEST_QUERY_AVAILABLE_NETWORKS = 48;
425     int RIL_REQUEST_DTMF_START = 49;
426     int RIL_REQUEST_DTMF_STOP = 50;
427     int RIL_REQUEST_BASEBAND_VERSION = 51;
428     int RIL_REQUEST_SEPARATE_CONNECTION = 52;
429     int RIL_REQUEST_SET_MUTE = 53;
430     int RIL_REQUEST_GET_MUTE = 54;
431     int RIL_REQUEST_QUERY_CLIP = 55;
432     int RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE = 56;
433     int RIL_REQUEST_DATA_CALL_LIST = 57;
434     int RIL_REQUEST_RESET_RADIO = 58;
435     int RIL_REQUEST_OEM_HOOK_RAW = 59;
436     int RIL_REQUEST_OEM_HOOK_STRINGS = 60;
437     int RIL_REQUEST_SCREEN_STATE = 61;
438     int RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION = 62;
439     int RIL_REQUEST_WRITE_SMS_TO_SIM = 63;
440     int RIL_REQUEST_DELETE_SMS_ON_SIM = 64;
441     int RIL_REQUEST_SET_BAND_MODE = 65;
442     int RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE = 66;
443     int RIL_REQUEST_STK_GET_PROFILE = 67;
444     int RIL_REQUEST_STK_SET_PROFILE = 68;
445     int RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND = 69;
446     int RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE = 70;
447     int RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM = 71;
448     int RIL_REQUEST_EXPLICIT_CALL_TRANSFER = 72;
449     int RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE = 73;
450     int RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE = 74;
451     int RIL_REQUEST_GET_NEIGHBORING_CELL_IDS = 75;
452     int RIL_REQUEST_SET_LOCATION_UPDATES = 76;
453     int RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE = 77;
454     int RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE = 78;
455     int RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE = 79;
456     int RIL_REQUEST_SET_TTY_MODE = 80;
457     int RIL_REQUEST_QUERY_TTY_MODE = 81;
458     int RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE = 82;
459     int RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE = 83;
460     int RIL_REQUEST_CDMA_FLASH = 84;
461     int RIL_REQUEST_CDMA_BURST_DTMF = 85;
462     int RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY = 86;
463     int RIL_REQUEST_CDMA_SEND_SMS = 87;
464     int RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE = 88;
465     int RIL_REQUEST_GSM_GET_BROADCAST_CONFIG = 89;
466     int RIL_REQUEST_GSM_SET_BROADCAST_CONFIG = 90;
467     int RIL_REQUEST_GSM_BROADCAST_ACTIVATION = 91;
468     int RIL_REQUEST_CDMA_GET_BROADCAST_CONFIG = 92;
469     int RIL_REQUEST_CDMA_SET_BROADCAST_CONFIG = 93;
470     int RIL_REQUEST_CDMA_BROADCAST_ACTIVATION = 94;
471     int RIL_REQUEST_CDMA_SUBSCRIPTION = 95;
472     int RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM = 96;
473     int RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM = 97;
474     int RIL_REQUEST_DEVICE_IDENTITY = 98;
475     int RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE = 99;
476     int RIL_REQUEST_GET_SMSC_ADDRESS = 100;
477     int RIL_REQUEST_SET_SMSC_ADDRESS = 101;
478     int RIL_REQUEST_REPORT_SMS_MEMORY_STATUS = 102;
479     int RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING = 103;
480     int RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE = 104;
481     int RIL_REQUEST_ISIM_AUTHENTICATION = 105;
482     int RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU = 106;
483     int RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS = 107;
484     int RIL_REQUEST_VOICE_RADIO_TECH = 108;
485     int RIL_REQUEST_GET_CELL_INFO_LIST = 109;
486     int RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE = 110;
487     int RIL_REQUEST_SET_INITIAL_ATTACH_APN = 111;
488     int RIL_REQUEST_IMS_REGISTRATION_STATE = 112;
489     int RIL_REQUEST_IMS_SEND_SMS = 113;
490     int RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC = 114;
491     int RIL_REQUEST_SIM_OPEN_CHANNEL = 115;
492     int RIL_REQUEST_SIM_CLOSE_CHANNEL = 116;
493     int RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL = 117;
494     int RIL_REQUEST_NV_READ_ITEM = 118;
495     int RIL_REQUEST_NV_WRITE_ITEM = 119;
496     int RIL_REQUEST_NV_WRITE_CDMA_PRL = 120;
497     int RIL_REQUEST_NV_RESET_CONFIG = 121;
498     int RIL_REQUEST_SET_UICC_SUBSCRIPTION = 122;
499     int RIL_REQUEST_ALLOW_DATA = 123;
500     int RIL_REQUEST_GET_HARDWARE_CONFIG = 124;
501     int RIL_REQUEST_SIM_AUTHENTICATION = 125;
502     int RIL_REQUEST_GET_DC_RT_INFO = 126;
503     int RIL_REQUEST_SET_DC_RT_INFO_RATE = 127;
504     int RIL_REQUEST_SET_DATA_PROFILE = 128;
505     int RIL_REQUEST_SHUTDOWN = 129;
506     int RIL_REQUEST_GET_RADIO_CAPABILITY = 130;
507     int RIL_REQUEST_SET_RADIO_CAPABILITY = 131;
508     int RIL_REQUEST_START_LCE = 132;
509     int RIL_REQUEST_STOP_LCE = 133;
510     int RIL_REQUEST_PULL_LCEDATA = 134;
511     int RIL_REQUEST_GET_ACTIVITY_INFO = 135;
512     int RIL_REQUEST_SET_ALLOWED_CARRIERS = 136;
513     int RIL_REQUEST_GET_ALLOWED_CARRIERS = 137;
514     int RIL_REQUEST_SEND_DEVICE_STATE = 138;
515     int RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER = 139;
516     int RIL_REQUEST_SET_SIM_CARD_POWER = 140;
517     int RIL_REQUEST_SET_CARRIER_INFO_IMSI_ENCRYPTION = 141;
518     int RIL_REQUEST_START_NETWORK_SCAN = 142;
519     int RIL_REQUEST_STOP_NETWORK_SCAN = 143;
520     int RIL_REQUEST_START_KEEPALIVE = 144;
521     int RIL_REQUEST_STOP_KEEPALIVE = 145;
522     int RIL_REQUEST_ENABLE_MODEM = 146;
523     int RIL_REQUEST_GET_MODEM_STATUS = 147;
524     int RIL_REQUEST_CDMA_SEND_SMS_EXPECT_MORE = 148;
525     int RIL_REQUEST_GET_SIM_PHONEBOOK_CAPACITY = 149;
526     int RIL_REQUEST_GET_SIM_PHONEBOOK_RECORDS = 150;
527     int RIL_REQUEST_UPDATE_SIM_PHONEBOOK_RECORD = 151;
528     int RIL_REQUEST_DEVICE_IMEI = 152;
529     /* The following requests are not defined in RIL.h */
530     int RIL_REQUEST_HAL_NON_RIL_BASE = 200;
531     int RIL_REQUEST_GET_SLOT_STATUS = 200;
532     int RIL_REQUEST_SET_LOGICAL_TO_PHYSICAL_SLOT_MAPPING = 201;
533     int RIL_REQUEST_SET_SIGNAL_STRENGTH_REPORTING_CRITERIA = 202;
534     int RIL_REQUEST_SET_LINK_CAPACITY_REPORTING_CRITERIA = 203;
535     int RIL_REQUEST_SET_PREFERRED_DATA_MODEM = 204;
536     int RIL_REQUEST_EMERGENCY_DIAL = 205;
537     int RIL_REQUEST_GET_PHONE_CAPABILITY = 206;
538     int RIL_REQUEST_SWITCH_DUAL_SIM_CONFIG = 207;
539     int RIL_REQUEST_ENABLE_UICC_APPLICATIONS = 208;
540     int RIL_REQUEST_GET_UICC_APPLICATIONS_ENABLEMENT = 209;
541     int RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS = 210;
542     int RIL_REQUEST_GET_BARRING_INFO = 211;
543     int RIL_REQUEST_ENTER_SIM_DEPERSONALIZATION = 212;
544     int RIL_REQUEST_ENABLE_NR_DUAL_CONNECTIVITY = 213;
545     int RIL_REQUEST_IS_NR_DUAL_CONNECTIVITY_ENABLED = 214;
546     int RIL_REQUEST_ALLOCATE_PDU_SESSION_ID = 215;
547     int RIL_REQUEST_RELEASE_PDU_SESSION_ID = 216;
548     int RIL_REQUEST_START_HANDOVER = 217;
549     int RIL_REQUEST_CANCEL_HANDOVER = 218;
550     int RIL_REQUEST_GET_SYSTEM_SELECTION_CHANNELS = 219;
551     int RIL_REQUEST_GET_HAL_DEVICE_CAPABILITIES = 220;
552     int RIL_REQUEST_SET_DATA_THROTTLING = 221;
553     int RIL_REQUEST_SET_ALLOWED_NETWORK_TYPES_BITMAP = 222;
554     int RIL_REQUEST_GET_ALLOWED_NETWORK_TYPES_BITMAP = 223;
555     int RIL_REQUEST_GET_SLICING_CONFIG = 224;
556     int RIL_REQUEST_ENABLE_VONR = 225;
557     int RIL_REQUEST_IS_VONR_ENABLED = 226;
558     int RIL_REQUEST_SET_USAGE_SETTING = 227;
559     int RIL_REQUEST_GET_USAGE_SETTING = 228;
560     int RIL_REQUEST_SET_EMERGENCY_MODE = 229;
561     int RIL_REQUEST_TRIGGER_EMERGENCY_NETWORK_SCAN = 230;
562     int RIL_REQUEST_CANCEL_EMERGENCY_NETWORK_SCAN = 231;
563     int RIL_REQUEST_EXIT_EMERGENCY_MODE = 232;
564     int RIL_REQUEST_SET_SRVCC_CALL_INFO = 233;
565     int RIL_REQUEST_UPDATE_IMS_REGISTRATION_INFO = 234;
566     int RIL_REQUEST_START_IMS_TRAFFIC = 235;
567     int RIL_REQUEST_STOP_IMS_TRAFFIC = 236;
568     int RIL_REQUEST_SEND_ANBR_QUERY = 237;
569     int RIL_REQUEST_TRIGGER_EPS_FALLBACK = 238;
570     int RIL_REQUEST_SET_NULL_CIPHER_AND_INTEGRITY_ENABLED = 239;
571     int RIL_REQUEST_UPDATE_IMS_CALL_STATUS = 240;
572     int RIL_REQUEST_SET_N1_MODE_ENABLED = 241;
573     int RIL_REQUEST_IS_N1_MODE_ENABLED = 242;
574     int RIL_REQUEST_IS_NULL_CIPHER_AND_INTEGRITY_ENABLED = 259;
575 
576     /* Responses begin */
577     int RIL_RESPONSE_ACKNOWLEDGEMENT = 800;
578 
579     /* Unsols begin */
580     int RIL_UNSOL_RESPONSE_BASE = 1000;
581     int RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED = 1000;
582     int RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED = 1001;
583     int RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED = 1002;
584     int RIL_UNSOL_RESPONSE_NEW_SMS = 1003;
585     int RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT = 1004;
586     int RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM = 1005;
587     int RIL_UNSOL_ON_USSD = 1006;
588     int RIL_UNSOL_ON_USSD_REQUEST = 1007;
589     int RIL_UNSOL_NITZ_TIME_RECEIVED = 1008;
590     int RIL_UNSOL_SIGNAL_STRENGTH = 1009;
591     int RIL_UNSOL_DATA_CALL_LIST_CHANGED = 1010;
592     int RIL_UNSOL_SUPP_SVC_NOTIFICATION = 1011;
593     int RIL_UNSOL_STK_SESSION_END = 1012;
594     int RIL_UNSOL_STK_PROACTIVE_COMMAND = 1013;
595     int RIL_UNSOL_STK_EVENT_NOTIFY = 1014;
596     int RIL_UNSOL_STK_CALL_SETUP = 1015;
597     int RIL_UNSOL_SIM_SMS_STORAGE_FULL = 1016;
598     int RIL_UNSOL_SIM_REFRESH = 1017;
599     int RIL_UNSOL_CALL_RING = 1018;
600     int RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED = 1019;
601     int RIL_UNSOL_RESPONSE_CDMA_NEW_SMS = 1020;
602     int RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS = 1021;
603     int RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL = 1022;
604     int RIL_UNSOL_RESTRICTED_STATE_CHANGED = 1023;
605     int RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE = 1024;
606     int RIL_UNSOL_CDMA_CALL_WAITING = 1025;
607     int RIL_UNSOL_CDMA_OTA_PROVISION_STATUS = 1026;
608     int RIL_UNSOL_CDMA_INFO_REC = 1027;
609     int RIL_UNSOL_OEM_HOOK_RAW = 1028;
610     int RIL_UNSOL_RINGBACK_TONE = 1029;
611     int RIL_UNSOL_RESEND_INCALL_MUTE = 1030;
612     int RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED = 1031;
613     int RIL_UNSOL_CDMA_PRL_CHANGED = 1032;
614     int RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE = 1033;
615     int RIL_UNSOL_RIL_CONNECTED = 1034;
616     int RIL_UNSOL_VOICE_RADIO_TECH_CHANGED = 1035;
617     int RIL_UNSOL_CELL_INFO_LIST = 1036;
618     int RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED = 1037;
619     int RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED = 1038;
620     int RIL_UNSOL_SRVCC_STATE_NOTIFY = 1039;
621     int RIL_UNSOL_HARDWARE_CONFIG_CHANGED = 1040;
622     int RIL_UNSOL_DC_RT_INFO_CHANGED = 1041;
623     int RIL_UNSOL_RADIO_CAPABILITY = 1042;
624     int RIL_UNSOL_ON_SS = 1043;
625     int RIL_UNSOL_STK_CC_ALPHA_NOTIFY = 1044;
626     int RIL_UNSOL_LCEDATA_RECV = 1045;
627     int RIL_UNSOL_PCO_DATA = 1046;
628     int RIL_UNSOL_MODEM_RESTART = 1047;
629     int RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION = 1048;
630     int RIL_UNSOL_NETWORK_SCAN_RESULT = 1049;
631     int RIL_UNSOL_KEEPALIVE_STATUS = 1050;
632     int RIL_UNSOL_UNTHROTTLE_APN = 1052;
633     int RIL_UNSOL_RESPONSE_SIM_PHONEBOOK_CHANGED = 1053;
634     int RIL_UNSOL_RESPONSE_SIM_PHONEBOOK_RECORDS_RECEIVED = 1054;
635     int RIL_UNSOL_SLICING_CONFIG_CHANGED = 1055;
636 
637     /* The following unsols are not defined in RIL.h */
638     int RIL_UNSOL_HAL_NON_RIL_BASE = 1100;
639     int RIL_UNSOL_ICC_SLOT_STATUS = 1100;
640     int RIL_UNSOL_PHYSICAL_CHANNEL_CONFIG = 1101;
641     int RIL_UNSOL_EMERGENCY_NUMBER_LIST = 1102;
642     int RIL_UNSOL_UICC_APPLICATIONS_ENABLEMENT_CHANGED = 1103;
643     int RIL_UNSOL_REGISTRATION_FAILED = 1104;
644     int RIL_UNSOL_BARRING_INFO_CHANGED = 1105;
645     int RIL_UNSOL_EMERGENCY_NETWORK_SCAN_RESULT = 1106;
646     int RIL_UNSOL_TRIGGER_IMS_DEREGISTRATION = 1107;
647     int RIL_UNSOL_CONNECTION_SETUP_FAILURE = 1108;
648     int RIL_UNSOL_NOTIFY_ANBR = 1109;
649 }
650