• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package android.telephony;
2 
3 import android.annotation.IntDef;
4 import android.telecom.Connection;
5 import android.telephony.data.ApnSetting;
6 
7 import java.lang.annotation.Retention;
8 import java.lang.annotation.RetentionPolicy;
9 
10 /**
11  * Telephony Annotations.
12  * Telephony sdk is a mainline module and others cannot reference hidden @IntDef. Moving some
13  * telephony annotations to a separate class to allow others statically link to it.
14  *
15  * @hide
16  */
17 public class Annotation {
18     @IntDef(prefix = {"DATA_"}, value = {
19             TelephonyManager.DATA_ACTIVITY_NONE,
20             TelephonyManager.DATA_ACTIVITY_IN,
21             TelephonyManager.DATA_ACTIVITY_OUT,
22             TelephonyManager.DATA_ACTIVITY_INOUT,
23             TelephonyManager.DATA_ACTIVITY_DORMANT,
24     })
25     @Retention(RetentionPolicy.SOURCE)
26     public @interface DataActivityType {
27     }
28 
29     @IntDef(prefix = {"DATA_"}, value = {
30             TelephonyManager.DATA_UNKNOWN,
31             TelephonyManager.DATA_DISCONNECTED,
32             TelephonyManager.DATA_CONNECTING,
33             TelephonyManager.DATA_CONNECTED,
34             TelephonyManager.DATA_SUSPENDED,
35     })
36     @Retention(RetentionPolicy.SOURCE)
37     public @interface DataState {
38     }
39 
40     @Retention(RetentionPolicy.SOURCE)
41     @IntDef(prefix = {"RADIO_POWER_"},
42             value = {
43                     TelephonyManager.RADIO_POWER_OFF,
44                     TelephonyManager.RADIO_POWER_ON,
45                     TelephonyManager.RADIO_POWER_UNAVAILABLE,
46             })
47     public @interface RadioPowerState {
48     }
49 
50     @IntDef({
51             TelephonyManager.SIM_ACTIVATION_STATE_UNKNOWN,
52             TelephonyManager.SIM_ACTIVATION_STATE_ACTIVATING,
53             TelephonyManager.SIM_ACTIVATION_STATE_ACTIVATED,
54             TelephonyManager.SIM_ACTIVATION_STATE_DEACTIVATED,
55             TelephonyManager.SIM_ACTIVATION_STATE_RESTRICTED
56     })
57     @Retention(RetentionPolicy.SOURCE)
58     public @interface SimActivationState {
59     }
60 
61     @Retention(RetentionPolicy.SOURCE)
62     @IntDef(prefix = {"SRVCC_STATE_"},
63             value = {
64                     TelephonyManager.SRVCC_STATE_HANDOVER_NONE,
65                     TelephonyManager.SRVCC_STATE_HANDOVER_STARTED,
66                     TelephonyManager.SRVCC_STATE_HANDOVER_COMPLETED,
67                     TelephonyManager.SRVCC_STATE_HANDOVER_FAILED,
68                     TelephonyManager.SRVCC_STATE_HANDOVER_CANCELED})
69     public @interface SrvccState {
70     }
71 
72     @IntDef(prefix = {"CALL_STATE_"}, value = {
73             TelephonyManager.CALL_STATE_IDLE,
74             TelephonyManager.CALL_STATE_RINGING,
75             TelephonyManager.CALL_STATE_OFFHOOK
76     })
77     @Retention(RetentionPolicy.SOURCE)
78     public @interface CallState {
79     }
80 
81     @IntDef({
82             TelephonyManager.NETWORK_TYPE_UNKNOWN,
83             TelephonyManager.NETWORK_TYPE_GPRS,
84             TelephonyManager.NETWORK_TYPE_EDGE,
85             TelephonyManager.NETWORK_TYPE_UMTS,
86             TelephonyManager.NETWORK_TYPE_CDMA,
87             TelephonyManager.NETWORK_TYPE_EVDO_0,
88             TelephonyManager.NETWORK_TYPE_EVDO_A,
89             TelephonyManager.NETWORK_TYPE_1xRTT,
90             TelephonyManager.NETWORK_TYPE_HSDPA,
91             TelephonyManager.NETWORK_TYPE_HSUPA,
92             TelephonyManager.NETWORK_TYPE_HSPA,
93             TelephonyManager.NETWORK_TYPE_IDEN,
94             TelephonyManager.NETWORK_TYPE_EVDO_B,
95             TelephonyManager.NETWORK_TYPE_LTE,
96             TelephonyManager.NETWORK_TYPE_EHRPD,
97             TelephonyManager.NETWORK_TYPE_HSPAP,
98             TelephonyManager.NETWORK_TYPE_GSM,
99             TelephonyManager.NETWORK_TYPE_TD_SCDMA,
100             TelephonyManager.NETWORK_TYPE_IWLAN,
101 
102             //TODO: In order for @SystemApi methods to use this class, there cannot be any
103             // public hidden members.  This network type is marked as hidden because it is not a
104             // true network type and we are looking to remove it completely from the available list
105             // of network types.
106             //TelephonyManager.NETWORK_TYPE_LTE_CA,
107 
108             TelephonyManager.NETWORK_TYPE_NR,
109     })
110     @Retention(RetentionPolicy.SOURCE)
111     public @interface NetworkType {
112     }
113 
114     // TODO(b/180542000): remove and replace references with @ApnSetting.ApnType
115     @IntDef(flag = true, prefix = {"TYPE_"}, value = {
116             ApnSetting.TYPE_DEFAULT,
117             ApnSetting.TYPE_MMS,
118             ApnSetting.TYPE_SUPL,
119             ApnSetting.TYPE_DUN,
120             ApnSetting.TYPE_HIPRI,
121             ApnSetting.TYPE_FOTA,
122             ApnSetting.TYPE_IMS,
123             ApnSetting.TYPE_CBS,
124             ApnSetting.TYPE_IA,
125             ApnSetting.TYPE_EMERGENCY,
126             ApnSetting.TYPE_MCX,
127             ApnSetting.TYPE_XCAP,
128             // ApnSetting.TYPE_ENTERPRISE
129     })
130     @Retention(RetentionPolicy.SOURCE)
131     public @interface ApnType {
132     }
133 
134     @IntDef(value = {
135             DataFailCause.NONE,
136             DataFailCause.OPERATOR_BARRED,
137             DataFailCause.NAS_SIGNALLING,
138             DataFailCause.LLC_SNDCP,
139             DataFailCause.INSUFFICIENT_RESOURCES,
140             DataFailCause.MISSING_UNKNOWN_APN,
141             DataFailCause.UNKNOWN_PDP_ADDRESS_TYPE,
142             DataFailCause.USER_AUTHENTICATION,
143             DataFailCause.ACTIVATION_REJECT_GGSN,
144             DataFailCause.ACTIVATION_REJECT_UNSPECIFIED,
145             DataFailCause.SERVICE_OPTION_NOT_SUPPORTED,
146             DataFailCause.SERVICE_OPTION_NOT_SUBSCRIBED,
147             DataFailCause.SERVICE_OPTION_OUT_OF_ORDER,
148             DataFailCause.NSAPI_IN_USE,
149             DataFailCause.REGULAR_DEACTIVATION,
150             DataFailCause.QOS_NOT_ACCEPTED,
151             DataFailCause.NETWORK_FAILURE,
152             DataFailCause.UMTS_REACTIVATION_REQ,
153             DataFailCause.FEATURE_NOT_SUPP,
154             DataFailCause.TFT_SEMANTIC_ERROR,
155             DataFailCause.TFT_SYTAX_ERROR,
156             DataFailCause.UNKNOWN_PDP_CONTEXT,
157             DataFailCause.FILTER_SEMANTIC_ERROR,
158             DataFailCause.FILTER_SYTAX_ERROR,
159             DataFailCause.PDP_WITHOUT_ACTIVE_TFT,
160             DataFailCause.ACTIVATION_REJECTED_BCM_VIOLATION,
161             DataFailCause.ONLY_IPV4_ALLOWED,
162             DataFailCause.ONLY_IPV6_ALLOWED,
163             DataFailCause.ONLY_SINGLE_BEARER_ALLOWED,
164             DataFailCause.ESM_INFO_NOT_RECEIVED,
165             DataFailCause.PDN_CONN_DOES_NOT_EXIST,
166             DataFailCause.MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED,
167             DataFailCause.COLLISION_WITH_NETWORK_INITIATED_REQUEST,
168             DataFailCause.ONLY_IPV4V6_ALLOWED,
169             DataFailCause.ONLY_NON_IP_ALLOWED,
170             DataFailCause.UNSUPPORTED_QCI_VALUE,
171             DataFailCause.BEARER_HANDLING_NOT_SUPPORTED,
172             DataFailCause.ACTIVE_PDP_CONTEXT_MAX_NUMBER_REACHED,
173             DataFailCause.UNSUPPORTED_APN_IN_CURRENT_PLMN,
174             DataFailCause.INVALID_TRANSACTION_ID,
175             DataFailCause.MESSAGE_INCORRECT_SEMANTIC,
176             DataFailCause.INVALID_MANDATORY_INFO,
177             DataFailCause.MESSAGE_TYPE_UNSUPPORTED,
178             DataFailCause.MSG_TYPE_NONCOMPATIBLE_STATE,
179             DataFailCause.UNKNOWN_INFO_ELEMENT,
180             DataFailCause.CONDITIONAL_IE_ERROR,
181             DataFailCause.MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE,
182             DataFailCause.PROTOCOL_ERRORS,
183             DataFailCause.APN_TYPE_CONFLICT,
184             DataFailCause.INVALID_PCSCF_ADDR,
185             DataFailCause.INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN,
186             DataFailCause.EMM_ACCESS_BARRED,
187             DataFailCause.EMERGENCY_IFACE_ONLY,
188             DataFailCause.IFACE_MISMATCH,
189             DataFailCause.COMPANION_IFACE_IN_USE,
190             DataFailCause.IP_ADDRESS_MISMATCH,
191             DataFailCause.IFACE_AND_POL_FAMILY_MISMATCH,
192             DataFailCause.EMM_ACCESS_BARRED_INFINITE_RETRY,
193             DataFailCause.AUTH_FAILURE_ON_EMERGENCY_CALL,
194             DataFailCause.INVALID_DNS_ADDR,
195             DataFailCause.INVALID_PCSCF_OR_DNS_ADDRESS,
196             DataFailCause.CALL_PREEMPT_BY_EMERGENCY_APN,
197             DataFailCause.UE_INITIATED_DETACH_OR_DISCONNECT,
198             DataFailCause.MIP_FA_REASON_UNSPECIFIED,
199             DataFailCause.MIP_FA_ADMIN_PROHIBITED,
200             DataFailCause.MIP_FA_INSUFFICIENT_RESOURCES,
201             DataFailCause.MIP_FA_MOBILE_NODE_AUTHENTICATION_FAILURE,
202             DataFailCause.MIP_FA_HOME_AGENT_AUTHENTICATION_FAILURE,
203             DataFailCause.MIP_FA_REQUESTED_LIFETIME_TOO_LONG,
204             DataFailCause.MIP_FA_MALFORMED_REQUEST,
205             DataFailCause.MIP_FA_MALFORMED_REPLY,
206             DataFailCause.MIP_FA_ENCAPSULATION_UNAVAILABLE,
207             DataFailCause.MIP_FA_VJ_HEADER_COMPRESSION_UNAVAILABLE,
208             DataFailCause.MIP_FA_REVERSE_TUNNEL_UNAVAILABLE,
209             DataFailCause.MIP_FA_REVERSE_TUNNEL_IS_MANDATORY,
210             DataFailCause.MIP_FA_DELIVERY_STYLE_NOT_SUPPORTED,
211             DataFailCause.MIP_FA_MISSING_NAI,
212             DataFailCause.MIP_FA_MISSING_HOME_AGENT,
213             DataFailCause.MIP_FA_MISSING_HOME_ADDRESS,
214             DataFailCause.MIP_FA_UNKNOWN_CHALLENGE,
215             DataFailCause.MIP_FA_MISSING_CHALLENGE,
216             DataFailCause.MIP_FA_STALE_CHALLENGE,
217             DataFailCause.MIP_HA_REASON_UNSPECIFIED,
218             DataFailCause.MIP_HA_ADMIN_PROHIBITED,
219             DataFailCause.MIP_HA_INSUFFICIENT_RESOURCES,
220             DataFailCause.MIP_HA_MOBILE_NODE_AUTHENTICATION_FAILURE,
221             DataFailCause.MIP_HA_FOREIGN_AGENT_AUTHENTICATION_FAILURE,
222             DataFailCause.MIP_HA_REGISTRATION_ID_MISMATCH,
223             DataFailCause.MIP_HA_MALFORMED_REQUEST,
224             DataFailCause.MIP_HA_UNKNOWN_HOME_AGENT_ADDRESS,
225             DataFailCause.MIP_HA_REVERSE_TUNNEL_UNAVAILABLE,
226             DataFailCause.MIP_HA_REVERSE_TUNNEL_IS_MANDATORY,
227             DataFailCause.MIP_HA_ENCAPSULATION_UNAVAILABLE,
228             DataFailCause.CLOSE_IN_PROGRESS,
229             DataFailCause.NETWORK_INITIATED_TERMINATION,
230             DataFailCause.MODEM_APP_PREEMPTED,
231             DataFailCause.PDN_IPV4_CALL_DISALLOWED,
232             DataFailCause.PDN_IPV4_CALL_THROTTLED,
233             DataFailCause.PDN_IPV6_CALL_DISALLOWED,
234             DataFailCause.PDN_IPV6_CALL_THROTTLED,
235             DataFailCause.MODEM_RESTART,
236             DataFailCause.PDP_PPP_NOT_SUPPORTED,
237             DataFailCause.UNPREFERRED_RAT,
238             DataFailCause.PHYSICAL_LINK_CLOSE_IN_PROGRESS,
239             DataFailCause.APN_PENDING_HANDOVER,
240             DataFailCause.PROFILE_BEARER_INCOMPATIBLE,
241             DataFailCause.SIM_CARD_CHANGED,
242             DataFailCause.LOW_POWER_MODE_OR_POWERING_DOWN,
243             DataFailCause.APN_DISABLED,
244             DataFailCause.MAX_PPP_INACTIVITY_TIMER_EXPIRED,
245             DataFailCause.IPV6_ADDRESS_TRANSFER_FAILED,
246             DataFailCause.TRAT_SWAP_FAILED,
247             DataFailCause.EHRPD_TO_HRPD_FALLBACK,
248             DataFailCause.MIP_CONFIG_FAILURE,
249             DataFailCause.PDN_INACTIVITY_TIMER_EXPIRED,
250             DataFailCause.MAX_IPV4_CONNECTIONS,
251             DataFailCause.MAX_IPV6_CONNECTIONS,
252             DataFailCause.APN_MISMATCH,
253             DataFailCause.IP_VERSION_MISMATCH,
254             DataFailCause.DUN_CALL_DISALLOWED,
255             DataFailCause.INTERNAL_EPC_NONEPC_TRANSITION,
256             DataFailCause.INTERFACE_IN_USE,
257             DataFailCause.APN_DISALLOWED_ON_ROAMING,
258             DataFailCause.APN_PARAMETERS_CHANGED,
259             DataFailCause.NULL_APN_DISALLOWED,
260             DataFailCause.THERMAL_MITIGATION,
261             DataFailCause.DATA_SETTINGS_DISABLED,
262             DataFailCause.DATA_ROAMING_SETTINGS_DISABLED,
263             DataFailCause.DDS_SWITCHED,
264             DataFailCause.FORBIDDEN_APN_NAME,
265             DataFailCause.DDS_SWITCH_IN_PROGRESS,
266             DataFailCause.CALL_DISALLOWED_IN_ROAMING,
267             DataFailCause.NON_IP_NOT_SUPPORTED,
268             DataFailCause.PDN_NON_IP_CALL_THROTTLED,
269             DataFailCause.PDN_NON_IP_CALL_DISALLOWED,
270             DataFailCause.CDMA_LOCK,
271             DataFailCause.CDMA_INTERCEPT,
272             DataFailCause.CDMA_REORDER,
273             DataFailCause.CDMA_RELEASE_DUE_TO_SO_REJECTION,
274             DataFailCause.CDMA_INCOMING_CALL,
275             DataFailCause.CDMA_ALERT_STOP,
276             DataFailCause.CHANNEL_ACQUISITION_FAILURE,
277             DataFailCause.MAX_ACCESS_PROBE,
278             DataFailCause.CONCURRENT_SERVICE_NOT_SUPPORTED_BY_BASE_STATION,
279             DataFailCause.NO_RESPONSE_FROM_BASE_STATION,
280             DataFailCause.REJECTED_BY_BASE_STATION,
281             DataFailCause.CONCURRENT_SERVICES_INCOMPATIBLE,
282             DataFailCause.NO_CDMA_SERVICE,
283             DataFailCause.RUIM_NOT_PRESENT,
284             DataFailCause.CDMA_RETRY_ORDER,
285             DataFailCause.ACCESS_BLOCK,
286             DataFailCause.ACCESS_BLOCK_ALL,
287             DataFailCause.IS707B_MAX_ACCESS_PROBES,
288             DataFailCause.THERMAL_EMERGENCY,
289             DataFailCause.CONCURRENT_SERVICES_NOT_ALLOWED,
290             DataFailCause.INCOMING_CALL_REJECTED,
291             DataFailCause.NO_SERVICE_ON_GATEWAY,
292             DataFailCause.NO_GPRS_CONTEXT,
293             DataFailCause.ILLEGAL_MS,
294             DataFailCause.ILLEGAL_ME,
295             DataFailCause.GPRS_SERVICES_AND_NON_GPRS_SERVICES_NOT_ALLOWED,
296             DataFailCause.GPRS_SERVICES_NOT_ALLOWED,
297             DataFailCause.MS_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK,
298             DataFailCause.IMPLICITLY_DETACHED,
299             DataFailCause.PLMN_NOT_ALLOWED,
300             DataFailCause.LOCATION_AREA_NOT_ALLOWED,
301             DataFailCause.GPRS_SERVICES_NOT_ALLOWED_IN_THIS_PLMN,
302             DataFailCause.PDP_DUPLICATE,
303             DataFailCause.UE_RAT_CHANGE,
304             DataFailCause.CONGESTION,
305             DataFailCause.NO_PDP_CONTEXT_ACTIVATED,
306             DataFailCause.ACCESS_CLASS_DSAC_REJECTION,
307             DataFailCause.PDP_ACTIVATE_MAX_RETRY_FAILED,
308             DataFailCause.RADIO_ACCESS_BEARER_FAILURE,
309             DataFailCause.ESM_UNKNOWN_EPS_BEARER_CONTEXT,
310             DataFailCause.DRB_RELEASED_BY_RRC,
311             DataFailCause.CONNECTION_RELEASED,
312             DataFailCause.EMM_DETACHED,
313             DataFailCause.EMM_ATTACH_FAILED,
314             DataFailCause.EMM_ATTACH_STARTED,
315             DataFailCause.LTE_NAS_SERVICE_REQUEST_FAILED,
316             DataFailCause.DUPLICATE_BEARER_ID,
317             DataFailCause.ESM_COLLISION_SCENARIOS,
318             DataFailCause.ESM_BEARER_DEACTIVATED_TO_SYNC_WITH_NETWORK,
319             DataFailCause.ESM_NW_ACTIVATED_DED_BEARER_WITH_ID_OF_DEF_BEARER,
320             DataFailCause.ESM_BAD_OTA_MESSAGE,
321             DataFailCause.ESM_DOWNLOAD_SERVER_REJECTED_THE_CALL,
322             DataFailCause.ESM_CONTEXT_TRANSFERRED_DUE_TO_IRAT,
323             DataFailCause.DS_EXPLICIT_DEACTIVATION,
324             DataFailCause.ESM_LOCAL_CAUSE_NONE,
325             DataFailCause.LTE_THROTTLING_NOT_REQUIRED,
326             DataFailCause.ACCESS_CONTROL_LIST_CHECK_FAILURE,
327             DataFailCause.SERVICE_NOT_ALLOWED_ON_PLMN,
328             DataFailCause.EMM_T3417_EXPIRED,
329             DataFailCause.EMM_T3417_EXT_EXPIRED,
330             DataFailCause.RRC_UPLINK_DATA_TRANSMISSION_FAILURE,
331             DataFailCause.RRC_UPLINK_DELIVERY_FAILED_DUE_TO_HANDOVER,
332             DataFailCause.RRC_UPLINK_CONNECTION_RELEASE,
333             DataFailCause.RRC_UPLINK_RADIO_LINK_FAILURE,
334             DataFailCause.RRC_UPLINK_ERROR_REQUEST_FROM_NAS,
335             DataFailCause.RRC_CONNECTION_ACCESS_STRATUM_FAILURE,
336             DataFailCause.RRC_CONNECTION_ANOTHER_PROCEDURE_IN_PROGRESS,
337             DataFailCause.RRC_CONNECTION_ACCESS_BARRED,
338             DataFailCause.RRC_CONNECTION_CELL_RESELECTION,
339             DataFailCause.RRC_CONNECTION_CONFIG_FAILURE,
340             DataFailCause.RRC_CONNECTION_TIMER_EXPIRED,
341             DataFailCause.RRC_CONNECTION_LINK_FAILURE,
342             DataFailCause.RRC_CONNECTION_CELL_NOT_CAMPED,
343             DataFailCause.RRC_CONNECTION_SYSTEM_INTERVAL_FAILURE,
344             DataFailCause.RRC_CONNECTION_REJECT_BY_NETWORK,
345             DataFailCause.RRC_CONNECTION_NORMAL_RELEASE,
346             DataFailCause.RRC_CONNECTION_RADIO_LINK_FAILURE,
347             DataFailCause.RRC_CONNECTION_REESTABLISHMENT_FAILURE,
348             DataFailCause.RRC_CONNECTION_OUT_OF_SERVICE_DURING_CELL_REGISTER,
349             DataFailCause.RRC_CONNECTION_ABORT_REQUEST,
350             DataFailCause.RRC_CONNECTION_SYSTEM_INFORMATION_BLOCK_READ_ERROR,
351             DataFailCause.NETWORK_INITIATED_DETACH_WITH_AUTO_REATTACH,
352             DataFailCause.NETWORK_INITIATED_DETACH_NO_AUTO_REATTACH,
353             DataFailCause.ESM_PROCEDURE_TIME_OUT,
354             DataFailCause.INVALID_CONNECTION_ID,
355             DataFailCause.MAXIMIUM_NSAPIS_EXCEEDED,
356             DataFailCause.INVALID_PRIMARY_NSAPI,
357             DataFailCause.CANNOT_ENCODE_OTA_MESSAGE,
358             DataFailCause.RADIO_ACCESS_BEARER_SETUP_FAILURE,
359             DataFailCause.PDP_ESTABLISH_TIMEOUT_EXPIRED,
360             DataFailCause.PDP_MODIFY_TIMEOUT_EXPIRED,
361             DataFailCause.PDP_INACTIVE_TIMEOUT_EXPIRED,
362             DataFailCause.PDP_LOWERLAYER_ERROR,
363             DataFailCause.PDP_MODIFY_COLLISION,
364             DataFailCause.MAXINUM_SIZE_OF_L2_MESSAGE_EXCEEDED,
365             DataFailCause.NAS_REQUEST_REJECTED_BY_NETWORK,
366             DataFailCause.RRC_CONNECTION_INVALID_REQUEST,
367             DataFailCause.RRC_CONNECTION_TRACKING_AREA_ID_CHANGED,
368             DataFailCause.RRC_CONNECTION_RF_UNAVAILABLE,
369             DataFailCause.RRC_CONNECTION_ABORTED_DUE_TO_IRAT_CHANGE,
370             DataFailCause.RRC_CONNECTION_RELEASED_SECURITY_NOT_ACTIVE,
371             DataFailCause.RRC_CONNECTION_ABORTED_AFTER_HANDOVER,
372             DataFailCause.RRC_CONNECTION_ABORTED_AFTER_IRAT_CELL_CHANGE,
373             DataFailCause.RRC_CONNECTION_ABORTED_DURING_IRAT_CELL_CHANGE,
374             DataFailCause.IMSI_UNKNOWN_IN_HOME_SUBSCRIBER_SERVER,
375             DataFailCause.IMEI_NOT_ACCEPTED,
376             DataFailCause.EPS_SERVICES_AND_NON_EPS_SERVICES_NOT_ALLOWED,
377             DataFailCause.EPS_SERVICES_NOT_ALLOWED_IN_PLMN,
378             DataFailCause.MSC_TEMPORARILY_NOT_REACHABLE,
379             DataFailCause.CS_DOMAIN_NOT_AVAILABLE,
380             DataFailCause.ESM_FAILURE,
381             DataFailCause.MAC_FAILURE,
382             DataFailCause.SYNCHRONIZATION_FAILURE,
383             DataFailCause.UE_SECURITY_CAPABILITIES_MISMATCH,
384             DataFailCause.SECURITY_MODE_REJECTED,
385             DataFailCause.UNACCEPTABLE_NON_EPS_AUTHENTICATION,
386             DataFailCause.CS_FALLBACK_CALL_ESTABLISHMENT_NOT_ALLOWED,
387             DataFailCause.NO_EPS_BEARER_CONTEXT_ACTIVATED,
388             DataFailCause.INVALID_EMM_STATE,
389             DataFailCause.NAS_LAYER_FAILURE,
390             DataFailCause.MULTIPLE_PDP_CALL_NOT_ALLOWED,
391             DataFailCause.EMBMS_NOT_ENABLED,
392             DataFailCause.IRAT_HANDOVER_FAILED,
393             DataFailCause.EMBMS_REGULAR_DEACTIVATION,
394             DataFailCause.TEST_LOOPBACK_REGULAR_DEACTIVATION,
395             DataFailCause.LOWER_LAYER_REGISTRATION_FAILURE,
396             DataFailCause.DATA_PLAN_EXPIRED,
397             DataFailCause.UMTS_HANDOVER_TO_IWLAN,
398             DataFailCause.EVDO_CONNECTION_DENY_BY_GENERAL_OR_NETWORK_BUSY,
399             DataFailCause.EVDO_CONNECTION_DENY_BY_BILLING_OR_AUTHENTICATION_FAILURE,
400             DataFailCause.EVDO_HDR_CHANGED,
401             DataFailCause.EVDO_HDR_EXITED,
402             DataFailCause.EVDO_HDR_NO_SESSION,
403             DataFailCause.EVDO_USING_GPS_FIX_INSTEAD_OF_HDR_CALL,
404             DataFailCause.EVDO_HDR_CONNECTION_SETUP_TIMEOUT,
405             DataFailCause.FAILED_TO_ACQUIRE_COLOCATED_HDR,
406             DataFailCause.OTASP_COMMIT_IN_PROGRESS,
407             DataFailCause.NO_HYBRID_HDR_SERVICE,
408             DataFailCause.HDR_NO_LOCK_GRANTED,
409             DataFailCause.DBM_OR_SMS_IN_PROGRESS,
410             DataFailCause.HDR_FADE,
411             DataFailCause.HDR_ACCESS_FAILURE,
412             DataFailCause.UNSUPPORTED_1X_PREV,
413             DataFailCause.LOCAL_END,
414             DataFailCause.NO_SERVICE,
415             DataFailCause.FADE,
416             DataFailCause.NORMAL_RELEASE,
417             DataFailCause.ACCESS_ATTEMPT_ALREADY_IN_PROGRESS,
418             DataFailCause.REDIRECTION_OR_HANDOFF_IN_PROGRESS,
419             DataFailCause.EMERGENCY_MODE,
420             DataFailCause.PHONE_IN_USE,
421             DataFailCause.INVALID_MODE,
422             DataFailCause.INVALID_SIM_STATE,
423             DataFailCause.NO_COLLOCATED_HDR,
424             DataFailCause.UE_IS_ENTERING_POWERSAVE_MODE,
425             DataFailCause.DUAL_SWITCH,
426             DataFailCause.PPP_TIMEOUT,
427             DataFailCause.PPP_AUTH_FAILURE,
428             DataFailCause.PPP_OPTION_MISMATCH,
429             DataFailCause.PPP_PAP_FAILURE,
430             DataFailCause.PPP_CHAP_FAILURE,
431             DataFailCause.PPP_CLOSE_IN_PROGRESS,
432             DataFailCause.LIMITED_TO_IPV4,
433             DataFailCause.LIMITED_TO_IPV6,
434             DataFailCause.VSNCP_TIMEOUT,
435             DataFailCause.VSNCP_GEN_ERROR,
436             DataFailCause.VSNCP_APN_UNAUTHORIZED,
437             DataFailCause.VSNCP_PDN_LIMIT_EXCEEDED,
438             DataFailCause.VSNCP_NO_PDN_GATEWAY_ADDRESS,
439             DataFailCause.VSNCP_PDN_GATEWAY_UNREACHABLE,
440             DataFailCause.VSNCP_PDN_GATEWAY_REJECT,
441             DataFailCause.VSNCP_INSUFFICIENT_PARAMETERS,
442             DataFailCause.VSNCP_RESOURCE_UNAVAILABLE,
443             DataFailCause.VSNCP_ADMINISTRATIVELY_PROHIBITED,
444             DataFailCause.VSNCP_PDN_ID_IN_USE,
445             DataFailCause.VSNCP_SUBSCRIBER_LIMITATION,
446             DataFailCause.VSNCP_PDN_EXISTS_FOR_THIS_APN,
447             DataFailCause.VSNCP_RECONNECT_NOT_ALLOWED,
448             DataFailCause.IPV6_PREFIX_UNAVAILABLE,
449             DataFailCause.HANDOFF_PREFERENCE_CHANGED,
450             DataFailCause.SLICE_REJECTED,
451             DataFailCause.MATCH_ALL_RULE_NOT_ALLOWED,
452             DataFailCause.ALL_MATCHING_RULES_FAILED,
453             DataFailCause.OEM_DCFAILCAUSE_1,
454             DataFailCause.OEM_DCFAILCAUSE_2,
455             DataFailCause.OEM_DCFAILCAUSE_3,
456             DataFailCause.OEM_DCFAILCAUSE_4,
457             DataFailCause.OEM_DCFAILCAUSE_5,
458             DataFailCause.OEM_DCFAILCAUSE_6,
459             DataFailCause.OEM_DCFAILCAUSE_7,
460             DataFailCause.OEM_DCFAILCAUSE_8,
461             DataFailCause.OEM_DCFAILCAUSE_9,
462             DataFailCause.OEM_DCFAILCAUSE_10,
463             DataFailCause.OEM_DCFAILCAUSE_11,
464             DataFailCause.OEM_DCFAILCAUSE_12,
465             DataFailCause.OEM_DCFAILCAUSE_13,
466             DataFailCause.OEM_DCFAILCAUSE_14,
467             DataFailCause.OEM_DCFAILCAUSE_15,
468             DataFailCause.REGISTRATION_FAIL,
469             DataFailCause.GPRS_REGISTRATION_FAIL,
470             DataFailCause.SIGNAL_LOST,
471             DataFailCause.PREF_RADIO_TECH_CHANGED,
472             DataFailCause.RADIO_POWER_OFF,
473             DataFailCause.TETHERED_CALL_ACTIVE,
474             DataFailCause.ERROR_UNSPECIFIED,
475             DataFailCause.UNKNOWN,
476             DataFailCause.RADIO_NOT_AVAILABLE,
477             DataFailCause.UNACCEPTABLE_NETWORK_PARAMETER,
478             DataFailCause.LOST_CONNECTION,
479     })
480     @Retention(RetentionPolicy.SOURCE)
481     public @interface DataFailureCause {
482     }
483 
484     @Retention(RetentionPolicy.SOURCE)
485     @IntDef(prefix = {"PRECISE_CALL_STATE_"},
486             value = {
487             PreciseCallState.PRECISE_CALL_STATE_NOT_VALID,
488             PreciseCallState.PRECISE_CALL_STATE_IDLE,
489             PreciseCallState.PRECISE_CALL_STATE_ACTIVE,
490             PreciseCallState.PRECISE_CALL_STATE_HOLDING,
491             PreciseCallState.PRECISE_CALL_STATE_DIALING,
492             PreciseCallState.PRECISE_CALL_STATE_ALERTING,
493             PreciseCallState. PRECISE_CALL_STATE_INCOMING,
494             PreciseCallState.PRECISE_CALL_STATE_WAITING,
495             PreciseCallState.PRECISE_CALL_STATE_DISCONNECTED,
496             PreciseCallState.PRECISE_CALL_STATE_DISCONNECTING})
497     public @interface PreciseCallStates {}
498 
499     @IntDef(value = {
500             DisconnectCause.NOT_VALID,
501             DisconnectCause.NOT_DISCONNECTED,
502             DisconnectCause.INCOMING_MISSED,
503             DisconnectCause.NORMAL,
504             DisconnectCause.LOCAL,
505             DisconnectCause.BUSY,
506             DisconnectCause.CONGESTION,
507             DisconnectCause.MMI,
508             DisconnectCause.INVALID_NUMBER,
509             DisconnectCause.NUMBER_UNREACHABLE,
510             DisconnectCause.SERVER_UNREACHABLE,
511             DisconnectCause.INVALID_CREDENTIALS,
512             DisconnectCause.OUT_OF_NETWORK,
513             DisconnectCause.SERVER_ERROR,
514             DisconnectCause.TIMED_OUT,
515             DisconnectCause.LOST_SIGNAL,
516             DisconnectCause.LIMIT_EXCEEDED,
517             DisconnectCause.INCOMING_REJECTED,
518             DisconnectCause.POWER_OFF,
519             DisconnectCause.OUT_OF_SERVICE,
520             DisconnectCause.ICC_ERROR,
521             DisconnectCause.CALL_BARRED,
522             DisconnectCause.FDN_BLOCKED,
523             DisconnectCause.CS_RESTRICTED,
524             DisconnectCause.CS_RESTRICTED_NORMAL,
525             DisconnectCause.CS_RESTRICTED_EMERGENCY,
526             DisconnectCause.UNOBTAINABLE_NUMBER,
527             DisconnectCause.CDMA_LOCKED_UNTIL_POWER_CYCLE,
528             DisconnectCause.CDMA_DROP,
529             DisconnectCause.CDMA_INTERCEPT,
530             DisconnectCause.CDMA_REORDER,
531             DisconnectCause.CDMA_SO_REJECT,
532             DisconnectCause.CDMA_RETRY_ORDER,
533             DisconnectCause.CDMA_ACCESS_FAILURE,
534             DisconnectCause.CDMA_PREEMPTED,
535             DisconnectCause.CDMA_NOT_EMERGENCY,
536             DisconnectCause.CDMA_ACCESS_BLOCKED,
537             DisconnectCause.ERROR_UNSPECIFIED,
538     })
539     @Retention(RetentionPolicy.SOURCE)
540     public @interface DisconnectCauses {
541     }
542 
543     @IntDef(value = {
544             PreciseDisconnectCause.NOT_VALID,
545             PreciseDisconnectCause.NO_DISCONNECT_CAUSE_AVAILABLE,
546             PreciseDisconnectCause.UNOBTAINABLE_NUMBER,
547             PreciseDisconnectCause.NORMAL,
548             PreciseDisconnectCause.BUSY,
549             PreciseDisconnectCause.NUMBER_CHANGED,
550             PreciseDisconnectCause.STATUS_ENQUIRY,
551             PreciseDisconnectCause.NORMAL_UNSPECIFIED,
552             PreciseDisconnectCause.NO_CIRCUIT_AVAIL,
553             PreciseDisconnectCause.TEMPORARY_FAILURE,
554             PreciseDisconnectCause.SWITCHING_CONGESTION,
555             PreciseDisconnectCause.CHANNEL_NOT_AVAIL,
556             PreciseDisconnectCause.QOS_NOT_AVAIL,
557             PreciseDisconnectCause.BEARER_NOT_AVAIL,
558             PreciseDisconnectCause.ACM_LIMIT_EXCEEDED,
559             PreciseDisconnectCause.CALL_BARRED,
560             PreciseDisconnectCause.FDN_BLOCKED,
561             PreciseDisconnectCause.IMSI_UNKNOWN_IN_VLR,
562             PreciseDisconnectCause.IMEI_NOT_ACCEPTED,
563             PreciseDisconnectCause.CDMA_LOCKED_UNTIL_POWER_CYCLE,
564             PreciseDisconnectCause.CDMA_DROP,
565             PreciseDisconnectCause.CDMA_INTERCEPT,
566             PreciseDisconnectCause.CDMA_REORDER,
567             PreciseDisconnectCause.CDMA_SO_REJECT,
568             PreciseDisconnectCause.CDMA_RETRY_ORDER,
569             PreciseDisconnectCause.CDMA_ACCESS_FAILURE,
570             PreciseDisconnectCause.CDMA_PREEMPTED,
571             PreciseDisconnectCause.CDMA_NOT_EMERGENCY,
572             PreciseDisconnectCause.CDMA_ACCESS_BLOCKED,
573             PreciseDisconnectCause.ERROR_UNSPECIFIED,
574     })
575     @Retention(RetentionPolicy.SOURCE)
576     public @interface PreciseDisconnectCauses {
577     }
578 
579     /**
580      * Carrier Privilege Status.
581      */
582     @IntDef(prefix = { "CARRIER_PRIVILEGE_STATUS_" }, value = {
583         TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS,
584         TelephonyManager.CARRIER_PRIVILEGE_STATUS_NO_ACCESS,
585         TelephonyManager.CARRIER_PRIVILEGE_STATUS_RULES_NOT_LOADED,
586         TelephonyManager.CARRIER_PRIVILEGE_STATUS_ERROR_LOADING_RULES,
587     })
588     @Retention(RetentionPolicy.SOURCE)
589     public @interface CarrierPrivilegeStatus {
590     }
591 
592     @IntDef({
593             Connection.AUDIO_CODEC_NONE,
594             Connection.AUDIO_CODEC_AMR,
595             Connection.AUDIO_CODEC_AMR_WB,
596             Connection.AUDIO_CODEC_QCELP13K,
597             Connection.AUDIO_CODEC_EVRC,
598             Connection.AUDIO_CODEC_EVRC_B,
599             Connection.AUDIO_CODEC_EVRC_WB,
600             Connection.AUDIO_CODEC_EVRC_NW,
601             Connection.AUDIO_CODEC_GSM_EFR,
602             Connection.AUDIO_CODEC_GSM_FR,
603             Connection.AUDIO_CODEC_G711U,
604             Connection.AUDIO_CODEC_G723,
605             Connection.AUDIO_CODEC_G711A,
606             Connection.AUDIO_CODEC_G722,
607             Connection.AUDIO_CODEC_G711AB,
608             Connection.AUDIO_CODEC_G729,
609             Connection.AUDIO_CODEC_EVS_NB,
610             Connection.AUDIO_CODEC_EVS_WB,
611             Connection.AUDIO_CODEC_EVS_SWB,
612             Connection.AUDIO_CODEC_EVS_FB
613     })
614     @Retention(RetentionPolicy.SOURCE)
615     public @interface ImsAudioCodec {
616     }
617 
618     /**
619      * UICC SIM Application Types
620      */
621     @IntDef(prefix = { "APPTYPE_" }, value = {
622             TelephonyManager.APPTYPE_SIM,
623             TelephonyManager.APPTYPE_USIM,
624             TelephonyManager.APPTYPE_RUIM,
625             TelephonyManager.APPTYPE_CSIM,
626             TelephonyManager.APPTYPE_ISIM
627     })
628     @Retention(RetentionPolicy.SOURCE)
629     public @interface UiccAppType{}
630 
631     /**
632      * UICC SIM Application Types including UNKNOWN
633      */
634     @IntDef(prefix = { "APPTYPE_" }, value = {
635             TelephonyManager.APPTYPE_UNKNOWN,
636             TelephonyManager.APPTYPE_SIM,
637             TelephonyManager.APPTYPE_USIM,
638             TelephonyManager.APPTYPE_RUIM,
639             TelephonyManager.APPTYPE_CSIM,
640             TelephonyManager.APPTYPE_ISIM
641     })
642     @Retention(RetentionPolicy.SOURCE)
643     public @interface UiccAppTypeExt{}
644 
645     /**
646      * Override network type
647      */
648     @Retention(RetentionPolicy.SOURCE)
649     @IntDef(prefix = "OVERRIDE_NETWORK_TYPE_", value = {
650             TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NONE,
651             TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_LTE_CA,
652             TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_LTE_ADVANCED_PRO,
653             TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NR_NSA,
654             TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NR_ADVANCED})
655     public @interface OverrideNetworkType {}
656 
657     /**
658      *  Result of a thermal mitigation request.
659      */
660     @Retention(RetentionPolicy.SOURCE)
661     @IntDef(prefix = { "THERMAL_MITIGATION_RESULT_" }, value = {
662         TelephonyManager.THERMAL_MITIGATION_RESULT_SUCCESS,
663         TelephonyManager.THERMAL_MITIGATION_RESULT_MODEM_ERROR,
664         TelephonyManager.THERMAL_MITIGATION_RESULT_INVALID_STATE,
665         TelephonyManager.THERMAL_MITIGATION_RESULT_UNKNOWN_ERROR})
666     public @interface ThermalMitigationResult {}
667 }
668