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