1 /*
2  * Copyright (C) 2015 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 android.telephony;
18 
19 import android.Manifest;
20 import android.annotation.CallbackExecutor;
21 import android.annotation.IntDef;
22 import android.annotation.NonNull;
23 import android.annotation.Nullable;
24 import android.annotation.RequiresFeature;
25 import android.annotation.RequiresPermission;
26 import android.annotation.SuppressAutoDoc;
27 import android.annotation.SuppressLint;
28 import android.annotation.SystemApi;
29 import android.annotation.SystemService;
30 import android.compat.annotation.UnsupportedAppUsage;
31 import android.content.ComponentName;
32 import android.content.Context;
33 import android.content.pm.PackageManager;
34 import android.net.NetworkCapabilities;
35 import android.net.ipsec.ike.SaProposal;
36 import android.os.Build;
37 import android.os.Handler;
38 import android.os.PersistableBundle;
39 import android.os.RemoteException;
40 import android.service.carrier.CarrierService;
41 import android.telecom.TelecomManager;
42 import android.telephony.AccessNetworkConstants.AccessNetworkType;
43 import android.telephony.data.ApnSetting;
44 import android.telephony.gba.TlsParams;
45 import android.telephony.gba.UaSecurityProtocolIdentifier;
46 import android.telephony.ims.ImsReasonInfo;
47 import android.telephony.ims.ImsRegistrationAttributes;
48 import android.telephony.ims.ImsSsData;
49 import android.telephony.ims.MediaQualityStatus;
50 import android.telephony.ims.RcsUceAdapter;
51 import android.telephony.ims.feature.MmTelFeature;
52 import android.telephony.ims.feature.RcsFeature;
53 
54 import com.android.internal.telephony.ICarrierConfigLoader;
55 import com.android.telephony.Rlog;
56 
57 import java.util.List;
58 import java.util.Objects;
59 import java.util.concurrent.Executor;
60 import java.util.concurrent.TimeUnit;
61 import java.util.function.Consumer;
62 
63 /**
64  * Provides access to telephony configuration values that are carrier-specific.
65  */
66 @SystemService(Context.CARRIER_CONFIG_SERVICE)
67 @RequiresFeature(PackageManager.FEATURE_TELEPHONY_SUBSCRIPTION)
68 public class CarrierConfigManager {
69     private static final String TAG = "CarrierConfigManager";
70 
71     /**
72      * Extra included in {@link #ACTION_CARRIER_CONFIG_CHANGED} to indicate the slot index that the
73      * broadcast is for.
74      */
75     public static final String EXTRA_SLOT_INDEX = "android.telephony.extra.SLOT_INDEX";
76 
77     /**
78      * {@link #ACTION_CARRIER_CONFIG_CHANGED} is broadcast once on device bootup and then again when
79      * the device is unlocked. Direct-Boot-aware applications may use the first broadcast as an
80      * early signal that the carrier config has been loaded, but other applications will only
81      * receive the second broadcast, when the device is unlocked.
82      *
83      * This extra is included in {@link #ACTION_CARRIER_CONFIG_CHANGED} to indicate whether this is
84      * a rebroadcast on unlock.
85      */
86     public static final String EXTRA_REBROADCAST_ON_UNLOCK =
87             "android.telephony.extra.REBROADCAST_ON_UNLOCK";
88 
89     /**
90      * Optional extra included in {@link #ACTION_CARRIER_CONFIG_CHANGED} to indicate the
91      * subscription index that the broadcast is for, if a valid one is available.
92      */
93     public static final String EXTRA_SUBSCRIPTION_INDEX =
94             SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX;
95 
96     /**
97      * Service class flag if no specific service class is specified.
98      * Reference: 3GPP TS 27.007 Section 7.4 Facility lock +CLCK
99      */
100     public static final int SERVICE_CLASS_NONE = ImsSsData.SERVICE_CLASS_NONE;
101 
102     /**
103      * Service class flag for voice telephony.
104      * Reference: 3GPP TS 27.007 Section 7.4 Facility lock +CLCK
105      */
106     public static final int SERVICE_CLASS_VOICE = ImsSsData.SERVICE_CLASS_VOICE;
107 
108     /**
109      * Only send USSD over IMS while CS is out of service, otherwise send USSD over CS.
110      * {@link #KEY_CARRIER_USSD_METHOD_INT}
111      */
112     public static final int USSD_OVER_CS_PREFERRED = 0;
113 
114     /**
115      * Send USSD over IMS or CS while IMS is out of service or silent redial over CS if needed.
116      * {@link #KEY_CARRIER_USSD_METHOD_INT}
117      */
118     public static final int USSD_OVER_IMS_PREFERRED = 1;
119 
120     /**
121      * Only send USSD over CS.
122      * {@link #KEY_CARRIER_USSD_METHOD_INT}
123      */
124     public static final int USSD_OVER_CS_ONLY = 2;
125 
126     /**
127      * Only send USSD over IMS and disallow silent redial over CS.
128      * {@link #KEY_CARRIER_USSD_METHOD_INT}
129      */
130     public static final int USSD_OVER_IMS_ONLY = 3;
131 
132     /**
133      * Indicates CARRIER_NR_AVAILABILITY_NSA determine that the carrier enable the non-standalone
134      * (NSA) mode of 5G NR.
135      */
136     public static final int CARRIER_NR_AVAILABILITY_NSA = 1;
137 
138     /**
139      * Indicates CARRIER_NR_AVAILABILITY_SA determine that the carrier enable the standalone (SA)
140      * mode of 5G NR.
141      */
142     public static final int CARRIER_NR_AVAILABILITY_SA = 2;
143 
144     private final Context mContext;
145 
146     /**
147      * @hide
148      */
CarrierConfigManager(Context context)149     public CarrierConfigManager(Context context) {
150         mContext = context;
151     }
152 
153     /**
154      * This intent is broadcast by the system when carrier config changes. An int is specified in
155      * {@link #EXTRA_SLOT_INDEX} to indicate the slot index that this is for. An optional int extra
156      * {@link #EXTRA_SUBSCRIPTION_INDEX} is included to indicate the subscription index if a valid
157      * one is available for the slot index. An optional int extra
158      * {@link TelephonyManager#EXTRA_CARRIER_ID} is included to indicate the carrier id for the
159      * changed carrier configuration. An optional int extra
160      * {@link TelephonyManager#EXTRA_SPECIFIC_CARRIER_ID} is included to indicate the precise
161      * carrier id for the changed carrier configuration.
162      * @see TelephonyManager#getSimCarrierId()
163      * @see TelephonyManager#getSimSpecificCarrierId()
164      */
165     public static final String ACTION_CARRIER_CONFIG_CHANGED =
166             "android.telephony.action.CARRIER_CONFIG_CHANGED";
167 
168     // Below are the keys used in carrier config bundles. To add a new variable, define the key and
169     // give it a default value in sDefaults. If you need to ship a per-network override in the
170     // system image, that can be added in packages/apps/CarrierConfig.
171 
172     /**
173      * Specifies a value that identifies the version of the carrier configuration that is
174      * currently in use. This string is displayed on the UI.
175      * The format of the string is not specified.
176      */
177     public static final String KEY_CARRIER_CONFIG_VERSION_STRING =
178             "carrier_config_version_string";
179 
180     /**
181      * This flag specifies whether VoLTE availability is based on provisioning. By default this is
182      * false.
183      * Used for UCE to determine if EAB provisioning checks should be based on provisioning.
184      * @deprecated Use {@link Ims#KEY_CARRIER_RCS_PROVISIONING_REQUIRED_BOOL} instead.
185      */
186     @Deprecated
187     public static final String KEY_CARRIER_VOLTE_PROVISIONED_BOOL =
188             "carrier_volte_provisioned_bool";
189 
190     /**
191      * Boolean indicating the Supplementary Services(SS) is disable when airplane mode on in the
192      * Call Settings menu.
193      * {@code true}: SS is disable when airplane mode on.
194      * {@code false}: SS is enable when airplane mode on.
195      * The default value for this key is {@code false}
196      */
197     public static final String KEY_DISABLE_SUPPLEMENTARY_SERVICES_IN_AIRPLANE_MODE_BOOL =
198             "disable_supplementary_services_in_airplane_mode_bool";
199 
200     /**
201      * Boolean indicating if the "Call forwarding" item is visible in the Call Settings menu.
202      * true means visible. false means gone.
203      * @hide
204      */
205     public static final String KEY_CALL_FORWARDING_VISIBILITY_BOOL =
206             "call_forwarding_visibility_bool";
207 
208     /**
209      * Boolean indicating if carrier supports call forwarding option "When unreachable".
210      *
211      * {@code true}: Call forwarding option "When unreachable" is supported.
212      * {@code false}: Call forwarding option "When unreachable" is not supported. Option will be
213      * removed in the UI.
214      *
215      * By default this value is true.
216      * @hide
217      */
218     public static final String KEY_CALL_FORWARDING_WHEN_UNREACHABLE_SUPPORTED_BOOL =
219             "call_forwarding_when_unreachable_supported_bool";
220 
221     /**
222      * Boolean indicating if carrier supports call forwarding option "When unanswered".
223      *
224      * {@code true}: Call forwarding option "When unanswered" is supported.
225      * {@code false}: Call forwarding option "When unanswered" is not supported. Option will be
226      * removed in the UI.
227      *
228      * By default this value is true.
229      * @hide
230      */
231     public static final String KEY_CALL_FORWARDING_WHEN_UNANSWERED_SUPPORTED_BOOL =
232             "call_forwarding_when_unanswered_supported_bool";
233 
234     /**
235      * Boolean indicating if carrier supports call forwarding option "When busy".
236      *
237      * {@code true}: Call forwarding option "When busy" is supported.
238      * {@code false}: Call forwarding option "When busy" is not supported. Option will be
239      * removed in the UI.
240      *
241      * By default this value is true.
242      * @hide
243      */
244     public static final String KEY_CALL_FORWARDING_WHEN_BUSY_SUPPORTED_BOOL =
245             "call_forwarding_when_busy_supported_bool";
246 
247     /**
248      * Boolean indicating if the "Caller ID" item is visible in the Additional Settings menu.
249      * true means visible. false means gone.
250      *
251      * The default value is true.
252      */
253     public static final String KEY_ADDITIONAL_SETTINGS_CALLER_ID_VISIBILITY_BOOL =
254             "additional_settings_caller_id_visibility_bool";
255 
256     /**
257      * Boolean indicating if the "Call Waiting" item is visible in the Additional Settings menu.
258      * true means visible. false means gone.
259      *
260      * The default value is true.
261      */
262     public static final String KEY_ADDITIONAL_SETTINGS_CALL_WAITING_VISIBILITY_BOOL =
263             "additional_settings_call_waiting_visibility_bool";
264 
265     /**
266      * Boolean indicating if the "Call barring" item is visible in the Call Settings menu.
267      * If true, the "Call Barring" menu will be visible. If false, the menu will be gone.
268      *
269      * Disabled by default.
270      */
271     public static final String KEY_CALL_BARRING_VISIBILITY_BOOL =
272             "call_barring_visibility_bool";
273 
274     /**
275      * Flag indicating whether or not changing the call barring password via the "Call Barring"
276      * settings menu is supported. If true, the option will be visible in the "Call
277      * Barring" settings menu. If false, the option will not be visible.
278      *
279      * Enabled by default.
280      */
281     public static final String KEY_CALL_BARRING_SUPPORTS_PASSWORD_CHANGE_BOOL =
282             "call_barring_supports_password_change_bool";
283 
284     /**
285      * Flag indicating whether or not deactivating all call barring features via the "Call Barring"
286      * settings menu is supported. If true, the option will be visible in the "Call
287      * Barring" settings menu. If false, the option will not be visible.
288      *
289      * Enabled by default.
290      */
291     public static final String KEY_CALL_BARRING_SUPPORTS_DEACTIVATE_ALL_BOOL =
292             "call_barring_supports_deactivate_all_bool";
293 
294     /**
295      * Specifies the service class for call barring service. Default value is
296      * {@link #SERVICE_CLASS_VOICE}.
297      * The value set as below:
298      * <ul>
299      * <li>0: {@link #SERVICE_CLASS_NONE}</li>
300      * <li>1: {@link #SERVICE_CLASS_VOICE}</li>
301      * </ul>
302      */
303     public static final String KEY_CALL_BARRING_DEFAULT_SERVICE_CLASS_INT =
304             "call_barring_default_service_class_int";
305 
306     /**
307      * This carrier supports dialing USSD codes to enable/disable supplementary services such as
308      * call forwarding and call waiting over CDMA.
309      * <p>
310      * The supplementary service menu will still need to be set as visible, see
311      * {@link #KEY_CALL_FORWARDING_VISIBILITY_BOOL} and
312      * {@link #KEY_ADDITIONAL_SETTINGS_CALL_WAITING_VISIBILITY_BOOL}.
313      * <p>
314      * If this is set as false and the supplementary service menu is visible, the associated setting
315      * will be enabled and disabled based on the availability of supplementary services over UT. See
316      * {@link #KEY_CARRIER_SUPPORTS_SS_OVER_UT_BOOL}.
317      * @hide
318      */
319     public static final String KEY_SUPPORT_SS_OVER_CDMA_BOOL = "support_ss_over_cdma_bool";
320 
321     /**
322      * Flag indicating whether the Phone app should ignore EVENT_SIM_NETWORK_LOCKED
323      * events from the Sim.
324      * If true, this will prevent the IccNetworkDepersonalizationPanel from being shown, and
325      * effectively disable the "Sim network lock" feature.
326      */
327     public static final String KEY_IGNORE_SIM_NETWORK_LOCKED_EVENTS_BOOL =
328             "ignore_sim_network_locked_events_bool";
329 
330     /**
331      * When checking if a given number is the voicemail number, if this flag is true
332      * then in addition to comparing the given number to the voicemail number, we also compare it
333      * to the mdn. If this flag is false, the given number is only compared to the voicemail number.
334      * By default this value is false.
335      */
336     public static final String KEY_MDN_IS_ADDITIONAL_VOICEMAIL_NUMBER_BOOL =
337             "mdn_is_additional_voicemail_number_bool";
338 
339     /**
340      * Flag indicating whether the Phone app should provide a "Dismiss" button on the SIM network
341      * unlock screen. The default value is true. If set to false, there will be *no way* to dismiss
342      * the SIM network unlock screen if you don't enter the correct unlock code. (One important
343      * consequence: there will be no way to make an Emergency Call if your SIM is network-locked and
344      * you don't know the PIN.)
345      */
346     public static final String KEY_SIM_NETWORK_UNLOCK_ALLOW_DISMISS_BOOL =
347             "sim_network_unlock_allow_dismiss_bool";
348 
349     /**
350      * Flag indicating whether or not sending emergency SMS messages over IMS
351      * is supported when in LTE/limited LTE (Emergency only) service mode..
352      */
353     public static final String KEY_SUPPORT_EMERGENCY_SMS_OVER_IMS_BOOL =
354             "support_emergency_sms_over_ims_bool";
355 
356     /** Flag indicating if the phone is a world phone */
357     public static final String KEY_WORLD_PHONE_BOOL = "world_phone_bool";
358 
359     /**
360      * Flag to require or skip entitlement checks.
361      * If true, entitlement checks will be executed if device has been configured for it,
362      * If false, entitlement checks will be skipped.
363      */
364     public static final String KEY_REQUIRE_ENTITLEMENT_CHECKS_BOOL =
365             "require_entitlement_checks_bool";
366 
367     /**
368      * Flag indicating if the carrier supports tethering of mobile data.
369      */
370     public static final String KEY_CARRIER_SUPPORTS_TETHERING_BOOL =
371             "carrier_supports_tethering_bool";
372 
373     /**
374      * Flag indicating whether radio is to be restarted on error PDP_FAIL_REGULAR_DEACTIVATION
375      * This is false by default.
376      *
377      * @deprecated Use {@link #KEY_RADIO_RESTART_FAILURE_CAUSES_INT_ARRAY} instead
378      */
379     @Deprecated
380     public static final String KEY_RESTART_RADIO_ON_PDP_FAIL_REGULAR_DEACTIVATION_BOOL =
381             "restart_radio_on_pdp_fail_regular_deactivation_bool";
382 
383     /**
384      * A list of failure cause codes that will trigger a modem restart when telephony receiving
385      * one of those during data setup. The cause codes are defined in 3GPP TS 24.008 Annex I and
386      * TS 24.301 Annex B.
387      */
388     public static final String KEY_RADIO_RESTART_FAILURE_CAUSES_INT_ARRAY =
389             "radio_restart_failure_causes_int_array";
390 
391     /**
392      * If true, enable vibration (haptic feedback) for key presses in the EmergencyDialer activity.
393      * The pattern is set on a per-platform basis using config_virtualKeyVibePattern. To be
394      * consistent with the regular Dialer, this value should agree with the corresponding values
395      * from config.xml under apps/Contacts.
396      */
397     public static final String KEY_ENABLE_DIALER_KEY_VIBRATION_BOOL =
398             "enable_dialer_key_vibration_bool";
399 
400     /** Flag indicating if dtmf tone type is enabled */
401     public static final String KEY_DTMF_TYPE_ENABLED_BOOL = "dtmf_type_enabled_bool";
402 
403     /** Flag indicating if auto retry is enabled */
404     public static final String KEY_AUTO_RETRY_ENABLED_BOOL = "auto_retry_enabled_bool";
405 
406     /**
407      * Determine whether we want to play local DTMF tones in a call, or just let the radio/BP handle
408      * playing of the tones.
409      */
410     public static final String KEY_ALLOW_LOCAL_DTMF_TONES_BOOL = "allow_local_dtmf_tones_bool";
411 
412     /**
413      * Determines if the carrier requires that a tone be played to the remote party when an app is
414      * recording audio during a call (e.g. using a call recording app).
415      * <p>
416      * Note: This requires the Telephony config_supports_telephony_audio_device overlay to be true
417      * in order to work.
418      * @hide
419      */
420     public static final String KEY_PLAY_CALL_RECORDING_TONE_BOOL = "play_call_recording_tone_bool";
421 
422     /**
423      * Determines if the carrier requires converting the destination number before sending out an
424      * SMS. Certain networks and numbering plans require different formats.
425      */
426     public static final String KEY_SMS_REQUIRES_DESTINATION_NUMBER_CONVERSION_BOOL =
427             "sms_requires_destination_number_conversion_bool";
428 
429     /**
430      * If true, show an onscreen "Dial" button in the dialer. In practice this is used on all
431      * platforms, even the ones with hard SEND/END keys, but for maximum flexibility it's controlled
432      * by a flag here (which can be overridden on a per-product basis.)
433      */
434     public static final String KEY_SHOW_ONSCREEN_DIAL_BUTTON_BOOL =
435             "show_onscreen_dial_button_bool";
436 
437     /** Determines if device implements a noise suppression device for in call audio. */
438     public static final String
439             KEY_HAS_IN_CALL_NOISE_SUPPRESSION_BOOL = "has_in_call_noise_suppression_bool";
440 
441     /**
442      * Determines if the current device should allow emergency numbers to be logged in the Call Log.
443      * (Some carriers require that emergency calls *not* be logged, presumably to avoid the risk of
444      * accidental redialing from the call log UI. This is a good idea, so the default here is
445      * false.)
446      */
447     public static final String KEY_ALLOW_EMERGENCY_NUMBERS_IN_CALL_LOG_BOOL =
448             "allow_emergency_numbers_in_call_log_bool";
449 
450     /**
451      * A string array containing numbers that shouldn't be included in the call log.
452      */
453     public static final String KEY_UNLOGGABLE_NUMBERS_STRING_ARRAY =
454             "unloggable_numbers_string_array";
455 
456     /** If true, removes the Voice Privacy option from Call Settings */
457     public static final String KEY_VOICE_PRIVACY_DISABLE_UI_BOOL = "voice_privacy_disable_ui_bool";
458 
459     /** Control whether users can reach the carrier portions of Cellular Network Settings. */
460     public static final String
461             KEY_HIDE_CARRIER_NETWORK_SETTINGS_BOOL = "hide_carrier_network_settings_bool";
462 
463     /**
464      * Only allow auto selection in Advanced Network Settings when in home network.
465      * Manual selection is allowed when in roaming network.
466      */
467     public static final String KEY_ONLY_AUTO_SELECT_IN_HOME_NETWORK_BOOL =
468             "only_auto_select_in_home_network";
469 
470     /**
471      * Flag indicating whether to show single operator row in the choose network setting.
472      *
473      * The device configuration value {@code config_enableNewAutoSelectNetworkUI} ultimately
474      * controls whether this carrier configuration option is used.
475      * Where {@code config_enableNewAutoSelectNetworkUI} is false, the value of this
476      * carrier configuration is ignored.
477      *
478      * If {@code true}, default value, merge the duplicate networks which with the same plmn, keep
479      * the one that with the higher signal strength level.
480      * If {@code false}, show all operators without merging.
481      * @hide
482      */
483     public static final String KEY_SHOW_SINGLE_OPERATOR_ROW_IN_CHOOSE_NETWORK_SETTING_BOOL =
484             "show_single_operator_row_in_choose_network_setting_bool";
485 
486     /**
487      * Flag indicating whether to display SPN as network name for home network in choose
488      * network setting.
489      *
490      * If {@code true}, display SPN as network name in choose network setting.
491      * If {@code false}, display PLMN in choose network setting.
492      * @hide
493      */
494     public static final String KEY_SHOW_SPN_FOR_HOME_IN_CHOOSE_NETWORK_SETTING_BOOL =
495             "show_spn_for_home_in_choose_network_setting_bool";
496 
497     /**
498      * Control whether users receive a simplified network settings UI and improved network
499      * selection.
500      *
501      * @deprecated Never implemented. Has no behavior impact when override. DO NOT USE.
502      */
503     @Deprecated
504     public static final String KEY_SIMPLIFIED_NETWORK_SETTINGS_BOOL =
505             "simplified_network_settings_bool";
506 
507     /** Control whether users can reach the SIM lock settings. */
508     public static final String KEY_HIDE_SIM_LOCK_SETTINGS_BOOL = "hide_sim_lock_settings_bool";
509 
510     /** Control whether users can edit APNs in Settings. */
511     public static final String KEY_APN_EXPAND_BOOL = "apn_expand_bool";
512 
513     /** Control whether users can choose a network operator. */
514     public static final String KEY_OPERATOR_SELECTION_EXPAND_BOOL =
515             "operator_selection_expand_bool";
516 
517     /**
518      * Used in the Preferred Network Types menu to determine if the 2G option is displayed.
519      * Value defaults to false as of Android T to discourage the use of insecure 2G protocols.
520      *
521      * @see #KEY_HIDE_ENABLE_2G
522      */
523     public static final String KEY_PREFER_2G_BOOL = "prefer_2g_bool";
524 
525     /**
526      * Used in Cellular Network Settings for preferred network type to show 4G only mode.
527      * @hide
528      */
529     public static final String KEY_4G_ONLY_BOOL = "4g_only_bool";
530 
531     /** Show cdma network mode choices 1x, 3G, global etc. */
532     public static final String KEY_SHOW_CDMA_CHOICES_BOOL = "show_cdma_choices_bool";
533 
534     /** CDMA activation goes through HFA */
535     public static final String KEY_USE_HFA_FOR_PROVISIONING_BOOL = "use_hfa_for_provisioning_bool";
536 
537     /**
538      * CDMA activation goes through OTASP.
539      */
540     // TODO: This should be combined with config_use_hfa_for_provisioning and implemented as an enum
541     // (NONE, HFA, OTASP).
542     public static final String KEY_USE_OTASP_FOR_PROVISIONING_BOOL =
543             "use_otasp_for_provisioning_bool";
544 
545     /** Display carrier settings menu if true */
546     public static final String KEY_CARRIER_SETTINGS_ENABLE_BOOL = "carrier_settings_enable_bool";
547 
548     /** Does not display additional call setting for IMS phone based on GSM Phone */
549     public static final String KEY_ADDITIONAL_CALL_SETTING_BOOL = "additional_call_setting_bool";
550 
551     /** Show APN Settings for some CDMA carriers */
552     public static final String KEY_SHOW_APN_SETTING_CDMA_BOOL = "show_apn_setting_cdma_bool";
553 
554     /** After a CDMA conference call is merged, the swap button should be displayed. */
555     public static final String KEY_SUPPORT_SWAP_AFTER_MERGE_BOOL = "support_swap_after_merge_bool";
556 
557     /**
558      * Determine whether user can edit voicemail number in Settings.
559      */
560     public static final String KEY_EDITABLE_VOICEMAIL_NUMBER_SETTING_BOOL =
561             "editable_voicemail_number_setting_bool";
562 
563     /**
564      * Since the default voicemail number is empty, if a SIM card does not have a voicemail number
565      * available the user cannot use voicemail. This flag allows the user to edit the voicemail
566      * number in such cases, and is false by default.
567      */
568     public static final String KEY_EDITABLE_VOICEMAIL_NUMBER_BOOL =
569             "editable_voicemail_number_bool";
570 
571     /**
572      * Determine whether the voicemail notification is persistent in the notification bar. If true,
573      * the voicemail notifications cannot be dismissed from the notification bar.
574      */
575     public static final String KEY_VOICEMAIL_NOTIFICATION_PERSISTENT_BOOL =
576             "voicemail_notification_persistent_bool";
577 
578     /** For IMS video over LTE calls, determines whether video pause signalling is supported. */
579     public static final String KEY_SUPPORT_PAUSE_IMS_VIDEO_CALLS_BOOL =
580             "support_pause_ims_video_calls_bool";
581 
582     /**
583      * Disables dialing "*228" (OTASP provisioning) on CDMA carriers where it is not supported or is
584      * potentially harmful by locking the SIM to 3G.
585      */
586     public static final String KEY_DISABLE_CDMA_ACTIVATION_CODE_BOOL =
587             "disable_cdma_activation_code_bool";
588 
589     /**
590      * List of network type constants which support only a single data connection at a time.
591      * Some carriers do not support multiple PDP on UMTS.
592      * @see TelephonyManager NETWORK_TYPE_*
593      * @see #KEY_ONLY_SINGLE_DC_ALLOWED_INT_ARRAY
594      */
595     public static final String KEY_ONLY_SINGLE_DC_ALLOWED_INT_ARRAY =
596             "only_single_dc_allowed_int_array";
597 
598     /**
599      * Only apply if {@link #KEY_ONLY_SINGLE_DC_ALLOWED_INT_ARRAY} specifies the network types that
600      * support a single data connection at a time. This key defines a list of network capabilities
601      * which, if requested, will exempt the request from single data connection checks.
602      * @see NetworkCapabilities NET_CAPABILITY_*
603      */
604     public static final String KEY_CAPABILITIES_EXEMPT_FROM_SINGLE_DC_CHECK_INT_ARRAY =
605             "capabilities_exempt_from_single_dc_check_int_array";
606 
607     /**
608      * Override the platform's notion of a network operator being considered roaming.
609      * Value is string array of MCCMNCs to be considered roaming for 3GPP RATs.
610      */
611     public static final String KEY_GSM_ROAMING_NETWORKS_STRING_ARRAY =
612             "gsm_roaming_networks_string_array";
613 
614     /**
615      * Override the platform's notion of a network operator being considered not roaming.
616      * Value is string array of MCCMNCs to be considered not roaming for 3GPP RATs.
617      */
618     public static final String KEY_GSM_NONROAMING_NETWORKS_STRING_ARRAY =
619             "gsm_nonroaming_networks_string_array";
620 
621     /**
622      * The package name containing the ImsService that will be bound to the telephony framework to
623      * support both IMS MMTEL and RCS feature functionality instead of the device default
624      * ImsService for this subscription.
625      * @deprecated Use {@link #KEY_CONFIG_IMS_MMTEL_PACKAGE_OVERRIDE_STRING} and
626      * {@link #KEY_CONFIG_IMS_RCS_PACKAGE_OVERRIDE_STRING} instead to configure these values
627      * separately. If any of those values are not empty, they will override this value.
628      */
629     @Deprecated
630     public static final String KEY_CONFIG_IMS_PACKAGE_OVERRIDE_STRING =
631             "config_ims_package_override_string";
632 
633     /**
634      * The package name containing the ImsService that will be bound to the telephony framework to
635      * support IMS MMTEL feature functionality instead of the device default ImsService for this
636      * subscription.
637      */
638     public static final String KEY_CONFIG_IMS_MMTEL_PACKAGE_OVERRIDE_STRING =
639             "config_ims_mmtel_package_override_string";
640 
641     /**
642      * The package name containing the ImsService that will be bound to the telephony framework to
643      * support IMS RCS feature functionality instead of the device default ImsService for this
644      * subscription.
645      */
646     public static final String KEY_CONFIG_IMS_RCS_PACKAGE_OVERRIDE_STRING =
647             "config_ims_rcs_package_override_string";
648 
649     /**
650      * Override the package that will manage {@link SubscriptionPlan}
651      * information instead of the {@link CarrierService} that defines this
652      * value.
653      *
654      * @see SubscriptionManager#getSubscriptionPlans(int)
655      * @see SubscriptionManager#setSubscriptionPlans(int, java.util.List)
656      */
657     public static final String KEY_CONFIG_PLANS_PACKAGE_OVERRIDE_STRING =
658             "config_plans_package_override_string";
659 
660     /**
661      * Override the platform's notion of a network operator being considered roaming.
662      * Value is string array of SIDs to be considered roaming for 3GPP2 RATs.
663      */
664     public static final String
665             KEY_CDMA_ROAMING_NETWORKS_STRING_ARRAY = "cdma_roaming_networks_string_array";
666 
667     /**
668      * Override the platform's notion of a network operator being considered non roaming.
669      * Value is string array of SIDs to be considered not roaming for 3GPP2 RATs.
670      */
671     public static final String
672             KEY_CDMA_NONROAMING_NETWORKS_STRING_ARRAY = "cdma_nonroaming_networks_string_array";
673 
674     /**
675      * Override the platform's notion of a network operator being considered non roaming.
676      * If true all networks are considered as home network a.k.a. non-roaming. When false,
677      * the 2 pairs of CMDA and GSM roaming/non-roaming arrays are consulted.
678      *
679      * @see #KEY_GSM_ROAMING_NETWORKS_STRING_ARRAY
680      * @see #KEY_GSM_NONROAMING_NETWORKS_STRING_ARRAY
681      * @see #KEY_CDMA_ROAMING_NETWORKS_STRING_ARRAY
682      * @see #KEY_CDMA_NONROAMING_NETWORKS_STRING_ARRAY
683      */
684     public static final String
685             KEY_FORCE_HOME_NETWORK_BOOL = "force_home_network_bool";
686 
687     /**
688      * Flag specifying whether VoLTE should be available for carrier, independent of carrier
689      * provisioning. If false: hard disabled. If true: then depends on carrier provisioning,
690      * availability, etc.
691      */
692     public static final String KEY_CARRIER_VOLTE_AVAILABLE_BOOL = "carrier_volte_available_bool";
693 
694     /**
695      * Flag specifying whether video telephony is available for carrier. If false: hard disabled.
696      * If true: then depends on carrier provisioning, availability, etc.
697      */
698     public static final String KEY_CARRIER_VT_AVAILABLE_BOOL = "carrier_vt_available_bool";
699 
700     /**
701      * Specify the method of selection for UE sending USSD requests. The default value is
702      * {@link #USSD_OVER_CS_PREFERRED}.
703      * <p> Available options:
704      * <ul>
705      *   <li>0: {@link #USSD_OVER_CS_PREFERRED} </li>
706      *   <li>1: {@link #USSD_OVER_IMS_PREFERRED} </li>
707      *   <li>2: {@link #USSD_OVER_CS_ONLY} </li>
708      *   <li>3: {@link #USSD_OVER_IMS_ONLY} </li>
709      * </ul>
710      */
711     public static final String KEY_CARRIER_USSD_METHOD_INT = "carrier_ussd_method_int";
712 
713     /**
714      * Flag specifying whether to show an alert dialog for 5G disable when the user disables VoLTE.
715      * By default this value is {@code false}.
716      *
717      * @hide
718      */
719     public static final String KEY_VOLTE_5G_LIMITED_ALERT_DIALOG_BOOL =
720             "volte_5g_limited_alert_dialog_bool";
721 
722     /**
723      * Flag specifying whether the carrier wants to notify the user when a VT call has been handed
724      * over from WIFI to LTE.
725      * <p>
726      * The handover notification is sent as a
727      * {@link TelephonyManager#EVENT_HANDOVER_VIDEO_FROM_WIFI_TO_LTE}
728      * {@link android.telecom.Connection} event, which an {@link android.telecom.InCallService}
729      * should use to trigger the display of a user-facing message.
730      * <p>
731      * The Connection event is sent to the InCallService only once, the first time it occurs.
732      * @hide
733      */
734     public static final String KEY_NOTIFY_HANDOVER_VIDEO_FROM_WIFI_TO_LTE_BOOL =
735             "notify_handover_video_from_wifi_to_lte_bool";
736 
737     /**
738      * Flag specifying whether the carrier supports merging a RTT call with a voice call,
739      * downgrading the call in the process.
740      * @hide
741      */
742     public static final String KEY_ALLOW_MERGING_RTT_CALLS_BOOL = "allow_merging_rtt_calls_bool";
743 
744     /**
745      * Flag specifying whether the carrier wants to notify the user when a VT call has been handed
746      * over from LTE to WIFI.
747      * <p>
748      * The handover notification is sent as a
749      * {@link TelephonyManager#EVENT_HANDOVER_VIDEO_FROM_LTE_TO_WIFI}
750      * {@link android.telecom.Connection} event, which an {@link android.telecom.InCallService}
751      * should use to trigger the display of a user-facing message.
752      * @hide
753      */
754     public static final String KEY_NOTIFY_HANDOVER_VIDEO_FROM_LTE_TO_WIFI_BOOL =
755             "notify_handover_video_from_lte_to_wifi_bool";
756 
757     /**
758      * Flag specifying whether the carrier supports downgrading a video call (tx, rx or tx/rx)
759      * directly to an audio call.
760      * @hide
761      */
762     public static final String KEY_SUPPORT_DOWNGRADE_VT_TO_AUDIO_BOOL =
763             "support_downgrade_vt_to_audio_bool";
764 
765     /**
766      * Where there is no preloaded voicemail number on a SIM card, specifies the carrier's default
767      * voicemail number.
768      * When empty string, no default voicemail number is specified.
769      */
770     public static final String KEY_DEFAULT_VM_NUMBER_STRING = "default_vm_number_string";
771 
772     /**
773      * Where there is no preloaded voicemail number on a SIM card, specifies the carrier's default
774      * voicemail number for roaming network.
775      * When empty string, no default voicemail number is specified for roaming network.
776      * @hide
777      */
778     public static final String KEY_DEFAULT_VM_NUMBER_ROAMING_STRING =
779             "default_vm_number_roaming_string";
780 
781     /**
782      * Where there is no preloaded voicemail number on a SIM card, specifies the carrier's default
783      * voicemail number while the device is both roaming and not registered for IMS.
784      * When empty string, no default voicemail number is specified for roaming network and
785      * unregistered state in IMS.
786      */
787     public static final String KEY_DEFAULT_VM_NUMBER_ROAMING_AND_IMS_UNREGISTERED_STRING =
788             "default_vm_number_roaming_and_ims_unregistered_string";
789 
790     /**
791      * Flag that specifies to use the user's own phone number as the voicemail number when there is
792      * no pre-loaded voicemail number on the SIM card.
793      * <p>
794      * {@link #KEY_DEFAULT_VM_NUMBER_STRING} takes precedence over this flag.
795      * <p>
796      * If false, the system default (*86) will be used instead.
797      */
798     public static final String KEY_CONFIG_TELEPHONY_USE_OWN_NUMBER_FOR_VOICEMAIL_BOOL =
799             "config_telephony_use_own_number_for_voicemail_bool";
800 
801     /**
802      * When {@code true}, changes to the mobile data enabled switch will not cause the VT
803      * registration state to change. That is, turning on or off mobile data will not cause VT to be
804      * enabled or disabled.
805      * When {@code false}, disabling mobile data will cause VT to be de-registered.
806      */
807     public static final String KEY_IGNORE_DATA_ENABLED_CHANGED_FOR_VIDEO_CALLS =
808             "ignore_data_enabled_changed_for_video_calls";
809 
810     /**
811      * Flag indicating whether data used for a video call over LTE is metered or not.
812      * <p>
813      * When {@code true}, if the device hits the data limit or data is disabled during a ViLTE call,
814      * the call will be downgraded to audio-only (or paused if
815      * {@link #KEY_SUPPORT_PAUSE_IMS_VIDEO_CALLS_BOOL} is {@code true}).
816      *
817      * @hide
818      */
819     public static final String KEY_VILTE_DATA_IS_METERED_BOOL = "vilte_data_is_metered_bool";
820 
821     /**
822      * Flag specifying whether WFC over IMS should be available for carrier: independent of
823      * carrier provisioning. If false: hard disabled. If true: then depends on carrier
824      * provisioning, availability etc.
825      */
826     public static final String KEY_CARRIER_WFC_IMS_AVAILABLE_BOOL =
827             "carrier_wfc_ims_available_bool";
828 
829     /**
830      * Flag specifying whether Cross SIM over IMS should be available for carrier.
831      * When {@code false} the carrier does not support cross SIM calling.
832      * When {@code true} the carrier does support cross sim calling, where available
833      */
834     public static final String KEY_CARRIER_CROSS_SIM_IMS_AVAILABLE_BOOL =
835             "carrier_cross_sim_ims_available_bool";
836 
837     /**
838      * Flag specifying whether cross sim calling on opportunistic data is supported for carrier.
839      * When {@code false} the carrier does not support cross sim calling on opportunistic data.
840      * When {@code true} the carrier does support cross sim calling on opportunistic data.
841      */
842     public static final String KEY_ENABLE_CROSS_SIM_CALLING_ON_OPPORTUNISTIC_DATA_BOOL =
843             "enable_cross_sim_calling_on_opportunistic_data_bool";
844 
845     /**
846      * Specifies a map from dialstrings to replacements for roaming network service numbers which
847      * cannot be replaced on the carrier side.
848      * <p>
849      * Individual entries have the format:
850      * [dialstring to replace]:[replacement]
851      */
852     public static final String KEY_DIAL_STRING_REPLACE_STRING_ARRAY =
853             "dial_string_replace_string_array";
854 
855     /**
856      * Specifies a map from dialstrings to replacements for international roaming network service
857      * numbers which cannot be replaced on the carrier side.
858      * <p>
859      * Individual entries have the format:
860      * [dialstring to replace]:[replacement]
861      * @hide
862      */
863     public static final String KEY_INTERNATIONAL_ROAMING_DIAL_STRING_REPLACE_STRING_ARRAY =
864             "international_roaming_dial_string_replace_string_array";
865 
866     /**
867      * Flag specifying whether WFC over IMS supports the "wifi only" option. If false, the wifi
868      * calling settings will not include an option for "wifi only". If true, the wifi calling
869      * settings will include an option for "wifi only"
870      * <p>
871      * By default, it is assumed that WFC supports "wifi only".
872      */
873     public static final String KEY_CARRIER_WFC_SUPPORTS_WIFI_ONLY_BOOL =
874             "carrier_wfc_supports_wifi_only_bool";
875 
876     /**
877      * Default mode for WFC over IMS on home network:
878      * <ul>
879      *   <li>0: Wi-Fi only
880      *   <li>1: prefer mobile network
881      *   <li>2: prefer Wi-Fi
882      * </ul>
883      */
884     public static final String KEY_CARRIER_DEFAULT_WFC_IMS_MODE_INT =
885             "carrier_default_wfc_ims_mode_int";
886 
887     /**
888      * Default mode for WFC over IMS on roaming network.
889      * See {@link #KEY_CARRIER_DEFAULT_WFC_IMS_MODE_INT} for meaning of values.
890      */
891     public static final String KEY_CARRIER_DEFAULT_WFC_IMS_ROAMING_MODE_INT =
892             "carrier_default_wfc_ims_roaming_mode_int";
893 
894     /**
895      * Default WFC_IMS_enabled: true VoWiFi by default is on
896      *                          false VoWiFi by default is off
897      */
898     public static final String KEY_CARRIER_DEFAULT_WFC_IMS_ENABLED_BOOL =
899             "carrier_default_wfc_ims_enabled_bool";
900 
901     /**
902      * Default WFC_IMS_roaming_enabled: true VoWiFi roaming by default is on
903      *                                  false VoWiFi roaming by default is off
904      * @hide
905      */
906     public static final String KEY_CARRIER_DEFAULT_WFC_IMS_ROAMING_ENABLED_BOOL =
907             "carrier_default_wfc_ims_roaming_enabled_bool";
908 
909     /**
910      * Flag indicating whether failed calls due to no service should prompt the user to enable
911      * WIFI calling. When {@code true}, if the user attempts to establish a call when there is no
912      * service available, they are connected to WIFI, and WIFI calling is disabled, a different
913      * call failure message will be used to encourage the user to enable WIFI calling.
914      * @hide
915      */
916     public static final String KEY_CARRIER_PROMOTE_WFC_ON_CALL_FAIL_BOOL =
917             "carrier_promote_wfc_on_call_fail_bool";
918 
919     /**
920      * Flag specifying whether provisioning is required for RCS.
921      */
922     public static final String KEY_CARRIER_RCS_PROVISIONING_REQUIRED_BOOL =
923             "carrier_rcs_provisioning_required_bool";
924 
925     /**
926      * Flag specifying whether provisioning is required for VoLTE, Video Telephony, and WiFi
927      * Calling.
928 
929      * Combines VoLTE, VT, VoWiFI calling provisioning into one parameter.
930      * @deprecated Use {@link Ims#KEY_MMTEL_REQUIRES_PROVISIONING_BUNDLE} instead for
931      * finer-grained control.
932      * changing carrier_volte_provisioning_required_bool requires changes to
933      * mmtel_requires_provisioning_bundle and vice versa
934      * {@link Ims#KEY_MMTEL_REQUIRES_PROVISIONING_BUNDLE}
935      */
936     @Deprecated
937     public static final String KEY_CARRIER_VOLTE_PROVISIONING_REQUIRED_BOOL =
938             "carrier_volte_provisioning_required_bool";
939 
940     /**
941      * Flag indicating whether or not the IMS MmTel UT capability requires carrier provisioning
942      * before it can be set as enabled.
943      *
944      * If true, the UT capability will be set to false for the newly loaded subscription
945      * and will require the carrier provisioning app to set the persistent provisioning result.
946      * If false, the platform will not wait for provisioning status updates for the UT capability
947      * and enable the UT over IMS capability for the subscription when the subscription is loaded.
948      *
949      * The default value for this key is {@code false}.
950      *
951      * @deprecated Use {@link Ims#KEY_MMTEL_REQUIRES_PROVISIONING_BUNDLE} instead for
952      * determining if UT requires provisioning.
953      */
954     @Deprecated
955     public static final String KEY_CARRIER_UT_PROVISIONING_REQUIRED_BOOL =
956             "carrier_ut_provisioning_required_bool";
957 
958     /**
959      * Flag indicating whether or not the carrier supports Supplementary Services over the UT
960      * interface for this subscription.
961      *
962      * If true, the device will use Supplementary Services over UT when provisioned (see
963      * {@link #KEY_CARRIER_UT_PROVISIONING_REQUIRED_BOOL}). If false, this device will fallback to
964      * circuit switch for supplementary services and will disable this capability for IMS entirely.
965      *
966      * The default value for this key is {@code false}.
967      */
968     public static final String KEY_CARRIER_SUPPORTS_SS_OVER_UT_BOOL =
969             "carrier_supports_ss_over_ut_bool";
970 
971     /**
972      * Flag specifying if WFC provisioning depends on VoLTE provisioning.
973      *
974      * {@code false}: default value; honor actual WFC provisioning state.
975      * {@code true}: when VoLTE is not provisioned, treat WFC as not provisioned; when VoLTE is
976      *               provisioned, honor actual WFC provisioning state.
977      *
978      * As of now, Verizon is the only carrier enforcing this dependency in their
979      * WFC awareness and activation requirements.
980      */
981     public static final String KEY_CARRIER_VOLTE_OVERRIDE_WFC_PROVISIONING_BOOL =
982             "carrier_volte_override_wfc_provisioning_bool";
983 
984     /**
985      * Override the device's configuration for the cellular data service to use for this SIM card.
986      * @hide
987      */
988     public static final String KEY_CARRIER_DATA_SERVICE_WWAN_PACKAGE_OVERRIDE_STRING =
989             "carrier_data_service_wwan_package_override_string";
990 
991     /**
992      * Override the device's configuration for the IWLAN data service to use for this SIM card.
993      * @hide
994      */
995     public static final String KEY_CARRIER_DATA_SERVICE_WLAN_PACKAGE_OVERRIDE_STRING =
996             "carrier_data_service_wlan_package_override_string";
997 
998     /**
999      * Override the device's configuration for the cellular data service class to use
1000      * for this SIM card.
1001      * @hide
1002      */
1003     public static final String KEY_CARRIER_DATA_SERVICE_WWAN_CLASS_OVERRIDE_STRING =
1004             "carrier_data_service_wwan_class_override_string";
1005 
1006     /**
1007      * Override the device's configuration for the IWLAN data service class to use
1008      * for this SIM card.
1009      * @hide
1010      */
1011     public static final String KEY_CARRIER_DATA_SERVICE_WLAN_CLASS_OVERRIDE_STRING =
1012             "carrier_data_service_wlan_class_override_string";
1013 
1014     /** Flag specifying whether VoLTE TTY is supported. */
1015     public static final String KEY_CARRIER_VOLTE_TTY_SUPPORTED_BOOL =
1016             "carrier_volte_tty_supported_bool";
1017 
1018     /** Flag specifying whether VoWIFI TTY is supported.
1019      * @hide
1020      */
1021     public static final String KEY_CARRIER_VOWIFI_TTY_SUPPORTED_BOOL =
1022             "carrier_vowifi_tty_supported_bool";
1023 
1024     /**
1025      * Flag specifying whether IMS service can be turned off. If false then the service will not be
1026      * turned-off completely, but individual features can be disabled.
1027      */
1028     public static final String KEY_CARRIER_ALLOW_TURNOFF_IMS_BOOL =
1029             "carrier_allow_turnoff_ims_bool";
1030 
1031     /**
1032      * Flag specifying whether Generic Bootstrapping Architecture capable SIM is required for IMS.
1033      */
1034     public static final String KEY_CARRIER_IMS_GBA_REQUIRED_BOOL =
1035             "carrier_ims_gba_required_bool";
1036 
1037     /**
1038      * Flag specifying whether IMS instant lettering is available for the carrier. {@code True} if
1039      * instant lettering is available for the carrier, {@code false} otherwise.
1040      */
1041     public static final String KEY_CARRIER_INSTANT_LETTERING_AVAILABLE_BOOL =
1042             "carrier_instant_lettering_available_bool";
1043 
1044     /**
1045      * Flag specifying whether IMS should be the first phone attempted for E911 even if the
1046      * phone is not in service.
1047      */
1048     public static final String KEY_CARRIER_USE_IMS_FIRST_FOR_EMERGENCY_BOOL =
1049             "carrier_use_ims_first_for_emergency_bool";
1050 
1051     /**
1052      * When {@code true}, this carrier will preferentially dial normal routed emergency calls over
1053      * an in-service SIM if one is available.
1054      * @hide
1055      */
1056     public static final String KEY_PREFER_IN_SERVICE_SIM_FOR_NORMAL_ROUTED_EMERGENCY_CALLS_BOOL =
1057             "prefer_in_service_sim_for_normal_routed_emergency_calls_bool";
1058 
1059     /**
1060      * When {@code true}, the determination of whether to place a call as an emergency call will be
1061      * based on the known {@link android.telephony.emergency.EmergencyNumber}s for the SIM on which
1062      * the call is being placed. In a dual SIM scenario, if Sim A has the emergency numbers
1063      * 123, 456 and Sim B has the emergency numbers 789, and the user places a call on SIM A to 789,
1064      * it will not be treated as an emergency call in this case.
1065      * When {@code false}, the determination is based on the emergency numbers from all device SIMs,
1066      * regardless of which SIM the call is being placed on. If Sim A has the emergency numbers
1067      * 123, 456 and Sim B has the emergency numbers 789, and the user places a call on SIM A to 789,
1068      * the call will be dialed as an emergency number, but with an unspecified routing.
1069      * @hide
1070      */
1071     public static final String KEY_USE_ONLY_DIALED_SIM_ECC_LIST_BOOL =
1072             "use_only_dialed_sim_ecc_list_bool";
1073 
1074     /**
1075      * When IMS instant lettering is available for a carrier (see
1076      * {@link #KEY_CARRIER_INSTANT_LETTERING_AVAILABLE_BOOL}), determines the list of characters
1077      * which may not be contained in messages. Should be specified as a regular expression suitable
1078      * for use with {@link String#matches(String)}.
1079      */
1080     public static final String KEY_CARRIER_INSTANT_LETTERING_INVALID_CHARS_STRING =
1081             "carrier_instant_lettering_invalid_chars_string";
1082 
1083     /**
1084      * When IMS instant lettering is available for a carrier (see
1085      * {@link #KEY_CARRIER_INSTANT_LETTERING_AVAILABLE_BOOL}), determines a list of characters which
1086      * must be escaped with a backslash '\' character. Should be specified as a string containing
1087      * the characters to be escaped. For example to escape quote and backslash the string would be
1088      * a quote and a backslash.
1089      */
1090     public static final String KEY_CARRIER_INSTANT_LETTERING_ESCAPED_CHARS_STRING =
1091             "carrier_instant_lettering_escaped_chars_string";
1092 
1093     /**
1094      * When IMS instant lettering is available for a carrier (see
1095      * {@link #KEY_CARRIER_INSTANT_LETTERING_AVAILABLE_BOOL}), determines the character encoding
1096      * which will be used when determining the length of messages. Used in the InCall UI to limit
1097      * the number of characters the user may type. If empty-string, the instant lettering
1098      * message size limit will be enforced on a 1:1 basis. That is, each character will count
1099      * towards the messages size limit as a single byte. If a character encoding is specified, the
1100      * message size limit will be based on the number of bytes in the message per the specified
1101      * encoding.
1102      */
1103     public static final String KEY_CARRIER_INSTANT_LETTERING_ENCODING_STRING =
1104             "carrier_instant_lettering_encoding_string";
1105 
1106     /**
1107      * When IMS instant lettering is available for a carrier (see
1108      * {@link #KEY_CARRIER_INSTANT_LETTERING_AVAILABLE_BOOL}), the length limit for messages. Used
1109      * in the InCall UI to ensure the user cannot enter more characters than allowed by the carrier.
1110      * See also {@link #KEY_CARRIER_INSTANT_LETTERING_ENCODING_STRING} for more information on how
1111      * the length of the message is calculated.
1112      */
1113     public static final String KEY_CARRIER_INSTANT_LETTERING_LENGTH_LIMIT_INT =
1114             "carrier_instant_lettering_length_limit_int";
1115 
1116     /**
1117      * If Voice Radio Technology is RIL_RADIO_TECHNOLOGY_LTE:14 or RIL_RADIO_TECHNOLOGY_UNKNOWN:0
1118      * this is the value that should be used instead. A configuration value of
1119      * RIL_RADIO_TECHNOLOGY_UNKNOWN:0 means there is no replacement value and that the default
1120      * assumption for phone type (GSM) should be used.
1121      */
1122     public static final String KEY_VOLTE_REPLACEMENT_RAT_INT = "volte_replacement_rat_int";
1123 
1124     /**
1125      * The default sim call manager to use when the default dialer doesn't implement one. A sim call
1126      * manager can control and route outgoing and incoming phone calls, even if they're placed
1127      * using another connection service (PSTN, for example).
1128      */
1129     public static final String KEY_DEFAULT_SIM_CALL_MANAGER_STRING =
1130             "default_sim_call_manager_string";
1131 
1132     /**
1133      * The default flag specifying whether ETWS/CMAS test setting is forcibly disabled in
1134      * Settings->More->Emergency broadcasts menu even though developer options is turned on.
1135      * @deprecated Use {@code com.android.cellbroadcastreceiver.CellBroadcastReceiver} resource
1136      * {@code show_test_settings} to control whether to show test alert settings or not.
1137      */
1138     @Deprecated
1139     public static final String KEY_CARRIER_FORCE_DISABLE_ETWS_CMAS_TEST_BOOL =
1140             "carrier_force_disable_etws_cmas_test_bool";
1141 
1142     /**
1143      * The default flag specifying whether "Allow alerts" option will be always shown in
1144      * emergency alerts settings regardless developer options is turned on or not.
1145      *
1146      * @deprecated The allow alerts option is always shown now. No longer need a config for that.
1147      */
1148     @Deprecated
1149     public static final String KEY_ALWAYS_SHOW_EMERGENCY_ALERT_ONOFF_BOOL =
1150             "always_show_emergency_alert_onoff_bool";
1151 
1152     /**
1153      * Default mobile network MTU value, in bytes.
1154      * @hide
1155      */
1156     public static final String KEY_DEFAULT_MTU_INT = "default_mtu_int";
1157 
1158     /**
1159      * Delay in milliseconds for retrying APN after disconnect
1160      * @hide
1161      */
1162     public static final String KEY_CARRIER_DATA_CALL_APN_RETRY_AFTER_DISCONNECT_LONG =
1163             "carrier_data_call_apn_retry_after_disconnect_long";
1164 
1165     /**
1166      * Data call setup permanent failure causes by the carrier.
1167      *
1168      * @deprecated This API key was added in mistake and is not used anymore by the telephony data
1169      * frameworks.
1170      */
1171     @Deprecated
1172     public static final String KEY_CARRIER_DATA_CALL_PERMANENT_FAILURE_STRINGS =
1173             "carrier_data_call_permanent_failure_strings";
1174 
1175     /**
1176      * A string array indicating the default APN types that are metered by the carrier.
1177      *
1178      * The string in the array is the name of the APN type. For example, "default" for
1179      * {@link ApnSetting#TYPE_DEFAULT}, "mms" for {@link ApnSetting#TYPE_MMS}, etc.
1180      *
1181      * The default value is {@code {"default", "mms", "dun", "supl"}}.
1182      *
1183      * @see ApnSetting#TYPE_DEFAULT
1184      * @see ApnSetting#TYPE_MMS
1185      * @see ApnSetting#TYPE_SUPL
1186      * @see ApnSetting#TYPE_DUN
1187      * @see ApnSetting#TYPE_HIPRI
1188      * @see ApnSetting#TYPE_FOTA
1189      * @see ApnSetting#TYPE_IMS
1190      * @see ApnSetting#TYPE_CBS
1191      * @see ApnSetting#TYPE_IA
1192      * @see ApnSetting#TYPE_EMERGENCY
1193      * @see ApnSetting#TYPE_MCX
1194      * @see ApnSetting#TYPE_XCAP
1195      * @see ApnSetting#TYPE_BIP
1196      * @see ApnSetting#TYPE_VSIM
1197      * @see ApnSetting#TYPE_ENTERPRISE
1198      */
1199     public static final String KEY_CARRIER_METERED_APN_TYPES_STRINGS =
1200             "carrier_metered_apn_types_strings";
1201 
1202     /**
1203      * A string array indicating the default APN types that are roaming-metered by the carrier.
1204      *
1205      * The string in the array is the name of the APN type. For example, "default" for
1206      * {@link ApnSetting#TYPE_DEFAULT}, "mms" for {@link ApnSetting#TYPE_MMS}, etc.
1207      *
1208      * The default value is {@code {"default", "mms", "dun", "supl"}}.
1209      *
1210      * @see ApnSetting#TYPE_DEFAULT
1211      * @see ApnSetting#TYPE_MMS
1212      * @see ApnSetting#TYPE_SUPL
1213      * @see ApnSetting#TYPE_DUN
1214      * @see ApnSetting#TYPE_HIPRI
1215      * @see ApnSetting#TYPE_FOTA
1216      * @see ApnSetting#TYPE_IMS
1217      * @see ApnSetting#TYPE_CBS
1218      * @see ApnSetting#TYPE_IA
1219      * @see ApnSetting#TYPE_EMERGENCY
1220      * @see ApnSetting#TYPE_MCX
1221      * @see ApnSetting#TYPE_XCAP
1222      * @see ApnSetting#TYPE_BIP
1223      * @see ApnSetting#TYPE_VSIM
1224      * @see ApnSetting#TYPE_ENTERPRISE
1225      */
1226     public static final String KEY_CARRIER_METERED_ROAMING_APN_TYPES_STRINGS =
1227             "carrier_metered_roaming_apn_types_strings";
1228 
1229     /**
1230      * CDMA carrier ERI (Enhanced Roaming Indicator) file name
1231      * @hide
1232      */
1233     public static final String KEY_CARRIER_ERI_FILE_NAME_STRING = "carrier_eri_file_name_string";
1234 
1235     /* The following 3 fields are related to carrier visual voicemail. */
1236 
1237     /**
1238      * The carrier number mobile outgoing (MO) sms messages are sent to.
1239      */
1240     public static final String KEY_VVM_DESTINATION_NUMBER_STRING = "vvm_destination_number_string";
1241 
1242     /**
1243      * The port through which the mobile outgoing (MO) sms messages are sent through.
1244      */
1245     public static final String KEY_VVM_PORT_NUMBER_INT = "vvm_port_number_int";
1246 
1247     /**
1248      * The type of visual voicemail protocol the carrier adheres to. See {@link TelephonyManager}
1249      * for possible values. For example {@link TelephonyManager#VVM_TYPE_OMTP}.
1250      */
1251     public static final String KEY_VVM_TYPE_STRING = "vvm_type_string";
1252 
1253     /**
1254      * Whether cellular data is required to access visual voicemail.
1255      */
1256     public static final String KEY_VVM_CELLULAR_DATA_REQUIRED_BOOL =
1257             "vvm_cellular_data_required_bool";
1258 
1259     /**
1260      * The default OMTP visual voicemail client prefix to use. Defaulted to "//VVM"
1261      */
1262     public static final String KEY_VVM_CLIENT_PREFIX_STRING = "vvm_client_prefix_string";
1263 
1264     /**
1265      * Whether to use SSL to connect to the visual voicemail IMAP server. Defaulted to false.
1266      */
1267     public static final String KEY_VVM_SSL_ENABLED_BOOL = "vvm_ssl_enabled_bool";
1268 
1269     /**
1270      * A set of capabilities that should not be used even if it is reported by the visual voicemail
1271      * IMAP CAPABILITY command.
1272      */
1273     public static final String KEY_VVM_DISABLED_CAPABILITIES_STRING_ARRAY =
1274             "vvm_disabled_capabilities_string_array";
1275 
1276     /**
1277      * Whether legacy mode should be used when the visual voicemail client is disabled.
1278      *
1279      * <p>Legacy mode is a mode that on the carrier side visual voicemail is still activated, but on
1280      * the client side all network operations are disabled. SMSs are still monitored so a new
1281      * message SYNC SMS will be translated to show a message waiting indicator, like traditional
1282      * voicemails.
1283      *
1284      * <p>This is for carriers that does not support VVM deactivation so voicemail can continue to
1285      * function without the data cost.
1286      */
1287     public static final String KEY_VVM_LEGACY_MODE_ENABLED_BOOL = "vvm_legacy_mode_enabled_bool";
1288 
1289     /**
1290      * Whether to prefetch audio data on new voicemail arrival, defaulted to true.
1291      */
1292     public static final String KEY_VVM_PREFETCH_BOOL = "vvm_prefetch_bool";
1293 
1294     /**
1295      * The package name of the carrier's visual voicemail app to ensure that dialer visual voicemail
1296      * and carrier visual voicemail are not active at the same time.
1297      *
1298      * @deprecated use {@link #KEY_CARRIER_VVM_PACKAGE_NAME_STRING_ARRAY}.
1299      */
1300     @Deprecated
1301     public static final String KEY_CARRIER_VVM_PACKAGE_NAME_STRING =
1302             "carrier_vvm_package_name_string";
1303 
1304     /**
1305      * A list of the carrier's visual voicemail app package names to ensure that dialer visual
1306      * voicemail and carrier visual voicemail are not active at the same time.
1307      */
1308     public static final String KEY_CARRIER_VVM_PACKAGE_NAME_STRING_ARRAY =
1309             "carrier_vvm_package_name_string_array";
1310 
1311     /**
1312      * Flag specifying whether ICCID is showed in SIM Status screen, default to false.
1313      */
1314     public static final String KEY_SHOW_ICCID_IN_SIM_STATUS_BOOL = "show_iccid_in_sim_status_bool";
1315 
1316     /**
1317      * Flag specifying whether the {@link android.telephony.SignalStrength} is shown in the SIM
1318      * Status screen. The default value is true.
1319      */
1320     public static final String KEY_SHOW_SIGNAL_STRENGTH_IN_SIM_STATUS_BOOL =
1321             "show_signal_strength_in_sim_status_bool";
1322 
1323     /**
1324      * Flag specifying if we should interpret all signal strength as one bar higher
1325      * This is a replacement for the former resource config_inflateSignalStrength
1326      * The default value is false.
1327      * @hide
1328      */
1329     public static final String KEY_INFLATE_SIGNAL_STRENGTH_BOOL =
1330             "inflate_signal_strength_bool";
1331 
1332     /**
1333      * Flag specifying whether an additional (client initiated) intent needs to be sent on System
1334      * update
1335      */
1336     public static final String KEY_CI_ACTION_ON_SYS_UPDATE_BOOL = "ci_action_on_sys_update_bool";
1337 
1338     /**
1339      * Intent to be sent for the additional action on System update
1340      */
1341     public static final String KEY_CI_ACTION_ON_SYS_UPDATE_INTENT_STRING =
1342             "ci_action_on_sys_update_intent_string";
1343 
1344     /**
1345      * Extra to be included in the intent sent for additional action on System update
1346      */
1347     public static final String KEY_CI_ACTION_ON_SYS_UPDATE_EXTRA_STRING =
1348             "ci_action_on_sys_update_extra_string";
1349 
1350     /**
1351      * Value of extra included in intent sent for additional action on System update
1352      */
1353     public static final String KEY_CI_ACTION_ON_SYS_UPDATE_EXTRA_VAL_STRING =
1354             "ci_action_on_sys_update_extra_val_string";
1355 
1356     /**
1357      * Specifies the amount of gap to be added in millis between postdial DTMF tones. When a
1358      * non-zero value is specified, the UE shall wait for the specified amount of time before it
1359      * sends out successive DTMF tones on the network.
1360      */
1361     public static final String KEY_GSM_DTMF_TONE_DELAY_INT = "gsm_dtmf_tone_delay_int";
1362 
1363     /**
1364      * Specifies the amount of gap to be added in millis between DTMF tones. When a non-zero value
1365      * is specified, the UE shall wait for the specified amount of time before it sends out
1366      * successive DTMF tones on the network.
1367      */
1368     public static final String KEY_IMS_DTMF_TONE_DELAY_INT = "ims_dtmf_tone_delay_int";
1369 
1370     /**
1371      * Specifies the amount of gap to be added in millis between postdial DTMF tones. When a
1372      * non-zero value is specified, the UE shall wait for the specified amount of time before it
1373      * sends out successive DTMF tones on the network.
1374      */
1375     public static final String KEY_CDMA_DTMF_TONE_DELAY_INT = "cdma_dtmf_tone_delay_int";
1376 
1377     /**
1378      * Some carriers will send call forwarding responses for voicemail in a format that is not 3gpp
1379      * compliant, which causes issues during parsing. This causes the
1380      * {@link com.android.internal.telephony.CallForwardInfo#number} to contain non-numerical
1381      * characters instead of a number.
1382      *
1383      * If true, we will detect the non-numerical characters and replace them with "Voicemail".
1384      * @hide
1385      */
1386     public static final String KEY_CALL_FORWARDING_MAP_NON_NUMBER_TO_VOICEMAIL_BOOL =
1387             "call_forwarding_map_non_number_to_voicemail_bool";
1388 
1389     /**
1390      * When {@code true}, the phone will always tell the IMS stack to keep RTT enabled and
1391      * determine on a per-call basis (based on extras from the dialer app) whether a call should be
1392      * an RTT call or not.
1393      *
1394      * When {@code false}, the old behavior is used, where the toggle in accessibility settings is
1395      * used to set the IMS stack's RTT enabled state.
1396      */
1397     public static final String KEY_IGNORE_RTT_MODE_SETTING_BOOL =
1398             "ignore_rtt_mode_setting_bool";
1399 
1400     /**
1401      * Determines whether adhoc conference calls are supported by a carrier. When {@code true},
1402      * adhoc conference calling is supported, {@code false otherwise}.
1403      */
1404     public static final String KEY_SUPPORT_ADHOC_CONFERENCE_CALLS_BOOL =
1405             "support_adhoc_conference_calls_bool";
1406 
1407     /**
1408      * Determines whether conference participants can be added to existing call to form an adhoc
1409      * conference call (in contrast to merging calls to form a conference). When {@code true},
1410      * adding conference participants to existing call is supported, {@code false otherwise}.
1411      */
1412     public static final String KEY_SUPPORT_ADD_CONFERENCE_PARTICIPANTS_BOOL =
1413             "support_add_conference_participants_bool";
1414 
1415     /**
1416      * Determines whether conference calls are supported by a carrier. When {@code true},
1417      * conference calling is supported, {@code false otherwise}.
1418      */
1419     public static final String KEY_SUPPORT_CONFERENCE_CALL_BOOL = "support_conference_call_bool";
1420 
1421     /**
1422      * Determines whether a maximum size limit for IMS conference calls is enforced on the device.
1423      * When {@code true}, IMS conference calls will be limited to at most
1424      * {@link #KEY_IMS_CONFERENCE_SIZE_LIMIT_INT} participants. When {@code false}, no attempt is
1425      * made to limit the number of participants in a conference (the carrier will raise an error
1426      * when an attempt is made to merge too many participants into a conference).
1427      * <p>
1428      * Note: The maximum size of a conference can ONLY be supported where
1429      * {@link #KEY_SUPPORT_IMS_CONFERENCE_EVENT_PACKAGE_BOOL} is {@code true} since the platform
1430      * needs conference event package data to accurately know the number of participants in the
1431      * conference.
1432      */
1433     public static final String KEY_IS_IMS_CONFERENCE_SIZE_ENFORCED_BOOL =
1434             "is_ims_conference_size_enforced_bool";
1435 
1436     /**
1437      * Determines the maximum number of participants the carrier supports for a conference call.
1438      * This number is exclusive of the current device. A conference between 3 devices, for example,
1439      * would have a size limit of 2 participants.
1440      * Enforced when {@link #KEY_IS_IMS_CONFERENCE_SIZE_ENFORCED_BOOL} is {@code true}.
1441      */
1442     public static final String KEY_IMS_CONFERENCE_SIZE_LIMIT_INT = "ims_conference_size_limit_int";
1443 
1444     /**
1445      * Determines whether manage IMS conference calls is supported by a carrier. When {@code true},
1446      * manage IMS conference call is supported, {@code false otherwise}.
1447      * @hide
1448      */
1449     public static final String KEY_SUPPORT_MANAGE_IMS_CONFERENCE_CALL_BOOL =
1450             "support_manage_ims_conference_call_bool";
1451 
1452     /**
1453      * Determines whether the IMS conference merge process supports and returns its participants
1454      * data. When {@code true}, on merge complete, conference call would have a list of its
1455      * participants returned in XML format, {@code false otherwise}.
1456      */
1457     public static final String KEY_SUPPORT_IMS_CONFERENCE_EVENT_PACKAGE_BOOL =
1458             "support_ims_conference_event_package_bool";
1459 
1460     /**
1461      * Determines whether processing of conference event package data received on a device other
1462      * than the conference host is supported.
1463      * <p>
1464      * When a device A merges calls B and C into a conference it is considered the conference host
1465      * and B and C are considered the conference peers.
1466      * <p>
1467      * When {@code true}, the conference peer will display the conference state if it receives
1468      * conference event package data from the network. When {@code false}, the conference peer will
1469      * ignore conference event package data received from the network.
1470      * @hide
1471      */
1472     public static final String KEY_SUPPORT_IMS_CONFERENCE_EVENT_PACKAGE_ON_PEER_BOOL =
1473             "support_ims_conference_event_package_on_peer_bool";
1474 
1475     /**
1476      * Indicates whether the carrier supports the use of RFC8285 compliant RTP header extensions for
1477      * the purpose of device to device communication while in a call.
1478      * <p>
1479      * See also {@link #KEY_SUPPORTS_SDP_NEGOTIATION_OF_D2D_RTP_HEADER_EXTENSIONS_BOOL}.
1480      */
1481     public static final String KEY_SUPPORTS_DEVICE_TO_DEVICE_COMMUNICATION_USING_RTP_BOOL =
1482             "supports_device_to_device_communication_using_rtp_bool";
1483 
1484     /**
1485      * Indicates whether the carrier supports the negotiations of RFC8285 compliant RTP header
1486      * extensions supported on a call during the Session Description Protocol (SDP). This option
1487      * is only used when {@link #KEY_SUPPORTS_DEVICE_TO_DEVICE_COMMUNICATION_USING_RTP_BOOL} is
1488      * {@code true}.
1489      * <p>
1490      * When {@code true}, the RTP header extensions the platform uses for device to device
1491      * communication will be offered to the remote end during the SDP negotiation process.
1492      * When {@code false}, the RTP header extensions will not be negotiated during the SDP
1493      * negotiation process and the platform will send RTP header extensions without prior
1494      * negotiation if {@link #KEY_SUPPORTS_DEVICE_TO_DEVICE_COMMUNICATION_USING_RTP_BOOL} is
1495      * {@code true}.
1496      */
1497     public static final String KEY_SUPPORTS_SDP_NEGOTIATION_OF_D2D_RTP_HEADER_EXTENSIONS_BOOL =
1498             "supports_sdp_negotiation_of_d2d_rtp_header_extensions_bool";
1499 
1500     /**
1501      * Indicates whether the carrier supports the use of DTMF digits A-D for the purpose of device
1502      * to device communication while in a call.
1503      */
1504     public static final String KEY_SUPPORTS_DEVICE_TO_DEVICE_COMMUNICATION_USING_DTMF_BOOL =
1505             "supports_device_to_device_communication_using_dtmf_bool";
1506 
1507     /**
1508      * Determines whether High Definition audio property is displayed in the dialer UI.
1509      * If {@code false}, remove the HD audio property from the connection so that HD audio related
1510      * UI is not displayed. If {@code true}, keep HD audio property as it is configured.
1511      */
1512     public static final String KEY_DISPLAY_HD_AUDIO_PROPERTY_BOOL =
1513             "display_hd_audio_property_bool";
1514 
1515     /**
1516      * Determines whether IMS conference calls are supported by a carrier. When {@code true},
1517      * IMS conference calling is supported, {@code false} otherwise.
1518      * @hide
1519      */
1520     public static final String KEY_SUPPORT_IMS_CONFERENCE_CALL_BOOL =
1521             "support_ims_conference_call_bool";
1522 
1523     /**
1524      * Determines whether the device will locally disconnect an IMS conference when the participant
1525      * count drops to zero. When {@code true}, it is assumed the carrier does NOT disconnect a
1526      * conference when the participant count drops to zero and that the device must do this by
1527      * disconnecting the conference locally. When {@code false}, it is assumed that the carrier
1528      * is responsible for disconnecting the conference when there are no longer any participants
1529      * present.
1530      * <p>
1531      * Note: both {@link #KEY_SUPPORT_IMS_CONFERENCE_CALL_BOOL} and
1532      * {@link #KEY_SUPPORT_IMS_CONFERENCE_EVENT_PACKAGE_BOOL} must be true for this configuration to
1533      * have any effect.
1534      * <p>
1535      * Defaults to {@code false}, meaning the carrier network is responsible for disconnecting an
1536      * empty IMS conference.
1537      * @hide
1538      */
1539     public static final String KEY_LOCAL_DISCONNECT_EMPTY_IMS_CONFERENCE_BOOL =
1540             "local_disconnect_empty_ims_conference_bool";
1541 
1542     /**
1543      * Determines whether video conference calls are supported by a carrier. When {@code true},
1544      * video calls can be merged into conference calls, {@code false} otherwise.
1545      * <p>
1546      * Note: even if video conference calls are not supported, audio calls may be merged into a
1547      * conference if {@link #KEY_SUPPORT_CONFERENCE_CALL_BOOL} is {@code true}.
1548      * @hide
1549      */
1550     public static final String KEY_SUPPORT_VIDEO_CONFERENCE_CALL_BOOL =
1551             "support_video_conference_call_bool";
1552 
1553     /**
1554      * Determine whether user can toggle Enhanced 4G LTE Mode in Settings.
1555      */
1556     public static final String KEY_EDITABLE_ENHANCED_4G_LTE_BOOL = "editable_enhanced_4g_lte_bool";
1557 
1558     /**
1559      * Determines whether the Enhanced 4G LTE toggle will be shown in the settings. When this
1560      * option is {@code true}, the toggle will be hidden regardless of whether the device and
1561      * carrier supports 4G LTE or not.
1562      */
1563     public static final String KEY_HIDE_ENHANCED_4G_LTE_BOOL = "hide_enhanced_4g_lte_bool";
1564 
1565     /**
1566      * Sets the default state for the "Enhanced 4G LTE" or "Advanced Calling" mode toggle set by the
1567      * user. When this is {@code true}, this mode by default is on, otherwise if {@code false},
1568      * this mode by default is off.
1569      */
1570     public static final String KEY_ENHANCED_4G_LTE_ON_BY_DEFAULT_BOOL =
1571             "enhanced_4g_lte_on_by_default_bool";
1572 
1573     /**
1574      * Determine whether IMS apn can be shown.
1575      */
1576     public static final String KEY_HIDE_IMS_APN_BOOL = "hide_ims_apn_bool";
1577 
1578     /**
1579      * Determine whether preferred network type can be shown.
1580      */
1581     public static final String KEY_HIDE_PREFERRED_NETWORK_TYPE_BOOL =
1582             "hide_preferred_network_type_bool";
1583 
1584     /**
1585      * String array for package names that need to be enabled for this carrier.
1586      * If user has explicitly disabled some packages in the list, won't re-enable.
1587      * Other carrier specific apps which are not in this list may be disabled for current carrier,
1588      * and only be re-enabled when this config for another carrier includes it.
1589      *
1590      * @hide
1591      */
1592     public static final String KEY_ENABLE_APPS_STRING_ARRAY = "enable_apps_string_array";
1593 
1594     /**
1595      * Determine whether user can switch Wi-Fi preferred or Cellular preferred
1596      * in calling preference.
1597      * Some operators support Wi-Fi Calling only, not VoLTE.
1598      * They don't need "Cellular preferred" option.
1599      * In this case, set uneditable attribute for preferred preference.
1600      */
1601     public static final String KEY_EDITABLE_WFC_MODE_BOOL = "editable_wfc_mode_bool";
1602 
1603     /**
1604      * Flag to indicate if Wi-Fi needs to be disabled in ECBM.
1605      */
1606     public static final String KEY_CONFIG_WIFI_DISABLE_IN_ECBM = "config_wifi_disable_in_ecbm";
1607 
1608     /**
1609      * List operator-specific error codes and indices of corresponding error strings in
1610      * wfcOperatorErrorAlertMessages and wfcOperatorErrorNotificationMessages.
1611      *
1612      * Example: "REG09|0" specifies error code "REG09" and index "0". This index will be
1613      * used to find alert and notification messages in wfcOperatorErrorAlertMessages and
1614      * wfcOperatorErrorNotificationMessages.
1615      *
1616      * @hide
1617      */
1618     public static final String KEY_WFC_OPERATOR_ERROR_CODES_STRING_ARRAY =
1619             "wfc_operator_error_codes_string_array";
1620 
1621     /**
1622      * Indexes of SPN format strings in wfcSpnFormats.
1623      *
1624      * <p>Available options are:
1625      * <ul>
1626      * <li>  0: %s</li>
1627      * <li>  1: %s Wi-Fi Calling</li>
1628      * <li>  2: WLAN Call</li>
1629      * <li>  3: %s WLAN Call</li>
1630      * <li>  4: %s Wi-Fi</li>
1631      * <li>  5: WiFi Calling | %s</li>
1632      * <li>  6: %s VoWifi</li>
1633      * <li>  7: Wi-Fi Calling</li>
1634      * <li>  8: Wi-Fi</li>
1635      * <li>  9: WiFi Calling</li>
1636      * <li> 10: VoWifi</li>
1637      * <li> 11: %s WiFi Calling</li>
1638      * <li> 12: WiFi Call</li>
1639      * @hide
1640      */
1641     public static final String KEY_WFC_SPN_FORMAT_IDX_INT = "wfc_spn_format_idx_int";
1642 
1643     /**
1644      * Indexes of data SPN format strings in wfcSpnFormats.
1645      *
1646      * @see KEY_WFC_SPN_FORMAT_IDX_INT for available options.
1647      * @hide
1648      */
1649     public static final String KEY_WFC_DATA_SPN_FORMAT_IDX_INT = "wfc_data_spn_format_idx_int";
1650 
1651     /**
1652      * Indexes of SPN format strings in wfcSpnFormats used during flight mode.
1653      *
1654      * Set to -1 to use the value from KEY_WFC_SPN_FORMAT_IDX_INT also in this case.
1655      * @see KEY_WFC_SPN_FORMAT_IDX_INT for other available options.
1656      * @hide
1657      */
1658     public static final String KEY_WFC_FLIGHT_MODE_SPN_FORMAT_IDX_INT =
1659             "wfc_flight_mode_spn_format_idx_int";
1660 
1661     /**
1662      * Use root locale when reading wfcSpnFormats.
1663      *
1664      * If true, then the root locale will always be used when reading wfcSpnFormats. This means the
1665      * non localized version of wfcSpnFormats will be used.
1666      * @hide
1667      */
1668     public static final String KEY_WFC_SPN_USE_ROOT_LOCALE = "wfc_spn_use_root_locale";
1669 
1670     /**
1671      * The Component Name of the activity that can setup the emergency address for WiFi Calling
1672      * as per carrier requirement.
1673      */
1674      public static final String KEY_WFC_EMERGENCY_ADDRESS_CARRIER_APP_STRING =
1675             "wfc_emergency_address_carrier_app_string";
1676 
1677     /**
1678      * Unconditionally override the carrier name string using #KEY_CARRIER_NAME_STRING.
1679      *
1680      * If true, then the carrier name string will be #KEY_CARRIER_NAME_STRING, unconditionally.
1681      *
1682      * <p>If false, then the override will be performed conditionally and the
1683      * #KEY_CARRIER_NAME_STRING will have the lowest-precedence; it will only be used in the event
1684      * that the name string would otherwise be empty, allowing it to serve as a last-resort. If
1685      * used, this value functions in place of the SPN on any/all ICC records for the corresponding
1686      * subscription.
1687      */
1688     public static final String KEY_CARRIER_NAME_OVERRIDE_BOOL = "carrier_name_override_bool";
1689 
1690     /**
1691      * String to identify carrier name in CarrierConfig app. This string overrides SPN if
1692      * #KEY_CARRIER_NAME_OVERRIDE_BOOL is true; otherwise, it will be used if its value is provided
1693      * and SPN is unavailable
1694      */
1695     public static final String KEY_CARRIER_NAME_STRING = "carrier_name_string";
1696 
1697     /**
1698      * To override wifi calling's carrier name string using ef_pnn from sim card when SPN in empty.
1699      *
1700      * @hide
1701      */
1702     public static final String KEY_WFC_CARRIER_NAME_OVERRIDE_BY_PNN_BOOL =
1703             "wfc_carrier_name_override_by_pnn_bool";
1704 
1705     /**
1706      * Specifies SPN format of displaying carrier name only.
1707      *
1708      */
1709     public static final int CROSS_SIM_SPN_FORMAT_CARRIER_NAME_ONLY = 0;
1710 
1711     /**
1712      * Specifies SPN format of displaying carrier name along with "Cross-SIM calling".
1713      */
1714     public static final int CROSS_SIM_SPN_FORMAT_CARRIER_NAME_WITH_BRANDING = 1;
1715 
1716     /**
1717      * Indexes of SPN format strings in crossSimSpnFormats.
1718      *
1719      * <p>Available options are:
1720      * <ul>
1721      * <li>  {@link #CROSS_SIM_SPN_FORMAT_CARRIER_NAME_ONLY}: %s</li>
1722      * <li>  {@link #CROSS_SIM_SPN_FORMAT_CARRIER_NAME_WITH_BRANDING}: %s Cross-SIM Calling</li>
1723      * </ul>
1724      * %s will be filled with carrier name
1725      */
1726     public static final String KEY_CROSS_SIM_SPN_FORMAT_INT = "cross_sim_spn_format_int";
1727 
1728     /**
1729      * Override the SPN Display Condition 2 integer bits (lsb). B2, B1 is the last two bits of the
1730      * spn display condition coding.
1731      *
1732      * The default value -1 mean this field is not set.
1733      *
1734      * B1 = 0: display of registered PLMN name not required when registered PLMN is either HPLMN
1735      * or a PLMN in the service provider PLMN list (see EF_SPDI).
1736      * B1 = 1: display of registered PLMN name required when registered PLMN is either HPLMN or a
1737      * PLMN in the service provider PLMN list(see EF_SPDI).
1738      * B2 = 0: display of the service provider name is required when registered PLMN is neither
1739      * HPLMN nor a PLMN in the service provider PLMN list(see EF_SPDI).
1740      * B2 = 1: display of the service provider name is not required when registered PLMN is neither
1741      * HPLMN nor a PLMN in the service provider PLMN list(see EF_SPDI).
1742      *
1743      * Reference: 3GPP TS 31.102 v15.2.0 Section 4.2.12 EF_SPN.
1744      * @hide
1745      */
1746     public static final String KEY_SPN_DISPLAY_CONDITION_OVERRIDE_INT =
1747             "spn_display_condition_override_int";
1748 
1749     /**
1750      * Override the SPDI - an array of PLMN(MCC + MNC) strings.
1751      *
1752      * Reference: 3GPP TS 31.102 v15.2.0 Section 4.2.66 EF_SPDI.
1753      * @hide
1754      */
1755     public static final String KEY_SPDI_OVERRIDE_STRING_ARRAY = "spdi_override_string_array";
1756 
1757     /**
1758      * Override the EHPLMNs - an array of PLMN(MCC + MNC) strings.
1759      *
1760      * To allow provision for multiple HPLMN codes, PLMN codes that are present within this list
1761      * shall replace the HPLMN code derived from the IMSI for PLMN selection purposes.
1762      *
1763      * Reference: 3GPP TS 31.102 v15.2.0 Section 4.2.84 EF_EHPLMN
1764      * Reference: 3GPP TS 23.122 v15.6.0 Section 1.2 Equivalent HPLMN list
1765      * @hide
1766      */
1767     public static final String KEY_EHPLMN_OVERRIDE_STRING_ARRAY = "ehplmn_override_string_array";
1768 
1769     /**
1770      * Override the PNN - a string array of comma-separated alpha long and short names:
1771      * "alpha_long1,alpha_short1".
1772      *
1773      * Reference: 3GPP TS 31.102 v15.2.0 Section 4.2.58 EF_PNN.
1774      * @hide
1775      */
1776     public static final String KEY_PNN_OVERRIDE_STRING_ARRAY = "pnn_override_string_array";
1777 
1778     /**
1779      * A string array of OPL records, each with comma-delimited data fields as follows:
1780      * "plmn1,lactac_start,lactac_end,index".
1781      *
1782      * Reference: 3GPP TS 31.102 v15.2.0 Section 4.2.59 EF_OPL.
1783      * @hide
1784      */
1785     public static final String KEY_OPL_OVERRIDE_STRING_ARRAY = "opl_override_opl_string_array";
1786 
1787     /**
1788      * Allow ERI rules to select a carrier name display string when using 3gpp2 access technologies.
1789      * If this bit is not set, the carrier name display string will be selected from the carrier
1790      * display name resolver which doesn't apply the ERI rules.
1791      *
1792      * @hide
1793      */
1794     public static final String KEY_ALLOW_ERI_BOOL = "allow_cdma_eri_bool";
1795 
1796     /**
1797      * If true, use the carrier display name(SPN and PLMN) from the carrier display name resolver.
1798      *
1799      * @hide
1800      */
1801     public static final String KEY_ENABLE_CARRIER_DISPLAY_NAME_RESOLVER_BOOL =
1802             "enable_carrier_display_name_resolver_bool";
1803 
1804     /**
1805      * String to override sim country iso.
1806      * Sim country iso is based on sim MCC which is coarse and doesn't work with dual IMSI SIM where
1807      * a SIM can have multiple MCC from different countries.
1808      * Instead, each sim carrier should have a single country code, apply per carrier based iso
1809      * code as an override. The overridden value can be read from
1810      * {@link TelephonyManager#getSimCountryIso()} and {@link SubscriptionInfo#getCountryIso()}
1811      */
1812     public static final String KEY_SIM_COUNTRY_ISO_OVERRIDE_STRING =
1813             "sim_country_iso_override_string";
1814 
1815     /**
1816      * The Component Name of a carrier-provided CallScreeningService implementation. Telecom will
1817      * bind to {@link android.telecom.CallScreeningService} for ALL incoming calls and provide
1818      * the carrier
1819      * CallScreeningService with the opportunity to allow or block calls.
1820      * <p>
1821      * The String includes the package name/the class name.
1822      * Example:
1823      * <item>com.android.carrier/com.android.carrier.callscreeningserviceimpl</item>
1824      * <p>
1825      * Using {@link ComponentName#flattenToString()} to convert a ComponentName object to String.
1826      * Using {@link ComponentName#unflattenFromString(String)} to convert a String object to a
1827      * ComponentName.
1828      */
1829     public static final String KEY_CARRIER_CALL_SCREENING_APP_STRING = "call_screening_app";
1830 
1831     /**
1832      * Override the registered PLMN name using #KEY_CDMA_HOME_REGISTERED_PLMN_NAME_STRING.
1833      *
1834      * If true, then the registered PLMN name (only for CDMA/CDMA-LTE and only when not roaming)
1835      * will be #KEY_CDMA_HOME_REGISTERED_PLMN_NAME_STRING. If false, or if phone type is not
1836      * CDMA/CDMA-LTE or if roaming, then #KEY_CDMA_HOME_REGISTERED_PLMN_NAME_STRING will be ignored.
1837      * @hide
1838      */
1839     public static final String KEY_CDMA_HOME_REGISTERED_PLMN_NAME_OVERRIDE_BOOL =
1840             "cdma_home_registered_plmn_name_override_bool";
1841 
1842     /**
1843      * String to identify registered PLMN name in CarrierConfig app. This string overrides
1844      * registered PLMN name if #KEY_CDMA_HOME_REGISTERED_PLMN_NAME_OVERRIDE_BOOL is true, phone type
1845      * is CDMA/CDMA-LTE and device is not in roaming state; otherwise, it will be ignored.
1846      * @hide
1847      */
1848     public static final String KEY_CDMA_HOME_REGISTERED_PLMN_NAME_STRING =
1849             "cdma_home_registered_plmn_name_string";
1850 
1851     /**
1852      * If this is true, the SIM card (through Customer Service Profile EF file) will be able to
1853      * prevent manual operator selection. If false, this SIM setting will be ignored and manual
1854      * operator selection will always be available. See CPHS4_2.WW6, CPHS B.4.7.1 for more
1855      * information
1856      */
1857     public static final String KEY_CSP_ENABLED_BOOL = "csp_enabled_bool";
1858 
1859     /**
1860      * Allow user to add APNs
1861      */
1862     public static final String KEY_ALLOW_ADDING_APNS_BOOL = "allow_adding_apns_bool";
1863 
1864     /**
1865      * APN types that user is not allowed to modify.
1866      */
1867     public static final String KEY_READ_ONLY_APN_TYPES_STRING_ARRAY =
1868             "read_only_apn_types_string_array";
1869 
1870     /**
1871      * APN fields that user is not allowed to modify.
1872      */
1873     public static final String KEY_READ_ONLY_APN_FIELDS_STRING_ARRAY =
1874             "read_only_apn_fields_string_array";
1875 
1876     /**
1877      * Default value of APN types field if not specified by user when adding/modifying an APN.
1878      */
1879     public static final String KEY_APN_SETTINGS_DEFAULT_APN_TYPES_STRING_ARRAY =
1880             "apn_settings_default_apn_types_string_array";
1881 
1882     /**
1883      * Configs used for APN setup.
1884      */
1885     public static final class Apn {
1886         /**
1887          * Prefix of all Apn.KEY_* constants.
1888          *
1889          * @deprecated Since KEY_PREFIX is unnecessary to public, it will modify to private
1890          * next android generation.
1891          */
1892         @Deprecated
1893         public static final String KEY_PREFIX = "apn.";
1894 
1895         /** IPv4 internet protocol */
1896         public static final String PROTOCOL_IPV4 = "IP";
1897         /** IPv6 internet protocol */
1898         public static final String PROTOCOL_IPV6 = "IPV6";
1899         /** IPv4 or IPv6 internet protocol */
1900         public static final String PROTOCOL_IPV4V6 = "IPV4V6";
1901 
1902         /**
1903          * Default value of APN protocol field if not specified by user when adding/modifying
1904          * an APN.
1905          *
1906          * Available options are: {@link #PROTOCOL_IPV4}, {@link #PROTOCOL_IPV6},
1907          * {@link #PROTOCOL_IPV4V6}
1908          */
1909         public static final String KEY_SETTINGS_DEFAULT_PROTOCOL_STRING =
1910                 KEY_PREFIX + "settings_default_protocol_string";
1911 
1912         /**
1913          * Default value of APN roaming protocol field if not specified by user when
1914          * adding/modifying an APN.
1915          *
1916          * Available options are: {@link #PROTOCOL_IPV4}, {@link #PROTOCOL_IPV6},
1917          * {@link #PROTOCOL_IPV4V6}
1918          */
1919         public static final String KEY_SETTINGS_DEFAULT_ROAMING_PROTOCOL_STRING =
1920                 KEY_PREFIX + "settings_default_roaming_protocol_string";
1921 
Apn()1922         private Apn() {}
1923 
getDefaults()1924         private static PersistableBundle getDefaults() {
1925             PersistableBundle defaults = new PersistableBundle();
1926             defaults.putString(KEY_SETTINGS_DEFAULT_PROTOCOL_STRING, "");
1927             defaults.putString(KEY_SETTINGS_DEFAULT_ROAMING_PROTOCOL_STRING, "");
1928             return defaults;
1929         }
1930     }
1931 
1932     /**
1933      * Boolean indicating if intent for emergency call state changes should be broadcast
1934      * @hide
1935      */
1936     public static final String KEY_BROADCAST_EMERGENCY_CALL_STATE_CHANGES_BOOL =
1937             "broadcast_emergency_call_state_changes_bool";
1938 
1939     /**
1940      * Indicates whether STK LAUNCH_BROWSER command is disabled.
1941      * If {@code true}, then the browser will not be launched
1942      * on UI for the LAUNCH_BROWSER STK command.
1943      * @hide
1944      */
1945     public static final String KEY_STK_DISABLE_LAUNCH_BROWSER_BOOL =
1946             "stk_disable_launch_browser_bool";
1947 
1948     /**
1949      * Boolean indicating if the helper text for STK GET INKEY/INPUT commands with the digit only
1950      * mode is displayed on the input screen.
1951      * The helper text is displayed regardless of the input mode, if {@code false}.
1952      * @hide
1953      */
1954     public static final String KEY_HIDE_DIGITS_HELPER_TEXT_ON_STK_INPUT_SCREEN_BOOL =
1955             "hide_digits_helper_text_on_stk_input_screen_bool";
1956 
1957     /**
1958      * Boolean indicating if show data RAT icon on status bar even when data is disabled.
1959      */
1960     public static final String KEY_ALWAYS_SHOW_DATA_RAT_ICON_BOOL =
1961             "always_show_data_rat_icon_bool";
1962 
1963     /**
1964      * Boolean indicating if default data account should show LTE or 4G icon.
1965      */
1966     public static final String KEY_SHOW_4G_FOR_LTE_DATA_ICON_BOOL =
1967             "show_4g_for_lte_data_icon_bool";
1968 
1969     /**
1970      * Boolean indicating if default data account should show 4G LTE or 4G icon.
1971      * @hide
1972      */
1973     public static final String KEY_SHOW_4GLTE_FOR_LTE_DATA_ICON_BOOL =
1974             "show_4glte_for_lte_data_icon_bool";
1975 
1976     /**
1977      * Boolean indicating if default data account should show 4G icon when in 3G.
1978      */
1979     public static final String KEY_SHOW_4G_FOR_3G_DATA_ICON_BOOL =
1980             "show_4g_for_3g_data_icon_bool";
1981 
1982     /**
1983      * Boolean indicating if LTE+ icon should be shown if available.
1984      */
1985     public static final String KEY_HIDE_LTE_PLUS_DATA_ICON_BOOL = "hide_lte_plus_data_icon_bool";
1986 
1987     /**
1988      * Boolean indicting if the 5G slice icon should be shown if available.
1989      * @hide
1990      */
1991     public static final String KEY_SHOW_5G_SLICE_ICON_BOOL = "show_5g_slice_icon_bool";
1992 
1993     /**
1994      * The combined channel bandwidth threshold (non-inclusive) in KHz required to display the
1995      * LTE+ data icon. It is 20000 by default, meaning the LTE+ icon will be shown if the device is
1996      * using carrier aggregation and the combined channel bandwidth is strictly greater than 20 MHz.
1997      * @hide
1998      */
1999     public static final String KEY_LTE_PLUS_THRESHOLD_BANDWIDTH_KHZ_INT =
2000             "lte_plus_threshold_bandwidth_khz_int";
2001 
2002     /**
2003      * The combined channel bandwidth threshold (inclusive) in KHz required to display the
2004      * NR advanced (i.e. 5G+) data icon. It is 0 by default, meaning minimum bandwidth check is
2005      * not enabled. Other factors like bands or frequency can also determine whether the NR
2006      * advanced data icon is shown or not.
2007      *
2008      * @see #KEY_ADDITIONAL_NR_ADVANCED_BANDS_INT_ARRAY
2009      * @see #KEY_NR_ADVANCED_CAPABLE_PCO_ID_INT
2010      *
2011      * @hide
2012      */
2013     public static final String KEY_NR_ADVANCED_THRESHOLD_BANDWIDTH_KHZ_INT =
2014             "nr_advanced_threshold_bandwidth_khz_int";
2015 
2016     /**
2017      * Indicating whether to include LTE cell bandwidths when determining whether the aggregated
2018      * cell bandwidth meets the required threshold for NR advanced.
2019      *
2020      * @see TelephonyDisplayInfo#OVERRIDE_NETWORK_TYPE_NR_ADVANCED
2021      */
2022     public static final String KEY_INCLUDE_LTE_FOR_NR_ADVANCED_THRESHOLD_BANDWIDTH_BOOL =
2023             "include_lte_for_nr_advanced_threshold_bandwidth_bool";
2024 
2025     /**
2026      * Indicating whether to ratchet the aggregated cell bandwidths on receiving new values when
2027      * the device is in RRC IDLE mode.
2028      * The aggregated cell bandwidths are used for determining NR advanced state.
2029      *
2030      * If this is {@code true}, we will only update the aggregate cell bandwidths if the new
2031      * aggregate is higher than the current aggregate and the anchor NR cell is the same.
2032      * If this is {@code false}, we will always update the aggregate cell bandwidths when receiving
2033      * new values.
2034      */
2035     public static final String KEY_RATCHET_NR_ADVANCED_BANDWIDTH_IF_RRC_IDLE_BOOL =
2036             "ratchet_nr_advanced_bandwidth_if_rrc_idle_bool";
2037 
2038     /**
2039      * Boolean indicating if operator name should be shown in the status bar
2040      * @hide
2041      */
2042     public static final String KEY_SHOW_OPERATOR_NAME_IN_STATUSBAR_BOOL =
2043             "show_operator_name_in_statusbar_bool";
2044 
2045     /**
2046      * The string is used to filter redundant string from PLMN Network Name that's supplied by
2047      * specific carrier.
2048      *
2049      * @hide
2050      */
2051     public static final String KEY_OPERATOR_NAME_FILTER_PATTERN_STRING =
2052             "operator_name_filter_pattern_string";
2053 
2054     /**
2055      * The string is used to compare with operator name.
2056      * If it matches the pattern then show specific data icon.
2057      * @hide
2058      */
2059     public static final String KEY_SHOW_CARRIER_DATA_ICON_PATTERN_STRING =
2060             "show_carrier_data_icon_pattern_string";
2061 
2062     /**
2063      * Boolean to decide whether to show precise call failed cause to user
2064      * @hide
2065      */
2066     public static final String KEY_SHOW_PRECISE_FAILED_CAUSE_BOOL =
2067             "show_precise_failed_cause_bool";
2068 
2069     /**
2070      * A list of carrier nr availability is used to determine whether the carrier enable the
2071      * non-standalone (NSA) mode of 5G NR, standalone (SA) mode of 5G NR
2072      *
2073      * <p> The value of list is
2074      * {@link #CARRIER_NR_AVAILABILITY_NSA}, or {@link #CARRIER_NR_AVAILABILITY_SA}.
2075      *
2076      * <p> For example, if both NSA and SA are used, the list value is {
2077      * {@link #CARRIER_NR_AVAILABILITY_NSA},{@link #CARRIER_NR_AVAILABILITY_SA}}.
2078      * If the carrier doesn't support 5G NR, the value is the empty array.
2079      * If the key is invalid or not configured, the default value {
2080      * {@link #CARRIER_NR_AVAILABILITY_NSA},{@link #CARRIER_NR_AVAILABILITY_SA}} will apply.
2081      */
2082     public static final String KEY_CARRIER_NR_AVAILABILITIES_INT_ARRAY =
2083             "carrier_nr_availabilities_int_array";
2084 
2085     /**
2086      * Boolean to decide whether LTE is enabled.
2087      */
2088     public static final String KEY_LTE_ENABLED_BOOL = "lte_enabled_bool";
2089 
2090     /**
2091      * Boolean to decide whether TD-SCDMA is supported.
2092      */
2093     public static final String KEY_SUPPORT_TDSCDMA_BOOL = "support_tdscdma_bool";
2094 
2095     /**
2096      * A list of mcc/mnc that support TD-SCDMA for device when connect to the roaming network.
2097      */
2098     public static final String KEY_SUPPORT_TDSCDMA_ROAMING_NETWORKS_STRING_ARRAY =
2099             "support_tdscdma_roaming_networks_string_array";
2100 
2101     /**
2102      * Boolean to decide whether world mode is enabled.
2103      */
2104     public static final String KEY_WORLD_MODE_ENABLED_BOOL = "world_mode_enabled_bool";
2105 
2106     /**
2107      * Flatten {@link android.content.ComponentName} of the carrier's settings activity.
2108      */
2109     public static final String KEY_CARRIER_SETTINGS_ACTIVITY_COMPONENT_NAME_STRING =
2110             "carrier_settings_activity_component_name_string";
2111 
2112     // These variables are used by the MMS service and exposed through another API,
2113     // SmsManager. The variable names and string values are copied from there.
2114     public static final String KEY_MMS_ALIAS_ENABLED_BOOL = "aliasEnabled";
2115     public static final String KEY_MMS_ALLOW_ATTACH_AUDIO_BOOL = "allowAttachAudio";
2116     public static final String KEY_MMS_APPEND_TRANSACTION_ID_BOOL = "enabledTransID";
2117     public static final String KEY_MMS_GROUP_MMS_ENABLED_BOOL = "enableGroupMms";
2118     public static final String KEY_MMS_MMS_DELIVERY_REPORT_ENABLED_BOOL =
2119             "enableMMSDeliveryReports";
2120     public static final String KEY_MMS_MMS_ENABLED_BOOL = "enabledMMS";
2121     public static final String KEY_MMS_MMS_READ_REPORT_ENABLED_BOOL = "enableMMSReadReports";
2122     public static final String KEY_MMS_MULTIPART_SMS_ENABLED_BOOL = "enableMultipartSMS";
2123     public static final String KEY_MMS_NOTIFY_WAP_MMSC_ENABLED_BOOL = "enabledNotifyWapMMSC";
2124     public static final String KEY_MMS_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES_BOOL =
2125             "sendMultipartSmsAsSeparateMessages";
2126     public static final String KEY_MMS_SHOW_CELL_BROADCAST_APP_LINKS_BOOL =
2127             "config_cellBroadcastAppLinks";
2128     public static final String KEY_MMS_SMS_DELIVERY_REPORT_ENABLED_BOOL =
2129             "enableSMSDeliveryReports";
2130     public static final String KEY_MMS_SUPPORT_HTTP_CHARSET_HEADER_BOOL =
2131             "supportHttpCharsetHeader";
2132     public static final String KEY_MMS_SUPPORT_MMS_CONTENT_DISPOSITION_BOOL =
2133             "supportMmsContentDisposition";
2134     public static final String KEY_MMS_ALIAS_MAX_CHARS_INT = "aliasMaxChars";
2135     public static final String KEY_MMS_ALIAS_MIN_CHARS_INT = "aliasMinChars";
2136     public static final String KEY_MMS_HTTP_SOCKET_TIMEOUT_INT = "httpSocketTimeout";
2137     public static final String KEY_MMS_MAX_IMAGE_HEIGHT_INT = "maxImageHeight";
2138     public static final String KEY_MMS_MAX_IMAGE_WIDTH_INT = "maxImageWidth";
2139     public static final String KEY_MMS_MAX_MESSAGE_SIZE_INT = "maxMessageSize";
2140     public static final String KEY_MMS_MESSAGE_TEXT_MAX_SIZE_INT = "maxMessageTextSize";
2141     public static final String KEY_MMS_RECIPIENT_LIMIT_INT = "recipientLimit";
2142     public static final String KEY_MMS_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD_INT =
2143             "smsToMmsTextLengthThreshold";
2144     public static final String KEY_MMS_SMS_TO_MMS_TEXT_THRESHOLD_INT = "smsToMmsTextThreshold";
2145     public static final String KEY_MMS_SUBJECT_MAX_LENGTH_INT = "maxSubjectLength";
2146     public static final String KEY_MMS_EMAIL_GATEWAY_NUMBER_STRING = "emailGatewayNumber";
2147     public static final String KEY_MMS_HTTP_PARAMS_STRING = "httpParams";
2148     public static final String KEY_MMS_NAI_SUFFIX_STRING = "naiSuffix";
2149     public static final String KEY_MMS_UA_PROF_TAG_NAME_STRING = "uaProfTagName";
2150     public static final String KEY_MMS_UA_PROF_URL_STRING = "uaProfUrl";
2151     public static final String KEY_MMS_USER_AGENT_STRING = "userAgent";
2152     /**
2153      * If true, add "Connection: close" header to MMS HTTP requests so the connection
2154      * is immediately closed (disabling keep-alive).
2155      */
2156     public static final String KEY_MMS_CLOSE_CONNECTION_BOOL = "mmsCloseConnection";
2157     /**
2158      * Waiting time in milliseconds used before releasing an MMS data call. Not tearing down an MMS
2159      * data connection immediately helps to reduce the message delivering latency if messaging
2160      * continues between all parties in the conversation since the same data connection can be
2161      * reused for further messages.
2162      *
2163      * This timer will control how long the data call will be kept alive before being torn down.
2164      */
2165     public static final String KEY_MMS_NETWORK_RELEASE_TIMEOUT_MILLIS_INT =
2166             "mms_network_release_timeout_millis_int";
2167 
2168     /**
2169      * The flatten {@link android.content.ComponentName componentName} of the activity that can
2170      * setup the device and activate with the network per carrier requirements.
2171      *
2172      * e.g., com.google.android.carrierPackageName/.CarrierActivityName
2173      * @hide
2174      */
2175     @SystemApi
2176     public static final String KEY_CARRIER_SETUP_APP_STRING = "carrier_setup_app_string";
2177 
2178     /**
2179      * Defines carrier-specific actions which act upon
2180      * com.android.internal.telephony.CARRIER_SIGNAL_REDIRECTED, used for customization of the
2181      * default carrier app.
2182      * Format: "CARRIER_ACTION_IDX, ..."
2183      * Where {@code CARRIER_ACTION_IDX} is an integer defined in
2184      * com.android.carrierdefaultapp.CarrierActionUtils
2185      * Example:
2186      * com.android.carrierdefaultapp.CarrierActionUtils#CARRIER_ACTION_DISABLE_METERED_APNS
2187      * disables metered APNs
2188      */
2189     @SuppressLint("IntentName")
2190     public static final String KEY_CARRIER_DEFAULT_ACTIONS_ON_REDIRECTION_STRING_ARRAY =
2191             "carrier_default_actions_on_redirection_string_array";
2192 
2193     /**
2194      * Defines carrier-specific actions which act upon CARRIER_SIGNAL_REQUEST_NETWORK_FAILED
2195      * and configured signal args:
2196      * android.telephony.TelephonyManager#EXTRA_APN_TYPE,
2197      * android.telephony.TelephonyManager#EXTRA_ERROR_CODE
2198      * used for customization of the default carrier app
2199      * Format:
2200      * {
2201      *     "APN_1, ERROR_CODE_1 : CARRIER_ACTION_IDX_1, CARRIER_ACTION_IDX_2...",
2202      *     "APN_1, ERROR_CODE_2 : CARRIER_ACTION_IDX_1 "
2203      * }
2204      * Where {@code APN_1} is an integer defined in {@link android.telephony.data.ApnSetting}
2205      * (e.g. {@link android.telephony.data.ApnSetting#TYPE_DEFAULT}
2206      *
2207      * {@code ERROR_CODE_1} is an integer defined in android.telephony.DataFailCause
2208      * Example:
2209      * android.telephony.DataFailCause#MISSING_UNKNOWN_APN
2210      *
2211      * {@code CARRIER_ACTION_IDX_1} is an integer defined in
2212      * com.android.carrierdefaultapp.CarrierActionUtils
2213      * Example:
2214      * com.android.carrierdefaultapp.CarrierActionUtils#CARRIER_ACTION_DISABLE_METERED_APNS
2215      * disables metered APNs
2216      */
2217     @SuppressLint("IntentName")
2218     public static final String KEY_CARRIER_DEFAULT_ACTIONS_ON_DCFAILURE_STRING_ARRAY =
2219             "carrier_default_actions_on_dcfailure_string_array";
2220 
2221     /**
2222      * Defines carrier-specific actions which act upon CARRIER_SIGNAL_RESET,
2223      * used for customization of the default carrier app.
2224      * Format: "CARRIER_ACTION_IDX, ..."
2225      * Where {@code CARRIER_ACTION_IDX} is an integer defined in
2226      * com.android.carrierdefaultapp.CarrierActionUtils
2227      * Example:
2228      * com.android.carrierdefaultapp.CarrierActionUtils#CARRIER_ACTION_CANCEL_ALL_NOTIFICATIONS
2229      * clears all notifications on reset
2230      */
2231     @SuppressLint("IntentName")
2232     public static final String KEY_CARRIER_DEFAULT_ACTIONS_ON_RESET =
2233             "carrier_default_actions_on_reset_string_array";
2234 
2235     /**
2236      * Defines carrier-specific actions which act upon
2237      * com.android.internal.telephony.CARRIER_SIGNAL_DEFAULT_NETWORK_AVAILABLE,
2238      * used for customization of the default carrier app.
2239      * Format:
2240      * {
2241      *     "true : CARRIER_ACTION_IDX_1",
2242      *     "false: CARRIER_ACTION_IDX_2"
2243      * }
2244      * Where {@code true} is a boolean indicates default network available/unavailable
2245      * Where {@code CARRIER_ACTION_IDX} is an integer defined in
2246      * com.android.carrierdefaultapp.CarrierActionUtils CarrierActionUtils
2247      * Example:
2248      * com.android.carrierdefaultapp.CarrierActionUtils#CARRIER_ACTION_ENABLE_DEFAULT_URL_HANDLER
2249      * enables the app as the default URL handler
2250      */
2251     @SuppressLint("IntentName")
2252     public static final String KEY_CARRIER_DEFAULT_ACTIONS_ON_DEFAULT_NETWORK_AVAILABLE =
2253             "carrier_default_actions_on_default_network_available_string_array";
2254 
2255     /**
2256      * Defines a list of acceptable redirection url for default carrier app.
2257      */
2258     public static final String KEY_CARRIER_DEFAULT_REDIRECTION_URL_STRING_ARRAY =
2259             "carrier_default_redirection_url_string_array";
2260 
2261     /**
2262      * Each config includes the componentName of the carrier app, followed by a list of interesting
2263      * signals(declared in the manifest) which could wake up the app.
2264      * @see com.android.internal.telephony.TelephonyIntents
2265      * Example:
2266      * <item>com.google.android.carrierAPK/.CarrierSignalReceiverA:
2267      * com.android.internal.telephony.CARRIER_SIGNAL_REDIRECTED,
2268      * com.android.internal.telephony.CARRIER_SIGNAL_PCO_VALUE
2269      * </item>
2270      * <item>com.google.android.carrierAPK/.CarrierSignalReceiverB:
2271      * com.android.internal.telephony.CARRIER_SIGNAL_PCO_VALUE
2272      * </item>
2273      * @hide
2274      */
2275     public static final String KEY_CARRIER_APP_WAKE_SIGNAL_CONFIG_STRING_ARRAY =
2276             "carrier_app_wake_signal_config";
2277 
2278     /**
2279      * Each config includes the componentName of the carrier app, followed by a list of interesting
2280      * signals for the app during run-time. The list of signals(intents) are targeting on run-time
2281      * broadcast receivers only, aiming to avoid unnecessary wake-ups and should not be declared in
2282      * the app's manifest.
2283      * @see com.android.internal.telephony.TelephonyIntents
2284      * Example:
2285      * <item>com.google.android.carrierAPK/.CarrierSignalReceiverA:
2286      * com.android.internal.telephony.CARRIER_SIGNAL_REQUEST_NETWORK_FAILED,
2287      * com.android.internal.telephony.CARRIER_SIGNAL_PCO_VALUE
2288      * </item>
2289      * <item>com.google.android.carrierAPK/.CarrierSignalReceiverB:
2290      * com.android.internal.telephony.CARRIER_SIGNAL_REQUEST_NETWORK_FAILED
2291      * </item>
2292      * @hide
2293      */
2294     public static final String KEY_CARRIER_APP_NO_WAKE_SIGNAL_CONFIG_STRING_ARRAY =
2295             "carrier_app_no_wake_signal_config";
2296 
2297     /**
2298      * Determines whether the carrier app needed to be involved when users try to finish setting up
2299      * the SIM card to get network service.
2300      */
2301     public static final String KEY_CARRIER_APP_REQUIRED_DURING_SIM_SETUP_BOOL =
2302             "carrier_app_required_during_setup_bool";
2303 
2304     /**
2305      * Default value for {@link Settings.Global#DATA_ROAMING}
2306      * @hide
2307      */
2308     public static final String KEY_CARRIER_DEFAULT_DATA_ROAMING_ENABLED_BOOL =
2309             "carrier_default_data_roaming_enabled_bool";
2310 
2311     /**
2312      * Determines whether the carrier supports making non-emergency phone calls while the phone is
2313      * in emergency callback mode. Default value is {@code true}, meaning that non-emergency calls
2314      * are allowed in emergency callback mode.
2315      */
2316     public static final String KEY_ALLOW_NON_EMERGENCY_CALLS_IN_ECM_BOOL =
2317             "allow_non_emergency_calls_in_ecm_bool";
2318 
2319     /**
2320      * Time that the telephony framework stays in "emergency SMS mode" after an emergency SMS is
2321      * sent to the network. This is used by carriers to configure the time
2322      * {@link TelephonyManager#isInEmergencySmsMode()} will be true after an emergency SMS is sent.
2323      * This is used by GNSS to override user location permissions so that the carrier network can
2324      * get the user's location for emergency services.
2325      *
2326      * The default is 0, which means that this feature is disabled. The maximum value for this timer
2327      * is 300000 mS (5 minutes).
2328      *
2329      * @hide
2330      */
2331     public static final String KEY_EMERGENCY_SMS_MODE_TIMER_MS_INT =
2332             "emergency_sms_mode_timer_ms_int";
2333 
2334     /**
2335      * Flag indicating whether to allow carrier video calls to emergency numbers.
2336      * When {@code true}, video calls to emergency numbers will be allowed. When {@code false},
2337      * video calls to emergency numbers will be initiated as audio-only calls instead.
2338      */
2339     public static final String KEY_ALLOW_EMERGENCY_VIDEO_CALLS_BOOL =
2340             "allow_emergency_video_calls_bool";
2341 
2342     /**
2343      * Flag indicating whether or not an ongoing call will be held when an outgoing emergency call
2344      * is placed. If true, ongoing calls will be put on hold when an emergency call is placed. If
2345      * false, placing an emergency call will trigger the disconnect of all ongoing calls before
2346      * the emergency call is placed.
2347      */
2348     public static final String KEY_ALLOW_HOLD_CALL_DURING_EMERGENCY_BOOL =
2349             "allow_hold_call_during_emergency_bool";
2350 
2351     /**
2352      * Flag indicating whether or not the carrier supports the periodic exchange of phone numbers
2353      * in the user's address book with the carrier's presence server in order to retrieve the RCS
2354      * capabilities for each contact used in the RCS User Capability Exchange (UCE) procedure. See
2355      * RCC.71, section 3 for more information.
2356      * <p>
2357      * The flag {@link Ims#KEY_ENABLE_PRESENCE_PUBLISH_BOOL} must also be enabled if this flag is
2358      * enabled, as sending a periodic SIP PUBLISH with this device's RCS capabilities is a
2359      * requirement for capability exchange to begin.
2360      * <p>
2361      * When presence is supported, the device should use the
2362      * {@link android.provider.ContactsContract.Data#CARRIER_PRESENCE} bit mask and set the
2363      * {@link android.provider.ContactsContract.Data#CARRIER_PRESENCE_VT_CAPABLE} bit to indicate
2364      * whether each contact supports video calling. The UI is made aware that presence is enabled
2365      * via {@link android.telecom.PhoneAccount#CAPABILITY_VIDEO_CALLING_RELIES_ON_PRESENCE}
2366      * and can choose to hide or show the video calling icon based on whether a contact supports
2367      * video.
2368      *
2369      * @deprecated No longer used in framework code, however it may still be used by applications
2370      * that have not updated their code. This config should still be set to {@code true} if
2371      * {@link Ims#KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL} is set to {@code true} and
2372      * {@link Ims#KEY_ENABLE_PRESENCE_CAPABILITY_EXCHANGE_BOOL} is set to {@code true}.
2373      */
2374     @Deprecated
2375     public static final String KEY_USE_RCS_PRESENCE_BOOL = "use_rcs_presence_bool";
2376 
2377     /**
2378      * Flag indicating whether the carrier supports RCS SIP OPTIONS indication for
2379      * User Capability Exchange (UCE).
2380      */
2381     public static final String KEY_USE_RCS_SIP_OPTIONS_BOOL = "use_rcs_sip_options_bool";
2382 
2383     /**
2384      * The duration in seconds that platform call and message blocking is disabled after the user
2385      * contacts emergency services. Platform considers values for below cases:
2386      *  1) 0 <= VALUE <= 604800(one week): the value will be used as the duration directly.
2387      *  2) VALUE > 604800(one week): will use the default value as duration instead.
2388      *  3) VALUE < 0: block will be disabled forever until user re-enable block manually,
2389      *     the suggested value to disable forever is -1.
2390      * See {@code android.provider.BlockedNumberContract#notifyEmergencyContact(Context)}
2391      * See {@code android.provider.BlockedNumberContract#isBlocked(Context, String)}.
2392      */
2393     public static final String KEY_DURATION_BLOCKING_DISABLED_AFTER_EMERGENCY_INT =
2394             "duration_blocking_disabled_after_emergency_int";
2395 
2396     /**
2397      * Determines whether to enable enhanced call blocking feature on the device.
2398      * android.provider.BlockedNumberContract.SystemContract#ENHANCED_SETTING_KEY_BLOCK_UNREGISTERED
2399      * android.provider.BlockedNumberContract.SystemContract#ENHANCED_SETTING_KEY_BLOCK_PRIVATE
2400      * android.provider.BlockedNumberContract.SystemContract#ENHANCED_SETTING_KEY_BLOCK_PAYPHONE
2401      * android.provider.BlockedNumberContract.SystemContract#ENHANCED_SETTING_KEY_BLOCK_UNKNOWN
2402      * android.provider.BlockedNumberContract.SystemContract#ENHANCED_SETTING_KEY_BLOCK_UNAVAILABLE
2403      *
2404      * <p>
2405      * 1. For Single SIM(SS) device, it can be customized in both carrier_config_mccmnc.xml
2406      *    and vendor.xml.
2407      * <p>
2408      * 2. For Dual SIM(DS) device, it should be customized in vendor.xml, since call blocking
2409      *    function is used regardless of SIM.
2410      * <p>
2411      * If {@code true} enable enhanced call blocking feature on the device, {@code false} otherwise.
2412      */
2413     public static final String KEY_SUPPORT_ENHANCED_CALL_BLOCKING_BOOL =
2414             "support_enhanced_call_blocking_bool";
2415 
2416     /**
2417      * For carriers which require an empty flash to be sent before sending the normal 3-way calling
2418      * flash, the duration in milliseconds of the empty flash to send. When {@code 0}, no empty
2419      * flash is sent.
2420      */
2421     public static final String KEY_CDMA_3WAYCALL_FLASH_DELAY_INT = "cdma_3waycall_flash_delay_int";
2422 
2423     /**
2424      * The CDMA roaming mode (aka CDMA system select).
2425      *
2426      * <p>The value should be one of the CDMA_ROAMING_MODE_ constants in {@link TelephonyManager}.
2427      * Values other than {@link TelephonyManager#CDMA_ROAMING_MODE_RADIO_DEFAULT} (which is the
2428      * default) will take precedence over user selection.
2429      *
2430      * @see TelephonyManager#CDMA_ROAMING_MODE_RADIO_DEFAULT
2431      * @see TelephonyManager#CDMA_ROAMING_MODE_HOME
2432      * @see TelephonyManager#CDMA_ROAMING_MODE_AFFILIATED
2433      * @see TelephonyManager#CDMA_ROAMING_MODE_ANY
2434      */
2435     public static final String KEY_CDMA_ROAMING_MODE_INT = "cdma_roaming_mode_int";
2436 
2437     /**
2438      * Determines whether 1X voice calls is supported for some CDMA carriers.
2439      * Default value is true.
2440      * @hide
2441      */
2442     @SystemApi
2443     public static final String KEY_SUPPORT_CDMA_1X_VOICE_CALLS_BOOL =
2444             "support_cdma_1x_voice_calls_bool";
2445 
2446     /**
2447      * Boolean indicating if support is provided for directly dialing FDN number from FDN list.
2448      * If false, this feature is not supported.
2449      * @hide
2450      */
2451     public static final String KEY_SUPPORT_DIRECT_FDN_DIALING_BOOL =
2452             "support_direct_fdn_dialing_bool";
2453 
2454     /**
2455      * Int indicating the max number length for FDN
2456      * @hide
2457      */
2458     public static final String KEY_FDN_NUMBER_LENGTH_LIMIT_INT = "fdn_number_length_limit_int";
2459 
2460     /**
2461      * Report IMEI as device id even if it's a CDMA/LTE phone.
2462      *
2463      * @hide
2464      */
2465     public static final String KEY_FORCE_IMEI_BOOL = "force_imei_bool";
2466 
2467     /**
2468      * The families of Radio Access Technologies that will get clustered and ratcheted,
2469      * ie, we will report transitions up within the family, but not down until we change
2470      * cells. This prevents flapping between base technologies and higher techs that are
2471      * granted on demand within the cell.
2472      * @hide
2473      */
2474     public static final String KEY_RATCHET_RAT_FAMILIES = "ratchet_rat_families";
2475 
2476     /**
2477      * Flag indicating whether some telephony logic will treat a call which was formerly a video
2478      * call as if it is still a video call. When {@code true}:
2479      * <p>
2480      * Logic which will automatically drop a video call which takes place over WIFI when a
2481      * voice call is answered (see {@link #KEY_DROP_VIDEO_CALL_WHEN_ANSWERING_AUDIO_CALL_BOOL}.
2482      * <p>
2483      * Logic which determines whether the user can use TTY calling.
2484      */
2485     public static final String KEY_TREAT_DOWNGRADED_VIDEO_CALLS_AS_VIDEO_CALLS_BOOL =
2486             "treat_downgraded_video_calls_as_video_calls_bool";
2487 
2488     /**
2489      * When {@code true}, if the user is in an ongoing video call over WIFI and answers an incoming
2490      * audio call, the video call will be disconnected before the audio call is answered. This is
2491      * in contrast to the usual expected behavior where a foreground video call would be put into
2492      * the background and held when an incoming audio call is answered.
2493      */
2494     public static final String KEY_DROP_VIDEO_CALL_WHEN_ANSWERING_AUDIO_CALL_BOOL =
2495             "drop_video_call_when_answering_audio_call_bool";
2496 
2497     /**
2498      * Flag indicating whether the carrier supports merging wifi calls when VoWIFI is disabled.
2499      * This can happen in the case of a carrier which allows offloading video calls to WIFI
2500      * separately of whether voice over wifi is enabled. In such a scenario when two video calls
2501      * are downgraded to voice, they remain over wifi. However, if VoWIFI is disabled, these calls
2502      * cannot be merged.
2503      */
2504     public static final String KEY_ALLOW_MERGE_WIFI_CALLS_WHEN_VOWIFI_OFF_BOOL =
2505             "allow_merge_wifi_calls_when_vowifi_off_bool";
2506 
2507     /**
2508      * Flag indicating whether the carrier supports the Hold command while in an IMS call.
2509      * <p>
2510      * The device configuration value {@code config_device_respects_hold_carrier_config} ultimately
2511      * controls whether this carrier configuration option is used.
2512      * Where {@code config_device_respects_hold_carrier_config} is false, the value of
2513      * this carrier configuration is ignored.
2514      * @hide
2515      */
2516     public static final String KEY_ALLOW_HOLD_IN_IMS_CALL_BOOL = "allow_hold_in_ims_call";
2517 
2518     /**
2519      * Flag indicating whether the carrier supports call deflection for an incoming IMS call.
2520      */
2521     public static final String KEY_CARRIER_ALLOW_DEFLECT_IMS_CALL_BOOL =
2522             "carrier_allow_deflect_ims_call_bool";
2523 
2524     /**
2525      * Flag indicating whether the carrier supports explicit call transfer for an IMS call.
2526      * @hide
2527      */
2528     public static final String KEY_CARRIER_ALLOW_TRANSFER_IMS_CALL_BOOL =
2529             "carrier_allow_transfer_ims_call_bool";
2530 
2531     /**
2532      * Flag indicating whether the carrier always wants to play an "on-hold" tone when a call has
2533      * been remotely held.
2534      * <p>
2535      * When {@code true}, if the IMS stack indicates that the call session has been held, a signal
2536      * will be sent from Telephony to play an audible "on-hold" tone played to the user.
2537      * When {@code false}, a hold tone will only be played if the audio session becomes inactive.
2538      * @hide
2539      */
2540     public static final String KEY_ALWAYS_PLAY_REMOTE_HOLD_TONE_BOOL =
2541             "always_play_remote_hold_tone_bool";
2542 
2543     /**
2544      * When true, the Telephony stack will automatically turn off airplane mode and retry a wifi
2545      * emergency call over the cell network if the initial attempt at dialing was met with a SIP 308
2546      * error.
2547      * @hide
2548      */
2549     public static final String KEY_AUTO_RETRY_FAILED_WIFI_EMERGENCY_CALL =
2550             "auto_retry_failed_wifi_emergency_call";
2551 
2552     /**
2553      * When true, indicates that adding a call is disabled when there is an ongoing video call
2554      * or when there is an ongoing call on wifi which was downgraded from video and VoWifi is
2555      * turned off.
2556      */
2557     public static final String KEY_ALLOW_ADD_CALL_DURING_VIDEO_CALL_BOOL =
2558             "allow_add_call_during_video_call";
2559 
2560     /**
2561      * When {@code true}, indicates that video calls can be put on hold in order to swap to another
2562      * call (e.g. a new outgoing call).
2563      * When {@code false}, indicates that video calls will be disconnected when swapping to another
2564      * call.
2565      * <p>
2566      * This is {@code true} by default.
2567      */
2568     public static final String KEY_ALLOW_HOLD_VIDEO_CALL_BOOL = "allow_hold_video_call_bool";
2569 
2570     /**
2571      * When true, indicates that the HD audio icon in the in-call screen should not be shown for
2572      * VoWifi calls.
2573      * @hide
2574      */
2575     public static final String KEY_WIFI_CALLS_CAN_BE_HD_AUDIO = "wifi_calls_can_be_hd_audio";
2576 
2577     /**
2578      * When true, indicates that the HD audio icon in the in-call screen should not be shown for
2579      * video calls.
2580      * @hide
2581      */
2582     public static final String KEY_VIDEO_CALLS_CAN_BE_HD_AUDIO = "video_calls_can_be_hd_audio";
2583 
2584     /**
2585      * When true, indicates that the HD audio icon in the in-call screen should be shown for
2586      * GSM/CDMA calls.
2587      * @hide
2588      */
2589     public static final String KEY_GSM_CDMA_CALLS_CAN_BE_HD_AUDIO =
2590             "gsm_cdma_calls_can_be_hd_audio";
2591 
2592     /**
2593      * Whether system apps are allowed to use fallback if carrier video call is not available.
2594      * Defaults to {@code true}.
2595      */
2596     public static final String KEY_ALLOW_VIDEO_CALLING_FALLBACK_BOOL =
2597             "allow_video_calling_fallback_bool";
2598 
2599     /**
2600      * Defines operator-specific {@link ImsReasonInfo} mappings.
2601      *
2602      * Format: "ORIGINAL_CODE|MESSAGE|NEW_CODE"
2603      * Where {@code ORIGINAL_CODE} corresponds to a {@link ImsReasonInfo#getCode()} code,
2604      * {@code MESSAGE} corresponds to an expected {@link ImsReasonInfo#getExtraMessage()} string,
2605      * and {@code NEW_CODE} is the new {@code ImsReasonInfo#CODE_*} which this combination of
2606      * original code and message shall be remapped to.
2607      *
2608      * Note: If {@code *} is specified for the original code, any ImsReasonInfo with the matching
2609      * {@code MESSAGE} will be remapped to {@code NEW_CODE}.
2610      * If {@code *} is specified for the message, any ImsReasonInfo with the matching
2611      * {@code ORIGINAL_CODE} will be remapped to {@code NEW_CODE}.
2612      * The wildcard for {@code ORIGINAL_CODE} takes precedence to the wildcard for {@code MESSAGE}.
2613      * A mapping with both wildcards has no effect.
2614      *
2615      * Example: "501|call completion elsewhere|1014"
2616      * When the {@link ImsReasonInfo#getCode()} is {@link ImsReasonInfo#CODE_USER_TERMINATED} and
2617      * the {@link ImsReasonInfo#getExtraMessage()} is {@code "call completion elsewhere"},
2618      * {@link ImsReasonInfo#CODE_ANSWERED_ELSEWHERE} shall be used as the {@link ImsReasonInfo}
2619      * code instead.
2620      * @hide
2621      */
2622     public static final String KEY_IMS_REASONINFO_MAPPING_STRING_ARRAY =
2623             "ims_reasoninfo_mapping_string_array";
2624 
2625     /**
2626      * When {@code false}, use default title for Enhanced 4G LTE Mode settings.
2627      * When {@code true}, use the variant.
2628      * @hide
2629      * @deprecated use {@link #KEY_ENHANCED_4G_LTE_TITLE_VARIANT_INT}.
2630      */
2631     @Deprecated
2632     public static final String KEY_ENHANCED_4G_LTE_TITLE_VARIANT_BOOL =
2633             "enhanced_4g_lte_title_variant_bool";
2634 
2635     /**
2636      * The index indicates the carrier specified title string of Enhanced 4G LTE Mode settings.
2637      * Default value is 0, which indicates the default title string.
2638      */
2639     public static final String KEY_ENHANCED_4G_LTE_TITLE_VARIANT_INT =
2640             "enhanced_4g_lte_title_variant_int";
2641 
2642     /**
2643      * Indicates whether the carrier wants to notify the user when handover of an LTE video call to
2644      * WIFI fails.
2645      * <p>
2646      * When {@code true}, if a video call starts on LTE and the modem reports a failure to handover
2647      * the call to WIFI or if no handover success is reported within 60 seconds of call initiation,
2648      * the {@link android.telephony.TelephonyManager#EVENT_HANDOVER_TO_WIFI_FAILED} event is raised
2649      * on the connection.
2650      * @hide
2651      */
2652     public static final String KEY_NOTIFY_VT_HANDOVER_TO_WIFI_FAILURE_BOOL =
2653             "notify_vt_handover_to_wifi_failure_bool";
2654 
2655     /**
2656      * A upper case list of CNAP names that are unhelpful to the user for distinguising calls and
2657      * should be filtered out of the CNAP information. This includes CNAP names such as "WIRELESS
2658      * CALLER" or "UNKNOWN NAME". By default, if there are no filtered names for this carrier, null
2659      * is returned.
2660      * @hide
2661      */
2662     public static final String KEY_FILTERED_CNAP_NAMES_STRING_ARRAY =
2663             "filtered_cnap_names_string_array";
2664 
2665     /**
2666      * The RCS configuration server URL. This URL is used to initiate RCS provisioning.
2667      */
2668     public static final String KEY_RCS_CONFIG_SERVER_URL_STRING = "rcs_config_server_url_string";
2669 
2670     /**
2671      * Determine whether user can change Wi-Fi Calling preference in roaming.
2672      * {@code false} - roaming preference cannot be changed by user independently. If
2673      *                 {@link #KEY_USE_WFC_HOME_NETWORK_MODE_IN_ROAMING_NETWORK_BOOL} is false,
2674      *                 {@link #KEY_CARRIER_DEFAULT_WFC_IMS_ROAMING_MODE_INT} is used as the default
2675      *                 value. If {@link #KEY_USE_WFC_HOME_NETWORK_MODE_IN_ROAMING_NETWORK_BOOL} is
2676      *                 true, roaming preference is the same as home preference and
2677      *                 {@link #KEY_CARRIER_DEFAULT_WFC_IMS_MODE_INT} is used as the default value.
2678      * {@code true}  - roaming preference can be changed by user independently if
2679      *                 {@link #KEY_USE_WFC_HOME_NETWORK_MODE_IN_ROAMING_NETWORK_BOOL} is false. If
2680      *                 {@link #KEY_USE_WFC_HOME_NETWORK_MODE_IN_ROAMING_NETWORK_BOOL} is true, this
2681      *                 configuration is ignored and roaming preference cannot be changed.
2682      */
2683     public static final String KEY_EDITABLE_WFC_ROAMING_MODE_BOOL =
2684             "editable_wfc_roaming_mode_bool";
2685 
2686     /**
2687      * Flag specifying whether to show blocking pay phone option in blocked numbers screen.
2688      * Only show the option if payphone call presentation is present in the carrier's region.
2689      */
2690     public static final java.lang.String KEY_SHOW_BLOCKING_PAY_PHONE_OPTION_BOOL =
2691             "show_blocking_pay_phone_option_bool";
2692 
2693     /**
2694      * Flag specifying whether the carrier will use the
2695      * WFC home network mode in roaming network.
2696      * {@code false} - roaming preference can be selected separately from the home preference.
2697      * {@code true}  - roaming preference is the same as home preference and
2698      *                 {@link #KEY_CARRIER_DEFAULT_WFC_IMS_MODE_INT} is used as the default value.
2699      */
2700     public static final String KEY_USE_WFC_HOME_NETWORK_MODE_IN_ROAMING_NETWORK_BOOL =
2701             "use_wfc_home_network_mode_in_roaming_network_bool";
2702 
2703     /**
2704      * Flag specifying whether the carrier is allowed to use metered network to download a
2705      * certificate of Carrier-WiFi.
2706      * {@code false} - default value.
2707      *
2708      * @hide
2709      */
2710     public static final String KEY_ALLOW_METERED_NETWORK_FOR_CERT_DOWNLOAD_BOOL =
2711             "allow_metered_network_for_cert_download_bool";
2712 
2713     /**
2714      * Time delay (in ms) after which we show the notification to switch the preferred
2715      * network.
2716      * @hide
2717      */
2718     public static final String KEY_PREF_NETWORK_NOTIFICATION_DELAY_INT =
2719             "network_notification_delay_int";
2720 
2721     /**
2722      * Time delay (in ms) after which we show the notification for emergency calls,
2723      * while the device is registered over WFC. Default value is -1, which indicates
2724      * that this notification is not pertinent for a particular carrier. We've added a delay
2725      * to prevent false positives.
2726      */
2727     public static final String KEY_EMERGENCY_NOTIFICATION_DELAY_INT =
2728             "emergency_notification_delay_int";
2729 
2730     /**
2731      * When {@code true}, the carrier allows the user of the {@link
2732      * TelephonyManager#sendUssdRequest(String, TelephonyManager.UssdResponseCallback, Handler)}
2733      * API to perform USSD requests. {@code True} by default.
2734      * @hide
2735      */
2736     public static final String KEY_ALLOW_USSD_REQUESTS_VIA_TELEPHONY_MANAGER_BOOL =
2737             "allow_ussd_requests_via_telephony_manager_bool";
2738 
2739     /**
2740      * Indicates whether the carrier supports 3gpp call forwarding MMI codes while roaming. If
2741      * false, the user will be notified that call forwarding is not available when the MMI code
2742      * fails.
2743      */
2744     public static final String KEY_SUPPORT_3GPP_CALL_FORWARDING_WHILE_ROAMING_BOOL =
2745             "support_3gpp_call_forwarding_while_roaming_bool";
2746 
2747     /**
2748      * Boolean indicating whether to display voicemail number as default call forwarding number in
2749      * call forwarding settings.
2750      * If true, display vm number when cf number is null.
2751      * If false, display the cf number from network.
2752      * By default this value is false.
2753      * @hide
2754      */
2755     public static final String KEY_DISPLAY_VOICEMAIL_NUMBER_AS_DEFAULT_CALL_FORWARDING_NUMBER_BOOL =
2756             "display_voicemail_number_as_default_call_forwarding_number";
2757 
2758     /**
2759      * When {@code true}, the user will be notified when they attempt to place an international call
2760      * when the call is placed using wifi calling.
2761      * @hide
2762      */
2763     public static final String KEY_NOTIFY_INTERNATIONAL_CALL_ON_WFC_BOOL =
2764             "notify_international_call_on_wfc_bool";
2765 
2766     /**
2767      * Flag to hide Preset APN details. If true, user cannot enter ApnEditor view of Preset APN,
2768      * and cannot view details of the APN. If false, user can enter ApnEditor view of Preset APN.
2769      * Default value is false.
2770      */
2771     public static final String KEY_HIDE_PRESET_APN_DETAILS_BOOL = "hide_preset_apn_details_bool";
2772 
2773     /**
2774      * Flag specifying whether to show an alert dialog for video call charges.
2775      * By default this value is {@code false}.
2776      */
2777     public static final String KEY_SHOW_VIDEO_CALL_CHARGES_ALERT_DIALOG_BOOL =
2778             "show_video_call_charges_alert_dialog_bool";
2779 
2780     /**
2781      * An array containing custom call forwarding number prefixes that will be blocked while the
2782      * device is reporting that it is roaming. By default, there are no custom call
2783      * forwarding prefixes and none of these numbers will be filtered. If one or more entries are
2784      * present, the system will not complete the call and display an error message.
2785      *
2786      * To display a message to the user when call forwarding fails for 3gpp MMI codes while roaming,
2787      * use the {@link #KEY_SUPPORT_3GPP_CALL_FORWARDING_WHILE_ROAMING_BOOL} option instead.
2788      */
2789     public static final String KEY_CALL_FORWARDING_BLOCKS_WHILE_ROAMING_STRING_ARRAY =
2790             "call_forwarding_blocks_while_roaming_string_array";
2791 
2792     /**
2793      * Call forwarding number prefixes defined by {@link
2794      * #KEY_CALL_FORWARDING_BLOCKS_WHILE_ROAMING_STRING_ARRAY} which will be allowed while the
2795      * device is reporting that it is roaming and IMS is registered over LTE or Wi-Fi.
2796      * By default this value is {@code true}.
2797      * @hide
2798      */
2799     public static final String KEY_SUPPORT_IMS_CALL_FORWARDING_WHILE_ROAMING_BOOL =
2800             "support_ims_call_forwarding_while_roaming_bool";
2801 
2802     /**
2803      * The day of the month (1-31) on which the data cycle rolls over.
2804      * <p>
2805      * If the current month does not have this day, the cycle will roll over at
2806      * the start of the next month.
2807      * <p>
2808      * This setting may be still overridden by explicit user choice. By default,
2809      * {@link #DATA_CYCLE_USE_PLATFORM_DEFAULT} will be used.
2810      */
2811     public static final String KEY_MONTHLY_DATA_CYCLE_DAY_INT = "monthly_data_cycle_day_int";
2812 
2813     /**
2814      * When {@link #KEY_MONTHLY_DATA_CYCLE_DAY_INT}, {@link #KEY_DATA_LIMIT_THRESHOLD_BYTES_LONG},
2815      * or {@link #KEY_DATA_WARNING_THRESHOLD_BYTES_LONG} are set to this value, the platform default
2816      * value will be used for that key.
2817      */
2818     public static final int DATA_CYCLE_USE_PLATFORM_DEFAULT = -1;
2819 
2820     /**
2821      * Flag indicating that a data cycle threshold should be disabled.
2822      * <p>
2823      * If {@link #KEY_DATA_WARNING_THRESHOLD_BYTES_LONG} is set to this value, the platform's
2824      * default data warning, if one exists, will be disabled. A user selected data warning will not
2825      * be overridden.
2826      * <p>
2827      * If {@link #KEY_DATA_LIMIT_THRESHOLD_BYTES_LONG} is set to this value, the platform's
2828      * default data limit, if one exists, will be disabled. A user selected data limit will not be
2829      * overridden.
2830      */
2831     public static final int DATA_CYCLE_THRESHOLD_DISABLED = -2;
2832 
2833     /**
2834      * Controls the data usage warning.
2835      * <p>
2836      * If the user uses more than this amount of data in their billing cycle, as defined by
2837      * {@link #KEY_MONTHLY_DATA_CYCLE_DAY_INT}, the user will be alerted about the usage.
2838      * If the value is set to {@link #DATA_CYCLE_THRESHOLD_DISABLED}, the data usage warning will
2839      * be disabled.
2840      * <p>
2841      * This setting may be overridden by explicit user choice. By default,
2842      * {@link #DATA_CYCLE_USE_PLATFORM_DEFAULT} will be used.
2843      */
2844     public static final String KEY_DATA_WARNING_THRESHOLD_BYTES_LONG =
2845             "data_warning_threshold_bytes_long";
2846 
2847     /**
2848      * Controls if the device should automatically notify the user as they reach
2849      * their cellular data warning. When set to {@code false} the carrier is
2850      * expected to have implemented their own notification mechanism. {@code true} by default.
2851      */
2852     public static final String KEY_DATA_WARNING_NOTIFICATION_BOOL =
2853             "data_warning_notification_bool";
2854 
2855     /**
2856      * Controls if the device should automatically warn the user that sim voice & data function
2857      * might be limited due to dual sim scenario. When set to {@code true} display the notification,
2858      * {@code false} otherwise.
2859      * @hide
2860      */
2861     public static final String KEY_LIMITED_SIM_FUNCTION_NOTIFICATION_FOR_DSDS_BOOL =
2862             "limited_sim_function_notification_for_dsds_bool";
2863 
2864     /**
2865      * Controls the cellular data limit.
2866      * <p>
2867      * If the user uses more than this amount of data in their billing cycle, as defined by
2868      * {@link #KEY_MONTHLY_DATA_CYCLE_DAY_INT}, cellular data will be turned off by the user's
2869      * phone. If the value is set to {@link #DATA_CYCLE_THRESHOLD_DISABLED}, the data limit will be
2870      * disabled.
2871      * <p>
2872      * This setting may be overridden by explicit user choice. By default,
2873      * {@link #DATA_CYCLE_USE_PLATFORM_DEFAULT} will be used.
2874      */
2875     public static final String KEY_DATA_LIMIT_THRESHOLD_BYTES_LONG =
2876             "data_limit_threshold_bytes_long";
2877 
2878     /**
2879      * Controls if the device should automatically notify the user as they reach
2880      * their cellular data limit. When set to {@code false} the carrier is
2881      * expected to have implemented their own notification mechanism. {@code true} by default.
2882      */
2883     public static final String KEY_DATA_LIMIT_NOTIFICATION_BOOL = "data_limit_notification_bool";
2884 
2885     /**
2886      * Controls if the device should automatically notify the user when rapid
2887      * cellular data usage is observed. When set to {@code false} the carrier is
2888      * expected to have implemented their own notification mechanism. {@code true} by default.
2889      */
2890     public static final String KEY_DATA_RAPID_NOTIFICATION_BOOL = "data_rapid_notification_bool";
2891 
2892     /**
2893      * Offset to be reduced from rsrp threshold while calculating signal strength level.
2894      * @hide
2895      */
2896     public static final String KEY_LTE_EARFCNS_RSRP_BOOST_INT = "lte_earfcns_rsrp_boost_int";
2897 
2898     /**
2899      * List of EARFCN (E-UTRA Absolute Radio Frequency Channel Number,
2900      * Reference: 3GPP TS 36.104 5.4.3) inclusive ranges on which lte_earfcns_rsrp_boost_int
2901      * will be applied. Format of the String array is expected to be {"earfcn1_start-earfcn1_end",
2902      * "earfcn2_start-earfcn2_end" ... }
2903      * @hide
2904      */
2905     public static final String KEY_BOOSTED_LTE_EARFCNS_STRING_ARRAY =
2906             "boosted_lte_earfcns_string_array";
2907 
2908     /**
2909      * Offset to be reduced from rsrp threshold while calculating signal strength level.
2910      * @hide
2911      */
2912     public static final String KEY_NRARFCNS_RSRP_BOOST_INT_ARRAY = "nrarfcns_rsrp_boost_int_array";
2913 
2914     /**
2915      * List of NR ARFCN (5G Absolute Radio Frequency Channel Number,
2916      * Reference: 3GPP TS 36.108) inclusive ranges on which corresponding
2917      * nrarfcns_rsrp_boost_int_array will be applied. The size of this array and
2918      * nrarfcns_rsrp_boost_int_array must be the same.
2919      * Format of the String array is expected to be {"nrarfcn1_start-nrarfcn1_end",
2920      * "nrarfcn2_start-nrarfcn2_end" ... }
2921      * @hide
2922      */
2923     public static final String KEY_BOOSTED_NRARFCNS_STRING_ARRAY = "boosted_nrarfcns_string_array";
2924 
2925     /**
2926      * Determine whether to use only RSRP for the number of LTE signal bars.
2927      * @hide
2928      *
2929      * @deprecated use {@link #KEY_PARAMETERS_USED_FOR_LTE_SIGNAL_BAR_INT}.
2930      */
2931     // FIXME: this key and related keys must not be exposed without a consistent philosophy for
2932     // all RATs.
2933     @Deprecated
2934     public static final String KEY_USE_ONLY_RSRP_FOR_LTE_SIGNAL_BAR_BOOL =
2935             "use_only_rsrp_for_lte_signal_bar_bool";
2936 
2937     /**
2938      * Bit-field integer to determine whether to use Reference Signal Received Power (RSRP),
2939      * Reference Signal Received Quality (RSRQ), or/and Reference Signal Signal to Noise Ratio
2940      * (RSSNR) for the number of LTE signal bars and signal criteria reporting enabling.
2941      *
2942      * <p> If a measure is not set, signal criteria reporting from modem will not be triggered and
2943      * not be used for calculating signal level. If multiple measures are set bit, the parameter
2944      * whose value is smallest is used to indicate the signal level.
2945      * <UL>
2946      *  <LI>RSRP = 1 << 0</LI>
2947      *  <LI>RSRQ = 1 << 1</LI>
2948      *  <LI>RSSNR = 1 << 2</LI>
2949      * </UL>
2950      * <p> The value of this key must be bitwise OR of {@link CellSignalStrengthLte#USE_RSRP},
2951      * {@link CellSignalStrengthLte#USE_RSRQ}, {@link CellSignalStrengthLte#USE_RSSNR}.
2952      *
2953      * <p> For example, if both RSRP and RSRQ are used, the value of key is 3 (1 << 0 | 1 << 1).
2954      * If the key is invalid or not configured, a default value (RSRP = 1 << 0) will apply.
2955      *
2956      * @hide
2957      */
2958     public static final String KEY_PARAMETERS_USED_FOR_LTE_SIGNAL_BAR_INT =
2959             "parameters_used_for_lte_signal_bar_int";
2960 
2961     /**
2962      * List of 4 customized 5G SS reference signal received power (SSRSRP) thresholds.
2963      * <p>
2964      * Reference: 3GPP TS 38.215
2965      * <p>
2966      * 4 threshold integers must be within the boundaries [-140 dB, -44 dB], and the levels are:
2967      * <UL>
2968      *     <LI>"NONE: [-140, threshold1)"</LI>
2969      *     <LI>"POOR: [threshold1, threshold2)"</LI>
2970      *     <LI>"MODERATE: [threshold2, threshold3)"</LI>
2971      *     <LI>"GOOD:  [threshold3, threshold4)"</LI>
2972      *     <LI>"EXCELLENT:  [threshold4, -44]"</LI>
2973      * </UL>
2974      * <p>
2975      * This key is considered invalid if the format is violated. If the key is invalid or
2976      * not configured, a default value set will apply.
2977      */
2978     public static final String KEY_5G_NR_SSRSRP_THRESHOLDS_INT_ARRAY =
2979             "5g_nr_ssrsrp_thresholds_int_array";
2980 
2981     /**
2982      * List of 4 customized 5G SS reference signal received quality (SSRSRQ) thresholds.
2983      * <p>
2984      * Reference: 3GPP TS 38.215; 3GPP TS 38.133 section 10
2985      * <p>
2986      * 4 threshold integers must be within the boundaries [-43 dB, 20 dB], and the levels are:
2987      * <UL>
2988      *     <LI>"NONE: [-43, threshold1)"</LI>
2989      *     <LI>"POOR: [threshold1, threshold2)"</LI>
2990      *     <LI>"MODERATE: [threshold2, threshold3)"</LI>
2991      *     <LI>"GOOD:  [threshold3, threshold4)"</LI>
2992      *     <LI>"EXCELLENT:  [threshold4, 20]"</LI>
2993      * </UL>
2994      * <p>
2995      * This key is considered invalid if the format is violated. If the key is invalid or
2996      * not configured, a default value set will apply.
2997      */
2998     public static final String KEY_5G_NR_SSRSRQ_THRESHOLDS_INT_ARRAY =
2999             "5g_nr_ssrsrq_thresholds_int_array";
3000 
3001     /**
3002      * List of 4 customized 5G SS signal-to-noise and interference ratio (SSSINR) thresholds.
3003      * <p>
3004      * Reference: 3GPP TS 38.215,
3005      *            3GPP TS 38.133 10.1.16.1
3006      * <p>
3007      * 4 threshold integers must be within the boundaries [-23 dB, 40 dB], and the levels are:
3008      * <UL>
3009      *     <LI>"NONE: [-23, threshold1)"</LI>
3010      *     <LI>"POOR: [threshold1, threshold2)"</LI>
3011      *     <LI>"MODERATE: [threshold2, threshold3)"</LI>
3012      *     <LI>"GOOD:  [threshold3, threshold4)"</LI>
3013      *     <LI>"EXCELLENT:  [threshold4, 40]"</LI>
3014      * </UL>
3015      * <p>
3016      * This key is considered invalid if the format is violated. If the key is invalid or
3017      * not configured, a default value set will apply.
3018      */
3019     public static final String KEY_5G_NR_SSSINR_THRESHOLDS_INT_ARRAY =
3020             "5g_nr_sssinr_thresholds_int_array";
3021 
3022     /**
3023      * An interval in dB for {@link SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_SSRSRP} measurement
3024      * type defining the required magnitude change between reports.
3025      *
3026      * <p>The default value is 2 and the minimum allowed value is 0. If no value or negative value
3027      * is set, the default value 2 is used.
3028      * @hide
3029      */
3030     public static final String KEY_NGRAN_SSRSRP_HYSTERESIS_DB_INT =
3031             "ngran_ssrsrp_hysteresis_db_int";
3032 
3033     /**
3034      * An interval in dB for {@link SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_SSRSRQ} measurement
3035      * type defining the required magnitude change between reports.
3036      *
3037      * <p>The default value is 2 and the minimum allowed value is 0. If no value or negative value
3038      * is set, the default value 2 is used.
3039      * @hide
3040      */
3041     public static final String KEY_NGRAN_SSRSRQ_HYSTERESIS_DB_INT =
3042             "ngran_ssrsrq_hysteresis_db_int";
3043 
3044     /**
3045      * An interval in dB for {@link SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_SSSINR} measurement
3046      * type defining the required magnitude change between reports.
3047      *
3048      * <p>The default value is 2 and the minimum allowed value is 0. If no value or negative value
3049      * is set, the default value 2 is used.
3050      * @hide
3051      */
3052     public static final String KEY_NGRAN_SSSINR_HYSTERESIS_DB_INT =
3053             "ngran_sssinr_hysteresis_db_int";
3054 
3055     /**
3056      * Bit-field integer to determine whether to use SS reference signal received power (SSRSRP),
3057      * SS reference signal received quality (SSRSRQ), or/and SS signal-to-noise and interference
3058      * ratio (SSSINR) for the number of 5G NR signal bars and signal criteria reporting enabling.
3059      *
3060      * <p> If a measure is not set, signal criteria reporting from modem will not be triggered and
3061      * not be used for calculating signal level. If multiple measures are set bit, the parameter
3062      * whose value is smallest is used to indicate the signal level.
3063      * <UL>
3064      *  <LI>SSRSRP = 1 << 0</LI>
3065      *  <LI>SSRSRQ = 1 << 1</LI>
3066      *  <LI>SSSINR = 1 << 2</LI>
3067      * </UL>
3068      *  The value of this key must be bitwise OR of {@link CellSignalStrengthNr#USE_SSRSRP},
3069      *  {@link CellSignalStrengthNr#USE_SSRSRQ}, {@link CellSignalStrengthNr#USE_SSSINR}.
3070      *
3071      * <p> For example, if both SSRSRP and SSSINR are used, the value of key is 5 (1 << 0 | 1 << 2).
3072      * If the key is invalid or not configured, a default value (SSRSRP = 1 << 0) will apply.
3073      *
3074      * <p> Reference: 3GPP TS 38.215,
3075      *                3GPP TS 38.133 10.1.16.1
3076      *
3077      * @hide
3078      */
3079     public static final String KEY_PARAMETERS_USE_FOR_5G_NR_SIGNAL_BAR_INT =
3080             "parameters_use_for_5g_nr_signal_bar_int";
3081 
3082     /**
3083      * There are two signal strengths, NR and LTE signal strength, during NR (non-standalone).
3084      * Boolean indicating whether to use LTE signal strength as primary during NR (non-standalone).
3085      * By default this value is true.
3086      *
3087      * @hide
3088      */
3089     public static final String KEY_SIGNAL_STRENGTH_NR_NSA_USE_LTE_AS_PRIMARY_BOOL =
3090             "signal_strength_nr_nsa_use_lte_as_primary_bool";
3091 
3092     /**
3093      * String array of default bandwidth values per network type.
3094      * The entries should be of form: "network_name:downlink,uplink", with values in Kbps.
3095      * For NR (5G), the following network names should be used:
3096      * - NR_NSA: NR NSA, sub-6 frequencies
3097      * - NR_NSA_MMWAVE: NR NSA, mmwave frequencies
3098      * - NR_SA: NR SA, sub-6 frequencies
3099      * - NR_SA_MMWAVE: NR SA, mmwave frequencies
3100      * @hide
3101      */
3102     public static final String KEY_BANDWIDTH_STRING_ARRAY = "bandwidth_string_array";
3103 
3104     /**
3105      * For NR (non-standalone), whether to use the LTE value instead of NR value as the default for
3106      * uplink bandwidth. Downlink bandwidth will still use the NR value as the default.
3107      * @hide
3108      */
3109     public static final String KEY_BANDWIDTH_NR_NSA_USE_LTE_VALUE_FOR_UPLINK_BOOL =
3110             "bandwidth_nr_nsa_use_lte_value_for_uplink_bool";
3111 
3112     /**
3113      * Key identifying if voice call barring notification is required to be shown to the user.
3114      * @hide
3115      */
3116     @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
3117     public static final String KEY_DISABLE_VOICE_BARRING_NOTIFICATION_BOOL =
3118             "disable_voice_barring_notification_bool";
3119 
3120     /**
3121      * List of operators considered non-roaming which won't show roaming icon.
3122      * <p>
3123      * Can use mcc or mcc+mnc as item. For example, 302 or 21407.
3124      * If operators, 21404 and 21407, make roaming agreements, users of 21404 should not see
3125      * the roaming icon as using 21407 network.
3126      * @hide
3127      */
3128     public static final String KEY_NON_ROAMING_OPERATOR_STRING_ARRAY =
3129             "non_roaming_operator_string_array";
3130 
3131     /**
3132      * List of operators considered roaming with the roaming icon.
3133      * <p>
3134      * Can use mcc or mcc+mnc as item. For example, 302 or 21407.
3135      * If operators, 21404 and 21407, make roaming agreements, users of 21404 should see
3136      * the roaming icon as using 21407 network.
3137      * <p>
3138      * A match on this supersedes a match on {@link #KEY_NON_ROAMING_OPERATOR_STRING_ARRAY}.
3139      * @hide
3140      */
3141     public static final String KEY_ROAMING_OPERATOR_STRING_ARRAY = "roaming_operator_string_array";
3142 
3143     /**
3144      * Config to show the roaming indicator (i.e. the "R" icon) from the status bar when roaming.
3145      * The roaming indicator will be shown if this is {@code true} and will not be shown if this is
3146      * {@code false}.
3147      *
3148      * @hide
3149      */
3150     public static final String KEY_SHOW_ROAMING_INDICATOR_BOOL = "show_roaming_indicator_bool";
3151 
3152     /**
3153      * URL from which the proto containing the public key of the Carrier used for
3154      * IMSI encryption will be downloaded.
3155      * @hide
3156      */
3157     public static final String IMSI_KEY_DOWNLOAD_URL_STRING = "imsi_key_download_url_string";
3158 
3159     /**
3160      * String representation of a carrier's public key used for IMSI encryption for ePDG. If this
3161      * is provided, the device will use it as a fallback when no key exists on device, but the key
3162      * download will still initiate.
3163      * Example string:
3164      *         "-----BEGIN CERTIFICATE-----\nabcde12345abcde12345abcde12345abcde1234
3165      * 5abcde12345abcde12345\nabcde12345abcde12345abcde12345abcde12345a\n-----END CERTIFICATE-----"
3166      * @hide
3167      */
3168     public static final String IMSI_CARRIER_PUBLIC_KEY_EPDG_STRING =
3169             "imsi_carrier_public_key_epdg_string";
3170 
3171     /**
3172      * String representation of a carrier's public key used for IMSI encryption for WLAN. If this
3173      * is provided, the device will use it as a fallback when no key exists on device, but the key
3174      * download will still initiate.
3175      * Example string:
3176      *         "-----BEGIN CERTIFICATE-----\nabcde12345abcde12345abcde12345abcde1234
3177      * 5abcde12345abcde12345\nabcde12345abcde12345abcde12345abcde12345a\n-----END CERTIFICATE-----"
3178      * @hide
3179      */
3180     public static final String IMSI_CARRIER_PUBLIC_KEY_WLAN_STRING =
3181             "imsi_carrier_public_key_wlan_string";
3182 
3183     /**
3184      * Identifies if the key is available for WLAN or EPDG or both. The value is a bitmask.
3185      * 0 indicates that neither EPDG or WLAN is enabled.
3186      * 1 indicates that key type TelephonyManager#KEY_TYPE_EPDG is enabled.
3187      * 2 indicates that key type TelephonyManager#KEY_TYPE_WLAN is enabled.
3188      * 3 indicates that both are enabled.
3189      */
3190     public static final String IMSI_KEY_AVAILABILITY_INT = "imsi_key_availability_int";
3191 
3192     /**
3193      * Key identifying if the CDMA Caller ID presentation and suppression MMI codes
3194      * should be converted to 3GPP CLIR codes when a multimode (CDMA+UMTS+LTE) device is roaming
3195      * on a 3GPP network. Specifically *67<number> will be converted to #31#<number> and
3196      * *82<number> will be converted to *31#<number> before dialing a call when this key is
3197      * set TRUE and device is roaming on a 3GPP network.
3198      * @hide
3199      */
3200     public static final String KEY_CONVERT_CDMA_CALLER_ID_MMI_CODES_WHILE_ROAMING_ON_3GPP_BOOL =
3201             "convert_cdma_caller_id_mmi_codes_while_roaming_on_3gpp_bool";
3202 
3203     /**
3204      * Flag specifying whether IMS registration state menu is shown in Status Info setting,
3205      * default to false.
3206      */
3207     public static final String KEY_SHOW_IMS_REGISTRATION_STATUS_BOOL =
3208             "show_ims_registration_status_bool";
3209 
3210     /**
3211      * Flag indicating whether the carrier supports RTT over IMS.
3212      */
3213     public static final String KEY_RTT_SUPPORTED_BOOL = "rtt_supported_bool";
3214 
3215     /**
3216      * Boolean flag indicating whether the carrier supports TTY.
3217      * <p>
3218      * Note that {@link #KEY_CARRIER_VOLTE_TTY_SUPPORTED_BOOL} controls availability of TTY over
3219      * VoLTE; if this carrier configuration is disabled, then
3220      * {@link #KEY_CARRIER_VOLTE_TTY_SUPPORTED_BOOL} is also implicitly disabled.
3221      * <p>
3222      * {@link TelecomManager#isTtySupported()} should be used to determine if a device supports TTY,
3223      * and this carrier config key should be used to see if the current carrier supports it.
3224      */
3225     public static final String KEY_TTY_SUPPORTED_BOOL = "tty_supported_bool";
3226 
3227     /**
3228      * Indicates if the carrier supports auto-upgrading a call to RTT when receiving a call from a
3229      * RTT-supported device.
3230      */
3231     public static final String KEY_RTT_AUTO_UPGRADE_BOOL = "rtt_auto_upgrade_bool";
3232 
3233     /**
3234      * Indicates if the carrier supports RTT during a video call.
3235      */
3236     public static final String KEY_RTT_SUPPORTED_FOR_VT_BOOL = "rtt_supported_for_vt_bool";
3237 
3238     /**
3239      * Indicates if the carrier supports upgrading a call that was previously an RTT call to VT.
3240      */
3241     public static final String KEY_VT_UPGRADE_SUPPORTED_FOR_DOWNGRADED_RTT_CALL_BOOL =
3242             "vt_upgrade_supported_for_downgraded_rtt_call";
3243 
3244     /**
3245      * Indicates if the carrier supports upgrading a call that was previously a VT call to RTT.
3246      */
3247     public static final String KEY_RTT_UPGRADE_SUPPORTED_FOR_DOWNGRADED_VT_CALL_BOOL =
3248             "rtt_upgrade_supported_for_downgraded_vt_call";
3249 
3250     /**
3251      * Indicates if the carrier supports upgrading a voice call to an RTT call during the call.
3252      */
3253     public static final String KEY_RTT_UPGRADE_SUPPORTED_BOOL = "rtt_upgrade_supported_bool";
3254 
3255     /**
3256      * Indicates if the carrier supports downgrading a RTT call to a voice call during the call.
3257      */
3258     public static final String KEY_RTT_DOWNGRADE_SUPPORTED_BOOL = "rtt_downgrade_supported_bool";
3259 
3260     /**
3261      * Indicates if the TTY HCO and VCO options should be hidden in the accessibility menu
3262      * if the device is capable of RTT.
3263      */
3264     public static final String KEY_HIDE_TTY_HCO_VCO_WITH_RTT_BOOL = "hide_tty_hco_vco_with_rtt";
3265 
3266     /**
3267      * The flag to disable the popup dialog which warns the user of data charges.
3268      */
3269     public static final String KEY_DISABLE_CHARGE_INDICATION_BOOL =
3270             "disable_charge_indication_bool";
3271 
3272     /**
3273      * Boolean indicating whether to skip the call forwarding (CF) fail-to-disable dialog.
3274      * The logic used to determine whether we succeeded in disabling is carrier specific,
3275      * so the dialog may not always be accurate.
3276      * {@code false} - show CF fail-to-disable dialog.
3277      * {@code true}  - skip showing CF fail-to-disable dialog.
3278      *
3279      * @hide
3280      */
3281     public static final String KEY_SKIP_CF_FAIL_TO_DISABLE_DIALOG_BOOL =
3282             "skip_cf_fail_to_disable_dialog_bool";
3283 
3284     /**
3285      * Flag specifying whether operator supports including no reply condition timer option on
3286      * CFNRy (3GPP TS 24.082 3: Call Forwarding on No Reply) in the call forwarding settings UI.
3287      * {@code true}  - include no reply condition timer option on CFNRy
3288      * {@code false} - don't include no reply condition timer option on CFNRy
3289      *
3290      * @hide
3291      */
3292     public static final String KEY_SUPPORT_NO_REPLY_TIMER_FOR_CFNRY_BOOL =
3293             "support_no_reply_timer_for_cfnry_bool";
3294 
3295     /**
3296      * List of the FAC (feature access codes) to dial as a normal call.
3297      * @hide
3298      */
3299     public static final String KEY_FEATURE_ACCESS_CODES_STRING_ARRAY =
3300             "feature_access_codes_string_array";
3301 
3302     /**
3303      * Determines if the carrier wants to identify high definition calls in the call log.
3304      * @hide
3305      */
3306     public static final String KEY_IDENTIFY_HIGH_DEFINITION_CALLS_IN_CALL_LOG_BOOL =
3307             "identify_high_definition_calls_in_call_log_bool";
3308 
3309     /**
3310      * Flag specifying whether to use the {@link ServiceState} roaming status, which can be
3311      * affected by other carrier configs (e.g.
3312      * {@link #KEY_GSM_NONROAMING_NETWORKS_STRING_ARRAY}), when setting the SPN display.
3313      * <p>
3314      * If {@code true}, the SPN display uses {@link ServiceState#getRoaming}.
3315      * If {@code false} the SPN display checks if the current MCC/MNC is different from the
3316      * SIM card's MCC/MNC.
3317      *
3318      * @see #KEY_GSM_ROAMING_NETWORKS_STRING_ARRAY
3319      * @see #KEY_GSM_NONROAMING_NETWORKS_STRING_ARRAY
3320      * @see #KEY_NON_ROAMING_OPERATOR_STRING_ARRAY
3321      * @see #KEY_ROAMING_OPERATOR_STRING_ARRAY
3322      * @see #KEY_FORCE_HOME_NETWORK_BOOL
3323      *
3324      * @hide
3325      */
3326     public static final String KEY_SPN_DISPLAY_RULE_USE_ROAMING_FROM_SERVICE_STATE_BOOL =
3327             "spn_display_rule_use_roaming_from_service_state_bool";
3328 
3329     /**
3330      * Determines whether any carrier has been identified and its specific config has been applied,
3331      * default to false.
3332      */
3333     public static final String KEY_CARRIER_CONFIG_APPLIED_BOOL = "carrier_config_applied_bool";
3334 
3335     /**
3336      * Determines whether we should show a warning asking the user to check with their carrier
3337      * on pricing when the user enabled data roaming,
3338      * default to false.
3339      */
3340     public static final String KEY_CHECK_PRICING_WITH_CARRIER_FOR_DATA_ROAMING_BOOL =
3341             "check_pricing_with_carrier_data_roaming_bool";
3342 
3343     /**
3344      * Determines whether we should show a notification when the phone established a data
3345      * connection in roaming network, to warn users about possible roaming charges.
3346      *
3347      * @see #KEY_DATA_CONNECTED_ROAMING_NOTIFICATION_EXCLUDED_MCCS_STRING_ARRAY
3348      * @see #KEY_DATA_CONNECTED_ROAMING_NOTIFICATION_INCLUDED_MCC_MNCS_STRING_ARRAY
3349      * @hide
3350      */
3351     public static final String KEY_SHOW_DATA_CONNECTED_ROAMING_NOTIFICATION_BOOL =
3352             "show_data_connected_roaming_notification";
3353 
3354     /**
3355      * Determines what MCCs are exceptions for the value of
3356      * {@link #KEY_SHOW_DATA_CONNECTED_ROAMING_NOTIFICATION_BOOL}.
3357      * An empty list indicates that there are no exceptions.
3358      *
3359      * @see #KEY_SHOW_DATA_CONNECTED_ROAMING_NOTIFICATION_BOOL
3360      * @see #KEY_DATA_CONNECTED_ROAMING_NOTIFICATION_INCLUDED_MCC_MNCS_STRING_ARRAY
3361      * @hide
3362      */
3363     public static final String
3364             KEY_DATA_CONNECTED_ROAMING_NOTIFICATION_EXCLUDED_MCCS_STRING_ARRAY =
3365             "data_connected_roaming_notification_excluded_mccs_string_array";
3366 
3367     /**
3368      * Determines what MCC+MNCs are exceptions for the MCCs specified in
3369      * {@link #KEY_DATA_CONNECTED_ROAMING_NOTIFICATION_EXCLUDED_MCCS_STRING_ARRAY}, meaning the
3370      * value for the MCC+MNC is {@link #KEY_SHOW_DATA_CONNECTED_ROAMING_NOTIFICATION_BOOL}.
3371      * An empty list indicates that there are no MNC-specific exceptions.
3372      *
3373      * @see #KEY_SHOW_DATA_CONNECTED_ROAMING_NOTIFICATION_BOOL
3374      * @see #KEY_DATA_CONNECTED_ROAMING_NOTIFICATION_EXCLUDED_MCCS_STRING_ARRAY
3375      * @hide
3376      */
3377     public static final String
3378             KEY_DATA_CONNECTED_ROAMING_NOTIFICATION_INCLUDED_MCC_MNCS_STRING_ARRAY =
3379             "data_connected_roaming_notification_included_mcc_mncs_string_array";
3380 
3381     /**
3382      * A list of 4 LTE RSRP thresholds above which a signal level is considered POOR,
3383      * MODERATE, GOOD, or EXCELLENT, to be used in SignalStrength reporting.
3384      *
3385      * Note that the min and max thresholds are fixed at -140 and -44, as explained in
3386      * TS 136.133 9.1.4 - RSRP Measurement Report Mapping.
3387      * <p>
3388      * See SignalStrength#MAX_LTE_RSRP and SignalStrength#MIN_LTE_RSRP. Any signal level outside
3389      * these boundaries is considered invalid.
3390      * @hide
3391      */
3392     public static final String KEY_LTE_RSRP_THRESHOLDS_INT_ARRAY = "lte_rsrp_thresholds_int_array";
3393 
3394     /**
3395      * A list of 4 customized LTE Reference Signal Received Quality (RSRQ) thresholds.
3396      *
3397      * Reference: TS 136.133 v12.6.0 section 9.1.7 - RSRQ Measurement Report Mapping.
3398      *
3399      * 4 threshold integers must be within the boundaries [-34 dB, 3 dB], and the levels are:
3400      *     "NONE: [-34, threshold1)"
3401      *     "POOR: [threshold1, threshold2)"
3402      *     "MODERATE: [threshold2, threshold3)"
3403      *     "GOOD:  [threshold3, threshold4)"
3404      *     "EXCELLENT:  [threshold4, 3]"
3405      *
3406      * This key is considered invalid if the format is violated. If the key is invalid or
3407      * not configured, a default value set will apply.
3408      */
3409     public static final String KEY_LTE_RSRQ_THRESHOLDS_INT_ARRAY = "lte_rsrq_thresholds_int_array";
3410 
3411     /**
3412      * A list of 4 customized LTE Reference Signal Signal to Noise Ratio (RSSNR) thresholds.
3413      *
3414      * 4 threshold integers must be within the boundaries [-20 dB, 30 dB], and the levels are:
3415      *     "NONE: [-20, threshold1)"
3416      *     "POOR: [threshold1, threshold2)"
3417      *     "MODERATE: [threshold2, threshold3)"
3418      *     "GOOD:  [threshold3, threshold4)"
3419      *     "EXCELLENT:  [threshold4, 30]"
3420      *
3421      * This key is considered invalid if the format is violated. If the key is invalid or
3422      * not configured, a default value set will apply.
3423      */
3424     public static final String KEY_LTE_RSSNR_THRESHOLDS_INT_ARRAY =
3425             "lte_rssnr_thresholds_int_array";
3426 
3427     /**
3428      * An interval in dB for {@link SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSRP} measurement
3429      * type defining the required magnitude change between reports.
3430      *
3431      * <p>The default value is 2 and the minimum allowed value is 0. If no value or negative value
3432      * is set, the default value 2 is used.
3433      * @hide
3434      */
3435     public static final String KEY_EUTRAN_RSRP_HYSTERESIS_DB_INT = "eutran_rsrp_hysteresis_db_int";
3436 
3437     /**
3438      * An interval in dB for {@link SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSRQ} measurement
3439      * type defining the required magnitude change between reports.
3440      *
3441      * <p>The default value is 2 and the minimum allowed value is 0. If no value or negative value
3442      * is set, the default value 2 is used.
3443      * @hide
3444      */
3445     public static final String KEY_EUTRAN_RSRQ_HYSTERESIS_DB_INT = "eutran_rsrq_hysteresis_db_int";
3446 
3447     /**
3448      * An interval in dB for {@link SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSSNR} measurement
3449      * type defining the required magnitude change between reports.
3450      *
3451      * <p>The default value is 2 and the minimum allowed value is 0. If no value or negative value
3452      * is set, the default value 2 is used.
3453      * @hide
3454      */
3455     public static final String KEY_EUTRAN_RSSNR_HYSTERESIS_DB_INT =
3456             "eutran_rssnr_hysteresis_db_int";
3457 
3458     /**
3459      * Decides when clients try to bind to iwlan network service, which package name will
3460      * the binding intent go to.
3461      * @hide
3462      */
3463     public static final String KEY_CARRIER_NETWORK_SERVICE_WLAN_PACKAGE_OVERRIDE_STRING =
3464             "carrier_network_service_wlan_package_override_string";
3465 
3466     /**
3467      * Decides when clients try to bind to iwlan network service, which class name will
3468      * the binding intent go to.
3469      * @hide
3470      */
3471     public static final String KEY_CARRIER_NETWORK_SERVICE_WLAN_CLASS_OVERRIDE_STRING =
3472             "carrier_network_service_wlan_class_override_string";
3473 
3474     /**
3475      * Decides when clients try to bind to wwan (cellular) network service, which package name will
3476      * the binding intent go to.
3477      * @hide
3478      */
3479     public static final String KEY_CARRIER_NETWORK_SERVICE_WWAN_PACKAGE_OVERRIDE_STRING =
3480             "carrier_network_service_wwan_package_override_string";
3481 
3482     /**
3483      * Decides when clients try to bind to wwan (cellular) network service, which class name will
3484      * the binding intent go to.
3485      * @hide
3486      */
3487     public static final String KEY_CARRIER_NETWORK_SERVICE_WWAN_CLASS_OVERRIDE_STRING =
3488             "carrier_network_service_wwan_class_override_string";
3489 
3490     /**
3491      * The package name of qualified networks service that telephony binds to.
3492      *
3493      * @hide
3494      */
3495     public static final String KEY_CARRIER_QUALIFIED_NETWORKS_SERVICE_PACKAGE_OVERRIDE_STRING =
3496             "carrier_qualified_networks_service_package_override_string";
3497 
3498     /**
3499      * The class name of qualified networks service that telephony binds to.
3500      *
3501      * @hide
3502      */
3503     public static final String KEY_CARRIER_QUALIFIED_NETWORKS_SERVICE_CLASS_OVERRIDE_STRING =
3504             "carrier_qualified_networks_service_class_override_string";
3505 
3506     /**
3507      * A list of 4 WCDMA RSCP thresholds above which a signal level is considered POOR,
3508      * MODERATE, GOOD, or EXCELLENT, to be used in SignalStrength reporting.
3509      *
3510      * Note that the min and max thresholds are fixed at -120 and -24, as set in 3GPP TS 27.007
3511      * section 8.69.
3512      * <p>
3513      * See CellSignalStrengthWcdma#WCDMA_RSCP_MAX and CellSignalStrengthWcdma#WCDMA_RSCP_MIN.
3514      * Any signal level outside these boundaries is considered invalid.
3515      * @hide
3516      */
3517     public static final String KEY_WCDMA_RSCP_THRESHOLDS_INT_ARRAY =
3518             "wcdma_rscp_thresholds_int_array";
3519 
3520     /**
3521      * A list of 4 WCDMA ECNO thresholds above which a signal level is considered POOR,
3522      * MODERATE, GOOD, or EXCELLENT, to be used in SignalStrength reporting.
3523      *
3524      * Note that the min and max thresholds are fixed at -24 and 1, as set in 3GPP TS 25.215
3525      * section 5.1.5.
3526      * Any signal level outside these boundaries is considered invalid.
3527      * <p>
3528      *
3529      * The default value is {@code {-24, -14, -6, 1}}.
3530      * @hide
3531      */
3532     public static final String KEY_WCDMA_ECNO_THRESHOLDS_INT_ARRAY =
3533             "wcdma_ecno_thresholds_int_array";
3534 
3535     /**
3536      * An interval in dB for {@link SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSCP} measurement
3537      * type defining the required magnitude change between reports.
3538      *
3539      * <p>The default value is 2 and the minimum allowed value is 0. If no value or negative value
3540      * is set, the default value 2 is used.
3541      * @hide
3542      */
3543     public static final String KEY_UTRAN_RSCP_HYSTERESIS_DB_INT = "utran_rscp_hysteresis_db_int";
3544 
3545     /**
3546      * An interval in dB for {@link SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_ECNO} measurement
3547      * type defining the required magnitude change between reports.
3548      *
3549      * <p>The default value is 2 and the minimum allowed value is 0. If no value or negative value
3550      * is set, the default value 2 is used.
3551      * @hide
3552      */
3553     public static final String KEY_UTRAN_ECNO_HYSTERESIS_DB_INT = "utran_ecno_hysteresis_db_int";
3554 
3555     /**
3556      * The default measurement to use for signal strength reporting. If this is not specified, the
3557      * RSSI is used.
3558      * <p>
3559      * e.g.) To use RSCP by default, set the value to "rscp". The signal strength level will
3560      * then be determined by #KEY_WCDMA_RSCP_THRESHOLDS_INT_ARRAY
3561      * <p>
3562      * Currently this supports the value "rscp","rssi" and "ecno".
3563      * @hide
3564      */
3565     // FIXME: this key and related keys must not be exposed without a consistent philosophy for
3566     // all RATs.
3567     public static final String KEY_WCDMA_DEFAULT_SIGNAL_STRENGTH_MEASUREMENT_STRING =
3568             "wcdma_default_signal_strength_measurement_string";
3569 
3570     /**
3571      * When a partial sms / mms message stay in raw table for too long without being completed,
3572      * we expire them and delete them from the raw table. This carrier config defines the
3573      * expiration time.
3574      * @hide
3575      */
3576     public static final String KEY_UNDELIVERED_SMS_MESSAGE_EXPIRATION_TIME =
3577             "undelivered_sms_message_expiration_time";
3578 
3579     /**
3580      * Specifies a carrier-defined {@link android.telecom.CallRedirectionService} which Telecom
3581      * will bind to for outgoing calls. An empty string indicates that no carrier-defined
3582      * {@link android.telecom.CallRedirectionService} is specified.
3583      */
3584     public static final String KEY_CALL_REDIRECTION_SERVICE_COMPONENT_NAME_STRING =
3585             "call_redirection_service_component_name_string";
3586 
3587     /**
3588      * Support for the original string display of CDMA MO call.
3589      * By default, it is disabled.
3590      * @hide
3591      */
3592     public static final String KEY_CONFIG_SHOW_ORIG_DIAL_STRING_FOR_CDMA_BOOL =
3593             "config_show_orig_dial_string_for_cdma";
3594 
3595     /**
3596      * Flag specifying whether to show notification(call blocking disabled) when Enhanced Call
3597      * Blocking(KEY_SUPPORT_ENHANCED_CALL_BLOCKING_BOOL) is enabled and making emergency call.
3598      * When true, notification is shown always.
3599      * When false, notification is shown only when any setting of "Enhanced Blocked number" is
3600      * enabled.
3601      */
3602     public static final String KEY_SHOW_CALL_BLOCKING_DISABLED_NOTIFICATION_ALWAYS_BOOL =
3603             "show_call_blocking_disabled_notification_always_bool";
3604 
3605     /**
3606      * Some carriers only support SS over UT via INTERNET PDN.
3607      * When mobile data is OFF or data roaming OFF during roaming,
3608      * UI should block the call forwarding operation and notify the user
3609      * that the function only works if data is available.
3610      * @hide
3611      */
3612     public static final String KEY_CALL_FORWARDING_OVER_UT_WARNING_BOOL =
3613             "call_forwarding_over_ut_warning_bool";
3614 
3615     /**
3616      * Some carriers only support SS over UT via INTERNET PDN.
3617      * When mobile data is OFF or data roaming OFF during roaming,
3618      * UI should block the call barring operation and notify the user
3619      * that the function only works if data is available.
3620      * @hide
3621      */
3622     public static final String KEY_CALL_BARRING_OVER_UT_WARNING_BOOL =
3623             "call_barring_over_ut_warning_bool";
3624 
3625     /**
3626      * Some carriers only support SS over UT via INTERNET PDN.
3627      * When mobile data is OFF or data roaming OFF during roaming,
3628      * UI should block the caller id operation and notify the user
3629      * that the function only works if data is available.
3630      * @hide
3631      */
3632     public static final String KEY_CALLER_ID_OVER_UT_WARNING_BOOL =
3633             "caller_id_over_ut_warning_bool";
3634 
3635     /**
3636      * Some carriers only support SS over UT via INTERNET PDN.
3637      * When mobile data is OFF or data roaming OFF during roaming,
3638      * UI should block the call waiting operation and notify the user
3639      * that the function only works if data is available.
3640      * @hide
3641      */
3642     public static final String KEY_CALL_WAITING_OVER_UT_WARNING_BOOL =
3643             "call_waiting_over_ut_warning_bool";
3644 
3645     /**
3646      * Flag indicating whether to support "Network default" option in Caller ID settings for Calling
3647      * Line Identification Restriction (CLIR).
3648      */
3649     public static final String KEY_SUPPORT_CLIR_NETWORK_DEFAULT_BOOL =
3650             "support_clir_network_default_bool";
3651 
3652     /**
3653      * Determines whether the carrier want to support emergency dialer shortcut.
3654      * @hide
3655      */
3656     public static final String KEY_SUPPORT_EMERGENCY_DIALER_SHORTCUT_BOOL =
3657             "support_emergency_dialer_shortcut_bool";
3658 
3659     /**
3660      * Call forwarding uses USSD command without SS command.
3661      * When {@code true}, the call forwarding query/set by ussd command and UI only display Call
3662      * Forwarding when unanswered.
3663      * When {@code false}, don't use USSD to query/set call forwarding.
3664      * @hide
3665      */
3666     public static final String KEY_USE_CALL_FORWARDING_USSD_BOOL = "use_call_forwarding_ussd_bool";
3667 
3668     /**
3669      * This flag specifies whether to support for the caller id set command by ussd.
3670      * When {@code true}, device shall sync caller id ussd result to ss command.
3671      * When {@code false}, caller id don't support ussd command.
3672      * @hide
3673      */
3674     public static final String KEY_USE_CALLER_ID_USSD_BOOL = "use_caller_id_ussd_bool";
3675 
3676     /**
3677      * Call waiting uses USSD command without SS command.
3678      * When {@code true}, the call waiting query/set by ussd command.
3679      * When {@code false}, doesn't use USSD to query/set call waiting.
3680      * @hide
3681      */
3682     public static final String KEY_USE_CALL_WAITING_USSD_BOOL = "use_call_waiting_ussd_bool";
3683 
3684     /**
3685      * Specifies the service class for call waiting service.
3686      * Default value is
3687      * {@link com.android.internal.telephony.CommandsInterface#SERVICE_CLASS_VOICE}.
3688      * <p>
3689      * See 27.007 +CCFC or +CLCK.
3690      * The value set as below:
3691      * {@link com.android.internal.telephony.CommandsInterface#SERVICE_CLASS_NONE}
3692      * {@link com.android.internal.telephony.CommandsInterface#SERVICE_CLASS_VOICE}
3693      * {@link com.android.internal.telephony.CommandsInterface#SERVICE_CLASS_DATA}
3694      * {@link com.android.internal.telephony.CommandsInterface#SERVICE_CLASS_FAX}
3695      * {@link com.android.internal.telephony.CommandsInterface#SERVICE_CLASS_SMS}
3696      * {@link com.android.internal.telephony.CommandsInterface#SERVICE_CLASS_DATA_SYNC}
3697      * {@link com.android.internal.telephony.CommandsInterface#SERVICE_CLASS_DATA_ASYNC}
3698      * {@link com.android.internal.telephony.CommandsInterface#SERVICE_CLASS_PACKET}
3699      * {@link com.android.internal.telephony.CommandsInterface#SERVICE_CLASS_PAD}
3700      * {@link com.android.internal.telephony.CommandsInterface#SERVICE_CLASS_MAX}
3701      * @hide
3702      */
3703     public static final String KEY_CALL_WAITING_SERVICE_CLASS_INT =
3704             "call_waiting_service_class_int";
3705 
3706     /**
3707      * This configuration allows the system UI to display different 5G icons for different 5G
3708      * scenarios.
3709      *
3710      * There are five 5G scenarios:
3711      * 1. connected_mmwave: device currently connected to 5G cell as the secondary cell and using
3712      *    millimeter wave.
3713      * 2. connected: device currently connected to 5G cell as the secondary cell but not using
3714      *    millimeter wave.
3715      * 3. not_restricted_rrc_idle: device camped on a network that has 5G capability(not necessary
3716      *    to connect a 5G cell as a secondary cell) and the use of 5G is not restricted and RRC
3717      *    currently in IDLE state.
3718      * 4. not_restricted_rrc_con: device camped on a network that has 5G capability(not necessary
3719      *    to connect a 5G cell as a secondary cell) and the use of 5G is not restricted and RRC
3720      *    currently in CONNECTED state.
3721      * 5. restricted: device camped on a network that has 5G capability(not necessary to connect a
3722      *    5G cell as a secondary cell) but the use of 5G is restricted.
3723      *
3724      * The configured string contains multiple key-value pairs separated by comma. For each pair,
3725      * the key and value are separated by a colon. The key corresponds to a 5G status above and
3726      * the value is the icon name. Use "None" as the icon name if no icon should be shown in a
3727      * specific 5G scenario. If the scenario is "None", config can skip this key and value.
3728      *
3729      * Icon name options: "5G_Plus", "5G".
3730      *
3731      * Here is an example:
3732      * UE wants to display 5G_Plus icon for scenario#1, and 5G icon for scenario#2; otherwise not
3733      * define.
3734      * The configuration is: "connected_mmwave:5G_Plus,connected:5G"
3735      * @hide
3736      */
3737     public static final String KEY_5G_ICON_CONFIGURATION_STRING = "5g_icon_configuration_string";
3738 
3739     /**
3740      * This configuration allows the system UI to determine how long to continue to display 5G icons
3741      * when the device switches between different 5G scenarios.
3742      *
3743      * There are seven 5G scenarios:
3744      * 1. connected_mmwave: device currently connected to 5G cell as the secondary cell and using
3745      *    millimeter wave.
3746      * 2. connected: device currently connected to 5G cell as the secondary cell but not using
3747      *    millimeter wave.
3748      * 3. not_restricted_rrc_idle: device camped on a network that has 5G capability (not necessary
3749      *    to connect a 5G cell as a secondary cell) and the use of 5G is not restricted and RRC
3750      *    currently in IDLE state.
3751      * 4. not_restricted_rrc_con: device camped on a network that has 5G capability (not necessary
3752      *    to connect a 5G cell as a secondary cell) and the use of 5G is not restricted and RRC
3753      *    currently in CONNECTED state.
3754      * 5. restricted: device camped on a network that has 5G capability (not necessary to connect a
3755      *    5G cell as a secondary cell) but the use of 5G is restricted.
3756      * 6. legacy: device is not camped on a network that has 5G capability
3757      * 7. any: any of the above scenarios
3758      *
3759      * The configured string contains various timer rules separated by a semicolon.
3760      * Each rule will have three items: prior 5G scenario, current 5G scenario, and grace period
3761      * in seconds before changing the icon. When the 5G state changes from the prior to the current
3762      * 5G scenario, the system UI will continue to show the icon for the prior 5G scenario (defined
3763      * in {@link #KEY_5G_ICON_CONFIGURATION_STRING}) for the amount of time specified by the grace
3764      * period. If the prior 5G scenario is reestablished, the timer will reset and start again if
3765      * the UE changes 5G scenarios again. Defined states (5G scenarios #1-5) take precedence over
3766      * 'any' (5G scenario #6), and unspecified transitions have a default grace period of 0.
3767      * The order of rules in the configuration determines the priority (the first applicable timer
3768      * rule will be used).
3769      *
3770      * Here is an example: "connected_mmwave,connected,30;connected_mmwave,any,10;connected,any,10"
3771      * This configuration defines 3 timers:
3772      * 1. When UE goes from 'connected_mmwave' to 'connected', system UI will continue to display
3773      *    the 5G icon for 'connected_mmwave' for 30 seconds.
3774      * 2. When UE goes from 'connected_mmwave' to any other state (except for connected, since
3775      *    rule 1 would be used instead), system UI will continue to display the 5G icon for
3776      *    'connected_mmwave' for 10 seconds.
3777      * 3. When UE goes from 'connected' to any other state, system UI will continue to display the
3778      *    5G icon for 'connected' for 10 seconds.
3779      *
3780      * @hide
3781      */
3782     public static final String KEY_5G_ICON_DISPLAY_GRACE_PERIOD_STRING =
3783             "5g_icon_display_grace_period_string";
3784 
3785     /**
3786      * This configuration extends {@link #KEY_5G_ICON_DISPLAY_GRACE_PERIOD_STRING} to allow the
3787      * system UI to continue displaying 5G icons after the initial timer expires.
3788      *
3789      * There are seven 5G scenarios:
3790      * 1. connected_mmwave: device currently connected to 5G cell as the secondary cell and using
3791      *    millimeter wave.
3792      * 2. connected: device currently connected to 5G cell as the secondary cell but not using
3793      *    millimeter wave.
3794      * 3. not_restricted_rrc_idle: device camped on a network that has 5G capability (not necessary
3795      *    to connect a 5G cell as a secondary cell) and the use of 5G is not restricted and RRC
3796      *    currently in IDLE state.
3797      * 4. not_restricted_rrc_con: device camped on a network that has 5G capability (not necessary
3798      *    to connect a 5G cell as a secondary cell) and the use of 5G is not restricted and RRC
3799      *    currently in CONNECTED state.
3800      * 5. restricted: device camped on a network that has 5G capability (not necessary to connect a
3801      *    5G cell as a secondary cell) but the use of 5G is restricted.
3802      * 6. legacy: device is not camped on a network that has 5G capability
3803      * 7. any: any of the above scenarios
3804      *
3805      * The configured string contains various timer rules separated by a semicolon.
3806      * Each rule will have three items: primary 5G scenario, secondary 5G scenario, and
3807      * grace period in seconds before changing the icon. When the timer for the primary 5G timer
3808      * expires, the system UI will continue to show the icon for the primary 5G scenario (defined
3809      * in {@link #KEY_5G_ICON_CONFIGURATION_STRING}) for the amount of time specified by the grace
3810      * period. If the primary 5G scenario is reestablished, the timers will reset and the system UI
3811      * will continue to display the icon for the primary 5G scenario without interruption. If the
3812      * secondary 5G scenario is lost, the timer will reset and the icon will reflect the true state.
3813      * Defined states (5G scenarios #1-5) take precedence over 'any' (5G scenario #6), and
3814      * unspecified transitions have a default grace period of 0. The order of rules in the
3815      * configuration determines the priority (the first applicable timer rule will be used).
3816      *
3817      * Here is an example: "connected,not_restricted_rrc_idle,30"
3818      * This configuration defines a secondary timer that extends the primary 'connected' timer.
3819      * When the primary 'connected' timer expires while the UE is in the 'not_restricted_rrc_idle'
3820      * 5G state, system UI will continue to display the 5G icon for 'connected' for 30 seconds.
3821      * If the 5G state returns to 'connected', the timer will be reset without change to the icon,
3822      * and if the 5G state changes to neither 'connected' not 'not_restricted_rrc_idle', the icon
3823      * will change to reflect the true state.
3824      *
3825      * @hide
3826      */
3827     public static final String KEY_5G_ICON_DISPLAY_SECONDARY_GRACE_PERIOD_STRING =
3828             "5g_icon_display_secondary_grace_period_string";
3829 
3830     /**
3831      * Whether device reset all of NR timers when device camped on a network that haven't 5G
3832      * capability and RRC currently in IDLE state.
3833      *
3834      * The default value is false;
3835      *
3836      * @hide
3837      */
3838     public static final String KEY_NR_TIMERS_RESET_IF_NON_ENDC_AND_RRC_IDLE_BOOL =
3839             "nr_timers_reset_if_non_endc_and_rrc_idle_bool";
3840 
3841     /**
3842      * A list of additional NR advanced band would map to
3843      * {@link TelephonyDisplayInfo#OVERRIDE_NETWORK_TYPE_NR_ADVANCED} when the device is on that
3844      * band.
3845      *
3846      * @hide
3847      */
3848     public static final String KEY_ADDITIONAL_NR_ADVANCED_BANDS_INT_ARRAY =
3849             "additional_nr_advanced_bands_int_array";
3850 
3851     /**
3852      * This configuration allows the framework to control the NR advanced capable by protocol
3853      * configuration options(PCO).
3854      *
3855      * If this config is 0, then the nr advanced capable is enabled.
3856      * If this config is not 0 and PCO container with this config's address is 1, then the nr
3857      * advanced capable is enabled.
3858      * If this config is not 0 and PCO container with this config's address is 0, then the nr
3859      * advanced capable is disabled.
3860      *
3861      * @hide
3862      */
3863     public static final String KEY_NR_ADVANCED_CAPABLE_PCO_ID_INT =
3864             "nr_advanced_capable_pco_id_int";
3865 
3866     /**
3867      * Enabled NR advanced (i.e. 5G+) icon while roaming. The default value is {@code true}, meaming
3868      * the same NR advanced logic used for home network will be used for roaming network as well.
3869      * Set this to {@code false} will disable NR advanced icon while the device is roaming,
3870      * regardless meeting NR advanced criteria or not.
3871      *
3872      * @hide
3873      */
3874     public static final String KEY_ENABLE_NR_ADVANCED_WHILE_ROAMING_BOOL =
3875             "enable_nr_advanced_for_roaming_bool";
3876 
3877     /**
3878      * This configuration allows the framework to use user data communication to detect Idle state,
3879      * and this is used on the 5G icon.
3880      *
3881      * There is a new way for RRC state detection at Android 12. If
3882      * {@link android.telephony.TelephonyManager#isRadioInterfaceCapabilitySupported}(
3883      * {@link TelephonyManager#CAPABILITY_PHYSICAL_CHANNEL_CONFIG_1_6_SUPPORTED}) returns true,
3884      * then framework can use PHYSICAL_CHANNEL_CONFIG for RRC state detection. Based on this
3885      * condition, some carriers want to use the legacy behavior that way is using user data
3886      * communication to detect the Idle state. Therefore, this configuration allows the framework
3887      * to use user data communication to detect Idle state.
3888      *
3889      * There are 3 situations reflects the carrier define Idle state.
3890      * 1. using PHYSICAL_CHANNEL_CONFIG to detect RRC Idle
3891      * 2. using all of data connections to detect RRC Idle.
3892      * 3. using data communication(consider internet data connection only) to detect data Idle.
3893      *
3894      * How to setup for above 3 cases?
3895      * For below part, we call the condition#1 is device support
3896      * {@link android.telephony.TelephonyManager#isRadioInterfaceCapabilitySupported}(
3897      * {@link TelephonyManager#CAPABILITY_PHYSICAL_CHANNEL_CONFIG_1_6_SUPPORTED}).
3898      * The condition#2 is carrier enable the KEY_LTE_ENDC_USING_USER_DATA_FOR_RRC_DETECTION_BOOL.
3899      *
3900      * For case#1, the condition#1 is true and the condition#2 is false.
3901      * For case#2, the condition#1 is false and the condition#2 is false.
3902      * For case#3, the condition#2 is true.
3903      * @hide
3904      */
3905     public static final String KEY_LTE_ENDC_USING_USER_DATA_FOR_RRC_DETECTION_BOOL =
3906             "lte_endc_using_user_data_for_rrc_detection_bool";
3907 
3908     /**
3909      * Controls time in milliseconds until DcTracker reevaluates 5G connection state.
3910      * @hide
3911      */
3912     public static final String KEY_5G_WATCHDOG_TIME_MS_LONG = "5g_watchdog_time_ms_long";
3913 
3914     /**
3915      * Which network types are unmetered. A string array that can contain network type names from
3916      * {@link TelephonyManager#getNetworkTypeName(int)} in addition to the following NR keys:
3917      * NR_NSA - NR NSA is unmetered for sub-6 frequencies
3918      * NR_NSA_MMWAVE - NR NSA is unmetered for mmwave frequencies
3919      * NR_SA - NR SA is unmetered for sub-6 frequencies
3920      * NR_SA_MMWAVE - NR SA is unmetered for mmwave frequencies
3921      *
3922      * Note that this config only applies if an unmetered SubscriptionPlan is set via {@link
3923      * SubscriptionManager#setSubscriptionPlans(int, List, long)} or an unmetered override is set
3924      * via {@link SubscriptionManager#setSubscriptionOverrideUnmetered(int, boolean, int[], long)}
3925      * or {@link SubscriptionManager#setSubscriptionOverrideUnmetered(int, boolean, long)}.
3926      * If neither SubscriptionPlans nor an override are set, then no network types can be unmetered
3927      * regardless of the value of this config.
3928      * @hide
3929      */
3930     public static final String KEY_UNMETERED_NETWORK_TYPES_STRING_ARRAY =
3931             "unmetered_network_types_string_array";
3932 
3933     /**
3934      * Which network types are unmetered when roaming. A string array that can contain network type
3935      * names from {@link TelephonyManager#getNetworkTypeName(int)} in addition to the following
3936      * NR keys:
3937      * NR_NSA - NR NSA is unmetered when roaming for sub-6 frequencies
3938      * NR_NSA_MMWAVE - NR NSA is unmetered when roaming for mmwave frequencies
3939      * NR_SA - NR SA is unmetered when roaming for sub-6 frequencies
3940      * NR_SA_MMWAVE - NR SA is unmetered when roaming for mmwave frequencies
3941      *
3942      * Note that this config only applies if an unmetered SubscriptionPlan is set via {@link
3943      * SubscriptionManager#setSubscriptionPlans(int, List, long)} or an unmetered override is set
3944      * via {@link SubscriptionManager#setSubscriptionOverrideUnmetered(int, boolean, int[], long)}
3945      * or {@link SubscriptionManager#setSubscriptionOverrideUnmetered(int, boolean, long)}.
3946      * If neither SubscriptionPlans nor an override are set, then no network types can be unmetered
3947      * when roaming regardless of the value of this config.
3948      * @hide
3949      */
3950     public static final String KEY_ROAMING_UNMETERED_NETWORK_TYPES_STRING_ARRAY =
3951             "roaming_unmetered_network_types_string_array";
3952 
3953     /**
3954      * Support ASCII 7-BIT encoding for long SMS. This carrier config is used to enable
3955      * this feature.
3956      * @hide
3957      */
3958     public static final String KEY_ASCII_7_BIT_SUPPORT_FOR_LONG_MESSAGE_BOOL =
3959             "ascii_7_bit_support_for_long_message_bool";
3960 
3961     /**
3962      * Controls whether to show wifi calling icon in statusbar when wifi calling is available.
3963      * @hide
3964      */
3965     public static final String KEY_SHOW_WIFI_CALLING_ICON_IN_STATUS_BAR_BOOL =
3966             "show_wifi_calling_icon_in_status_bar_bool";
3967 
3968     /**
3969      * Configuration to indicate that the carrier supports opportunistic data
3970      * auto provisioning. Based on this flag, the device downloads and activates
3971      * corresponding opportunistic profile.
3972      */
3973     public static final String KEY_CARRIER_SUPPORTS_OPP_DATA_AUTO_PROVISIONING_BOOL =
3974             "carrier_supports_opp_data_auto_provisioning_bool";
3975 
3976     /**
3977      * SMDP+ server address for downloading opportunistic eSIM profile.
3978      * FQDN (Fully Qualified Domain Name) of the SM-DP+ (e.g., smdp.gsma.com) restricted to the
3979      * Alphanumeric mode character set defined in table 5 of ISO/IEC 18004 excluding '$'.
3980      */
3981     public static final String KEY_SMDP_SERVER_ADDRESS_STRING = "smdp_server_address_string";
3982 
3983     /**
3984      * This timer value is used in the eSIM Exponential Backoff download retry algorithm.
3985      * Value should be in seconds.
3986      * <OL>
3987      *     <LI>When the first download failure occurs, retry download after BACKOFF_TIMER_VALUE
3988      * seconds.</LI>
3989      *
3990      * <LI>If download fails again then, retry after either BACKOFF_TIMER_VALUE,
3991      * 2xBACKOFF_TIMER_VALUE, or 3xBACKOFF_TIMER_VALUE seconds.</LI>
3992      *
3993      * <LI>In general after the cth failed attempt, retry after k * BACKOFF_TIMER_VALUE
3994      * seconds, where k is a random integer between 1 and 2^c − 1. Max c value is
3995      * {@link #KEY_ESIM_MAX_DOWNLOAD_RETRY_ATTEMPTS_INT}</LI>
3996      * </OL>
3997      */
3998     public static final String KEY_ESIM_DOWNLOAD_RETRY_BACKOFF_TIMER_SEC_INT =
3999             "esim_download_retry_backoff_timer_sec_int";
4000 
4001     /**
4002      * If eSIM profile download fails then, the number of retry attempts by UE
4003      * will be based on this configuration. If download still fails even after the
4004      * MAX attempts configured by this item then the retry is postponed until next
4005      * device bootup.
4006      */
4007     public static final String KEY_ESIM_MAX_DOWNLOAD_RETRY_ATTEMPTS_INT =
4008             "esim_max_download_retry_attempts_int";
4009 
4010     /**
4011      * List of opportunistic carrier-ids associated with CBRS Primary SIM. When CBRS pSIM is
4012      * inserted, opportunistic eSIM is download and this configuration is used for grouping pSIM
4013      * and opportunistic eSIM. Also when a new CBRS pSIM is inserted, old opportunistic eSIMs are
4014      * deleted using the carrier-ids in this configuration.
4015      *
4016      * @hide
4017      */
4018     public static final String KEY_OPPORTUNISTIC_CARRIER_IDS_INT_ARRAY =
4019             "opportunistic_carrier_ids_int_array";
4020 
4021     /**
4022      * Boolean configuration to control auto provisioning eSIM download in
4023      * OpportunisticNetworkService using only WiFi or both WiFi/Data.
4024      * True will download esim only via WiFi.
4025      * False will use both WiFi and Data connection.
4026      *
4027      * @hide
4028      */
4029     public static final String KEY_OPPORTUNISTIC_ESIM_DOWNLOAD_VIA_WIFI_ONLY_BOOL =
4030             "opportunistic_esim_download_via_wifi_only_bool";
4031 
4032     /**
4033      * Controls RSRP threshold, in dBm, at which OpportunisticNetworkService will decide whether
4034      * the opportunistic network is good enough for internet data.
4035      *
4036      * <p>The value of {@link CellSignalStrengthLte#getRsrp()} will be compared with this
4037      * threshold.
4038      */
4039     public static final String KEY_OPPORTUNISTIC_NETWORK_ENTRY_THRESHOLD_RSRP_INT =
4040             "opportunistic_network_entry_threshold_rsrp_int";
4041 
4042     /**
4043      * Controls RSSNR threshold, in dB, at which OpportunisticNetworkService will
4044      * decide whether the opportunistic network is good enough for internet data.
4045      *
4046      * <p>The value of {@link CellSignalStrengthLte#getRssnr()} will be compared with this
4047      * threshold.
4048      */
4049     public static final String KEY_OPPORTUNISTIC_NETWORK_ENTRY_THRESHOLD_RSSNR_INT =
4050             "opportunistic_network_entry_threshold_rssnr_int";
4051 
4052     /**
4053      * Controls RSRP threshold, in dBm, below which OpportunisticNetworkService will decide whether
4054      * the opportunistic network available is not good enough for internet data.
4055      *
4056      * <p>The value of {@link CellSignalStrengthLte#getRsrp()} will be compared with this
4057      * threshold.
4058      */
4059     public static final String KEY_OPPORTUNISTIC_NETWORK_EXIT_THRESHOLD_RSRP_INT =
4060             "opportunistic_network_exit_threshold_rsrp_int";
4061 
4062     /**
4063      * Controls RSSNR threshold, in dB, below which OpportunisticNetworkService will
4064      * decide whether the opportunistic network available is not good enough for internet data.
4065      *
4066      * <p>The value of {@link CellSignalStrengthLte#getRssnr()} will be compared with this
4067      * threshold.
4068      */
4069     public static final String KEY_OPPORTUNISTIC_NETWORK_EXIT_THRESHOLD_RSSNR_INT =
4070             "opportunistic_network_exit_threshold_rssnr_int";
4071 
4072     /**
4073      * Controls bandwidth threshold in Kbps at which OpportunisticNetworkService will decide whether
4074      * the opportunistic network is good enough for internet data.
4075      */
4076     public static final String KEY_OPPORTUNISTIC_NETWORK_ENTRY_THRESHOLD_BANDWIDTH_INT =
4077             "opportunistic_network_entry_threshold_bandwidth_int";
4078 
4079     /**
4080      * Controls hysteresis time in milli seconds for which OpportunisticNetworkService
4081      * will wait before attaching to a network.
4082      */
4083     public static final String KEY_OPPORTUNISTIC_NETWORK_ENTRY_OR_EXIT_HYSTERESIS_TIME_LONG =
4084             "opportunistic_network_entry_or_exit_hysteresis_time_long";
4085 
4086     /**
4087      * Controls hysteresis time in milli seconds for which OpportunisticNetworkService
4088      * will wait before switching data to an opportunistic network.
4089      */
4090     public static final String KEY_OPPORTUNISTIC_NETWORK_DATA_SWITCH_HYSTERESIS_TIME_LONG =
4091             "opportunistic_network_data_switch_hysteresis_time_long";
4092 
4093     /**
4094      * Controls hysteresis time in milli seconds for which OpportunisticNetworkService
4095      * will wait before switching data from opportunistic network to primary network.
4096      */
4097     public static final String KEY_OPPORTUNISTIC_NETWORK_DATA_SWITCH_EXIT_HYSTERESIS_TIME_LONG =
4098             "opportunistic_network_data_switch_exit_hysteresis_time_long";
4099 
4100     /**
4101      * Controls whether to do ping test before switching data to opportunistic network.
4102      * This carrier config is used to disable this feature.
4103      */
4104     public static final String KEY_PING_TEST_BEFORE_DATA_SWITCH_BOOL =
4105             "ping_test_before_data_switch_bool";
4106 
4107     /**
4108      * Controls whether to switch data to primary from opportunistic subscription
4109      * if primary is out of service. This control only affects system or 1st party app
4110      * initiated data switch, but will not override data switch initiated by privileged carrier apps
4111      * This carrier config is used to disable this feature.
4112      */
4113     public static final String KEY_SWITCH_DATA_TO_PRIMARY_IF_PRIMARY_IS_OOS_BOOL =
4114             "switch_data_to_primary_if_primary_is_oos_bool";
4115 
4116     /**
4117      * Controls the ping pong determination of opportunistic network.
4118      * If opportunistic network is determined as out of service or below
4119      * #KEY_OPPORTUNISTIC_NETWORK_EXIT_THRESHOLD_RSRP_INT or
4120      * #KEY_OPPORTUNISTIC_NETWORK_EXIT_THRESHOLD_RSSNR_INT within
4121      * #KEY_OPPORTUNISTIC_NETWORK_PING_PONG_TIME_LONG of switching to opportunistic network,
4122      * it will be determined as ping pong situation by system app or 1st party app.
4123      */
4124     public static final String KEY_OPPORTUNISTIC_NETWORK_PING_PONG_TIME_LONG =
4125             "opportunistic_network_ping_pong_time_long";
4126 
4127     /**
4128      * Controls back off time in milli seconds for switching back to
4129      * opportunistic subscription. This time will be added to
4130      * {@link CarrierConfigManager#KEY_OPPORTUNISTIC_NETWORK_DATA_SWITCH_HYSTERESIS_TIME_LONG} to
4131      * determine hysteresis time if there is ping pong situation
4132      * (determined by system app or 1st party app) between primary and opportunistic
4133      * subscription. Ping ping situation is defined in
4134      * #KEY_OPPORTUNISTIC_NETWORK_PING_PONG_TIME_LONG.
4135      * If ping pong situation continuous #KEY_OPPORTUNISTIC_NETWORK_BACKOFF_TIME_LONG
4136      * will be added to previously determined hysteresis time.
4137      */
4138     public static final String KEY_OPPORTUNISTIC_NETWORK_BACKOFF_TIME_LONG =
4139             "opportunistic_network_backoff_time_long";
4140 
4141     /**
4142      * Controls the max back off time in milli seconds for switching back to
4143      * opportunistic subscription.
4144      * This time will be the max hysteresis that can be determined irrespective of there is
4145      * continuous ping pong situation or not as described in
4146      * #KEY_OPPORTUNISTIC_NETWORK_PING_PONG_TIME_LONG and
4147      * #KEY_OPPORTUNISTIC_NETWORK_BACKOFF_TIME_LONG.
4148      */
4149     public static final String KEY_OPPORTUNISTIC_NETWORK_MAX_BACKOFF_TIME_LONG =
4150             "opportunistic_network_max_backoff_time_long";
4151 
4152     /** @hide */
4153     public static class OpportunisticNetwork {
4154         /**
4155          * Prefix of all {@code OpportunisticNetwork.KEY_*} constants.
4156          *
4157          * @hide
4158          */
4159         public static final String PREFIX = "opportunistic.";
4160 
4161         /**
4162          * Controls SS-RSRP threshold in dBm at which 5G opportunistic network will be considered
4163          * good enough for internet data. Note other factors may be considered for the final
4164          * decision.
4165          *
4166          * <p>The value of {@link CellSignalStrengthNr#getSsRsrp()} will be compared with this
4167          * threshold.
4168          *
4169          * @hide
4170          */
4171         public static final String KEY_ENTRY_THRESHOLD_SS_RSRP_INT =
4172                 PREFIX + "entry_threshold_ss_rsrp_int";
4173 
4174         /**
4175          * Similar to {@link #KEY_ENTRY_THRESHOLD_SS_RSRP_INT} but supports different
4176          * thresholds for different 5G bands. For bands not specified here, the threshold
4177          * will be {@link #KEY_ENTRY_THRESHOLD_SS_RSRP_INT}.
4178          *
4179          * <p>For each key-value in the bundle: the key is the band number in string, which
4180          * shall be a decimal integer as defined in {@code NgranBands.BAND_*} constants;
4181          * the value is the threshold in int.
4182          *
4183          * @hide
4184          */
4185         public static final String KEY_ENTRY_THRESHOLD_SS_RSRP_INT_BUNDLE =
4186                 PREFIX + "entry_threshold_ss_rsrp_int_bundle";
4187 
4188         /**
4189          * Controls SS-RSRQ threshold in dB at which 5G opportunistic network will be considered
4190          * good enough for internet data. Note other factors may be considered for the final
4191          * decision.
4192          *
4193          * <p>The value of {@link CellSignalStrengthNr#getSsRsrq()} will be compared with this
4194          * threshold.
4195          *
4196          * @hide
4197          */
4198         public static final String KEY_ENTRY_THRESHOLD_SS_RSRQ_DOUBLE =
4199                 PREFIX + "entry_threshold_ss_rsrq_double";
4200 
4201         /**
4202          * Similar to {@link #KEY_ENTRY_THRESHOLD_SS_RSRQ_DOUBLE} but supports different
4203          * thresholds for different 5G bands. For bands not specified here, the threshold
4204          * will be {@link #KEY_ENTRY_THRESHOLD_SS_RSRQ_DOUBLE}.
4205          *
4206          * <p>For each key-value in the bundle: the key is the band number in string, which
4207          * shall be a decimal integer as defined in {@code NgranBands.BAND_*} constants;
4208          * the value is the threshold in double.
4209          *
4210          * @hide
4211          */
4212         public static final String KEY_ENTRY_THRESHOLD_SS_RSRQ_DOUBLE_BUNDLE =
4213                 PREFIX + "entry_threshold_ss_rsrq_double_bundle";
4214 
4215         /**
4216          * Controls SS-RSRP threshold in dBm below which 5G opportunistic network available will not
4217          * be considered good enough for internet data. Note other factors may be considered
4218          * for the final decision.
4219          *
4220          * <p>The value of {@link CellSignalStrengthNr#getSsRsrp()} will be compared with this
4221          * threshold.
4222          *
4223          * @hide
4224          */
4225         public static final String KEY_EXIT_THRESHOLD_SS_RSRP_INT =
4226                 PREFIX + "exit_threshold_ss_rsrp_int";
4227 
4228         /**
4229          * Similar to {@link #KEY_EXIT_THRESHOLD_SS_RSRP_INT} but supports different
4230          * thresholds for different 5G bands. For bands not specified here, the threshold
4231          * will be {@link #KEY_EXIT_THRESHOLD_SS_RSRP_INT}.
4232          *
4233          * <p>The syntax of its value is similar to
4234          * {@link #KEY_ENTRY_THRESHOLD_SS_RSRP_INT_BUNDLE}.
4235          *
4236          * @hide
4237          */
4238         public static final String KEY_EXIT_THRESHOLD_SS_RSRP_INT_BUNDLE =
4239                 PREFIX + "exit_threshold_ss_rsrp_int_bundle";
4240 
4241         /**
4242          * Controls SS-RSRQ threshold in dB below which 5G opportunistic network available will not
4243          * be considered good enough for internet data. Note other factors may be considered
4244          * for the final decision.
4245          *
4246          * <p>The value of {@link CellSignalStrengthNr#getSsRsrq()} will be compared with this
4247          * threshold.
4248          *
4249          * @hide
4250          */
4251         public static final String KEY_EXIT_THRESHOLD_SS_RSRQ_DOUBLE =
4252                 PREFIX + "exit_threshold_ss_rsrq_double";
4253 
4254         /**
4255          * Similar to {@link #KEY_EXIT_THRESHOLD_SS_RSRQ_DOUBLE} but supports different
4256          * thresholds for different 5G bands. For bands not specified here, the threshold
4257          * will be {@link #KEY_EXIT_THRESHOLD_SS_RSRQ_DOUBLE}.
4258          *
4259          * <p>The syntax of its value is similar to
4260          * {@link #KEY_ENTRY_THRESHOLD_SS_RSRQ_DOUBLE_BUNDLE}.
4261          *
4262          * @hide
4263          */
4264         public static final String KEY_EXIT_THRESHOLD_SS_RSRQ_DOUBLE_BUNDLE =
4265                 PREFIX + "exit_threshold_ss_rsrq_double_bundle";
4266 
4267         /**
4268          * Controls hysteresis time in milliseconds for which will be waited before switching
4269          * data to a 5G opportunistic network.
4270          *
4271          * @hide
4272          */
4273         public static final String KEY_5G_DATA_SWITCH_HYSTERESIS_TIME_LONG =
4274                 PREFIX + "5g_data_switch_hysteresis_time_long";
4275 
4276         /**
4277          * Similar to {@link #KEY_5G_DATA_SWITCH_HYSTERESIS_TIME_LONG} but supports
4278          * different values for different 5G bands. For bands not specified here, the threshold
4279          * will be {@link #KEY_5G_DATA_SWITCH_HYSTERESIS_TIME_LONG}.
4280          *
4281          * <p>For each key-value in the bundle: the key is the band number in string, which
4282          * shall be a decimal integer as defined in {@code NgranBands.BAND_*} constants;
4283          * the value is the time in long.
4284          *
4285          * @hide
4286          */
4287         public static final String KEY_5G_DATA_SWITCH_HYSTERESIS_TIME_LONG_BUNDLE =
4288                 PREFIX + "5g_data_switch_hysteresis_time_long_bundle";
4289 
4290         /**
4291          * Controls hysteresis time in milliseconds for which will be waited before switching from
4292          * 5G opportunistic network to primary network.
4293          *
4294          * @hide
4295          */
4296         public static final String KEY_5G_DATA_SWITCH_EXIT_HYSTERESIS_TIME_LONG =
4297                 PREFIX + "5g_data_switch_exit_hysteresis_time_long";
4298 
4299         /**
4300          * Similar to {@link #KEY_5G_DATA_SWITCH_EXIT_HYSTERESIS_TIME_LONG} but supports
4301          * different values for different 5G bands. For bands not specified here, the threshold
4302          * will be {@link #KEY_5G_DATA_SWITCH_EXIT_HYSTERESIS_TIME_LONG}.
4303          *
4304          * <p>The syntax is similar to
4305          * {@link KEY_5G_DATA_SWITCH_HYSTERESIS_TIME_LONG_BUNDLE}.
4306          *
4307          * @hide
4308          */
4309         public static final String KEY_5G_DATA_SWITCH_EXIT_HYSTERESIS_TIME_LONG_BUNDLE =
4310                 PREFIX + "5g_data_switch_exit_hysteresis_time_long_bundle";
4311 
4312         /**
4313          * Controls back off time in milliseconds for switching back to
4314          * 5G opportunistic subscription. This time will be added to
4315          * {@link #KEY_5G_DATA_SWITCH_HYSTERESIS_TIME_LONG} to
4316          * determine hysteresis time if there is ping pong situation
4317          * (determined by system app or 1st party app) between primary and 5G opportunistic
4318          * subscription. Ping ping situation is defined in
4319          * {@link #KEY_5G_PING_PONG_TIME_LONG}.
4320          * If ping pong situation continuous {@link #KEY_5G_NETWORK_BACKOFF_TIME_LONG}
4321          * will be added to previously determined hysteresis time.
4322          *
4323          * @hide
4324          */
4325         public static final String KEY_5G_BACKOFF_TIME_LONG =
4326                 PREFIX + "5g_backoff_time_long";
4327 
4328         /**
4329          * Controls the max back off time in milliseconds for switching back to
4330          * 5G opportunistic subscription.
4331          * This time will be the max hysteresis that can be determined irrespective of there is
4332          * continuous ping pong situation or not as described in
4333          * {@link #KEY_5G_PING_PONG_TIME_LONG} and
4334          * {@link #KEY_5G_BACKOFF_TIME_LONG}.
4335          *
4336          * @hide
4337          */
4338         public static final String KEY_5G_MAX_BACKOFF_TIME_LONG =
4339                 PREFIX + "5g_max_backoff_time_long";
4340 
4341         /**
4342          * Controls the ping pong determination of 5G opportunistic network.
4343          * If opportunistic network is determined as out of service or below
4344          * {@link #KEY_EXIT_THRESHOLD_SS_RSRP_INT} or
4345          * {@link #KEY_EXIT_THRESHOLD_SS_RSRQ_DOUBLE} within
4346          * the time specified by this carrier config of switching to opportunistic network,
4347          * it will be determined as ping pong situation by system app or 1st party app.
4348          *
4349          * @hide
4350          */
4351         public static final String KEY_5G_PING_PONG_TIME_LONG =
4352                 PREFIX + "5g_ping_pong_time_long";
4353 
getDefaults()4354         private static PersistableBundle getDefaults() {
4355             PersistableBundle defaults = new PersistableBundle();
4356             // Default value is -111 dBm for all bands.
4357             sDefaults.putInt(KEY_ENTRY_THRESHOLD_SS_RSRP_INT, -111);
4358             sDefaults.putPersistableBundle(KEY_ENTRY_THRESHOLD_SS_RSRP_INT_BUNDLE,
4359                                            PersistableBundle.EMPTY);
4360             // Default value is -18.5 dB for all bands.
4361             sDefaults.putDouble(KEY_ENTRY_THRESHOLD_SS_RSRQ_DOUBLE, -18.5);
4362             sDefaults.putPersistableBundle(
4363                     KEY_ENTRY_THRESHOLD_SS_RSRQ_DOUBLE_BUNDLE,
4364                     PersistableBundle.EMPTY);
4365             // Default value is -120 dBm for all bands.
4366             sDefaults.putInt(KEY_EXIT_THRESHOLD_SS_RSRP_INT, -120);
4367             sDefaults.putPersistableBundle(KEY_EXIT_THRESHOLD_SS_RSRP_INT_BUNDLE,
4368                                            PersistableBundle.EMPTY);
4369             // Default value is -18.5 dB for all bands.
4370             sDefaults.putDouble(KEY_EXIT_THRESHOLD_SS_RSRQ_DOUBLE, -18.5);
4371             sDefaults.putPersistableBundle(
4372                     KEY_EXIT_THRESHOLD_SS_RSRQ_DOUBLE_BUNDLE,
4373                     PersistableBundle.EMPTY);
4374             // Default value is 2 seconds for all bands.
4375             defaults.putLong(KEY_5G_DATA_SWITCH_HYSTERESIS_TIME_LONG, 2000);
4376             defaults.putPersistableBundle(
4377                     KEY_5G_DATA_SWITCH_HYSTERESIS_TIME_LONG_BUNDLE,
4378                     PersistableBundle.EMPTY);
4379             // Default value is 2 seconds for all bands.
4380             defaults.putLong(KEY_5G_DATA_SWITCH_EXIT_HYSTERESIS_TIME_LONG, 2000);
4381             defaults.putPersistableBundle(
4382                     KEY_5G_DATA_SWITCH_EXIT_HYSTERESIS_TIME_LONG_BUNDLE,
4383                     PersistableBundle.EMPTY);
4384             // Default value is 10 seconds.
4385             sDefaults.putLong(KEY_5G_BACKOFF_TIME_LONG, 10000);
4386             // Default value is 60 seconds.
4387             sDefaults.putLong(KEY_5G_MAX_BACKOFF_TIME_LONG, 60000);
4388             // Default value is 60 seconds.
4389             sDefaults.putLong(KEY_5G_PING_PONG_TIME_LONG, 60000);
4390             return defaults;
4391         }
4392     }
4393 
4394     /**
4395      * Controls whether 4G opportunistic networks should be scanned for possible data switch.
4396      *
4397      * @hide
4398      */
4399     public static final String KEY_ENABLE_4G_OPPORTUNISTIC_NETWORK_SCAN_BOOL =
4400             "enabled_4g_opportunistic_network_scan_bool";
4401 
4402     /**
4403      * Only relevant when the device supports opportunistic networks but does not support
4404      * simultaneous 5G+5G. Controls how long, in milliseconds, to wait before opportunistic network
4405      * goes out of service before switching the 5G capability back to primary stack. The idea of
4406      * waiting a few seconds is to minimize the calling of the expensive capability switching
4407      * operation in the case where CBRS goes back into service shortly after going out of it.
4408      *
4409      * @hide
4410      */
4411     public static final String KEY_TIME_TO_SWITCH_BACK_TO_PRIMARY_IF_OPPORTUNISTIC_OOS_LONG =
4412             "time_to_switch_back_to_primary_if_opportunistic_oos_long";
4413 
4414     /**
4415      * Only relevant when the device supports opportunistic networks but does not support
4416      * simultaneous 5G+5G. Controls how long, in milliseconds, after 5G capability has switched back
4417      * to primary stack due to opportunistic network being OOS. The idea is to minimizing the
4418      * 'ping-ponging' effect where device is constantly witching capability back and forth between
4419      * primary and opportunistic stack.
4420      *
4421      * @hide
4422      */
4423     public static final String
4424             KEY_OPPORTUNISTIC_TIME_TO_SCAN_AFTER_CAPABILITY_SWITCH_TO_PRIMARY_LONG =
4425             "opportunistic_time_to_scan_after_capability_switch_to_primary_long";
4426 
4427     /**
4428      * Indicates zero or more emergency number prefix(es), because some carrier requires
4429      * if users dial an emergency number address with a specific prefix, the combination of the
4430      * prefix and the address is also a valid emergency number to dial. For example, an emergency
4431      * number prefix is 318, and the emergency number is 911. Both 318911 and 911 can be dialed by
4432      * users for emergency call. An empty array of string indicates that current carrier does not
4433      * have this requirement.
4434      */
4435     public static final String KEY_EMERGENCY_NUMBER_PREFIX_STRING_ARRAY =
4436             "emergency_number_prefix_string_array";
4437 
4438     /**
4439      * Indicates whether carrier treats "*67" or "*82" as a temporary mode CLIR.
4440      * @hide
4441      */
4442     public static final String KEY_CARRIER_SUPPORTS_CALLER_ID_VERTICAL_SERVICE_CODES_BOOL =
4443             "carrier_supports_caller_id_vertical_service_codes_bool";
4444 
4445     /**
4446      * Smart forwarding config. Smart forwarding is a feature to configure call forwarding to a
4447      * different SIM in the device when one SIM is not reachable. The config here specifies a smart
4448      * forwarding component that will launch UI for changing the configuration. An empty string
4449      * indicates that no smart forwarding component is specified.
4450      *
4451      * Currently, only one non-empty configuration of smart forwarding component within system will
4452      * be used when multiple SIMs are inserted.
4453      *
4454      * Empty string by default.
4455      *
4456      * @hide
4457      */
4458     public static final String KEY_SMART_FORWARDING_CONFIG_COMPONENT_NAME_STRING =
4459             "smart_forwarding_config_component_name_string";
4460 
4461     /**
4462      * Indicates when a carrier has a primary subscription and an opportunistic subscription active,
4463      * and when Internet data is switched to opportunistic network, whether to still show
4464      * signal bar of primary network. By default it will be false, meaning whenever data
4465      * is going over opportunistic network, signal bar will reflect signal strength and rat
4466      * icon of that network.
4467      */
4468     public static final String KEY_ALWAYS_SHOW_PRIMARY_SIGNAL_BAR_IN_OPPORTUNISTIC_NETWORK_BOOLEAN =
4469             "always_show_primary_signal_bar_in_opportunistic_network_boolean";
4470 
4471     /**
4472      * Upon data switching between subscriptions within a carrier group, if switch depends on
4473      * validation result, this value defines customized value of how long we wait for validation
4474      * success before we fail and revoke the switch.
4475      * Time out is in milliseconds.
4476      */
4477     public static final String KEY_DATA_SWITCH_VALIDATION_TIMEOUT_LONG =
4478             "data_switch_validation_timeout_long";
4479 
4480     /**
4481      * The minimum timeout of UDP port 4500 NAT / firewall entries on the Internet PDN of this
4482      * carrier network. This will be used by Android platform VPNs to tune IPsec NAT keepalive
4483      * interval. If this value is too low to provide uninterrupted inbound connectivity, then
4484      * Android system VPNs may indicate to applications that the VPN cannot support long-lived
4485      * TCP connections.
4486      * @hide
4487      */
4488     @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
4489     public static final String KEY_MIN_UDP_PORT_4500_NAT_TIMEOUT_SEC_INT =
4490             "min_udp_port_4500_nat_timeout_sec_int";
4491 
4492     /**
4493      * The preferred IKE protocol for ESP packets.
4494      *
4495      * This will be used by Android platform VPNs to select preferred encapsulation type and IP
4496      * protocol type. The possible customization values are:
4497      *
4498      * AUTO IP VERSION and ENCAPSULATION TYPE SELECTION : "0"
4499      * IPv4 UDP                                         : "40"
4500      * IPv6 ESP                                         : "61"
4501      *
4502      * See the {@code PREFERRED_IKE_PROTOCOL_} constants in
4503      * {@link com.android.server.connectivity.Vpn}.
4504      * @hide
4505      */
4506     public static final String KEY_PREFERRED_IKE_PROTOCOL_INT = "preferred_ike_protocol_int";
4507 
4508     /**
4509      * Specifies whether the system should prefix the EAP method to the anonymous identity.
4510      * The following prefix will be added if this key is set to TRUE:
4511      *   EAP-AKA: "0"
4512      *   EAP-SIM: "1"
4513      *   EAP-AKA_PRIME: "6"
4514      */
4515     public static final String ENABLE_EAP_METHOD_PREFIX_BOOL = "enable_eap_method_prefix_bool";
4516 
4517     /**
4518      * Indicates that GBA_ME should be used for GBA authentication, as defined in 3GPP TS 33.220.
4519      * @hide
4520      */
4521     @SystemApi
4522     public static final int GBA_ME = 1;
4523 
4524     /**
4525      * Indicates that GBA_U should be used for GBA authentication, as defined in 3GPP TS 33.220.
4526      * @hide
4527      */
4528     @SystemApi
4529     public static final int GBA_U = 2;
4530 
4531     /**
4532      * Indicates that GBA_Digest should be used for GBA authentication, as defined
4533      * in 3GPP TS 33.220.
4534      * @hide
4535      */
4536     @SystemApi
4537     public static final int GBA_DIGEST = 3;
4538 
4539     /**
4540      * An integer representing the GBA mode to use for requesting credentials
4541      * via {@link TelephonyManager#bootstrapAuthenticationRequest}.
4542      *
4543      * One of {@link #GBA_ME}, {@link #GBA_U}, or {@link #GBA_DIGEST}.
4544      * @hide
4545      */
4546     @SystemApi
4547     public static final String KEY_GBA_MODE_INT = "gba_mode_int";
4548 
4549     /**
4550      * An integer representing the organization code to be used when building the
4551      * {@link UaSecurityProtocolIdentifier} used when requesting GBA authentication.
4552      *
4553      * See the {@code ORG_} constants in {@link UaSecurityProtocolIdentifier}.
4554      * @hide
4555      */
4556     @SystemApi
4557     public static final String KEY_GBA_UA_SECURITY_ORGANIZATION_INT =
4558             "gba_ua_security_organization_int";
4559 
4560     /**
4561      * An integer representing the security protocol to be used when building the
4562      * {@link UaSecurityProtocolIdentifier} used when requesting GBA authentication.
4563      *
4564      * See the {@code UA_SECURITY_PROTOCOL_} constants in {@link UaSecurityProtocolIdentifier}.
4565      * @hide
4566      */
4567     @SystemApi
4568     public static final String KEY_GBA_UA_SECURITY_PROTOCOL_INT = "gba_ua_security_protocol_int";
4569 
4570     /**
4571      * An integer representing the cipher suite to be used when building the
4572      * {@link UaSecurityProtocolIdentifier} used when requesting GBA authentication.
4573      *
4574      * See the {@code TLS_} constants in {@link android.telephony.gba.TlsParams}.
4575      * @hide
4576      */
4577     @SystemApi
4578     public static final String KEY_GBA_UA_TLS_CIPHER_SUITE_INT = "gba_ua_tls_cipher_suite_int";
4579 
4580     /**
4581      * The data stall recovery timers array in milliseconds, each element is the delay before
4582      * performining next recovery action.
4583      *
4584      * The default value of timers array are: [180000ms, 180000ms, 180000ms, 180000ms] (3 minutes)
4585      * Array[0]: It's the timer between RECOVERY_ACTION GET_DATA_CALL_LIST and CLEANUP, if data
4586      * stall symptom still occurred, it will perform next recovery action after 180000ms.
4587      * Array[1]: It's the timer between RECOVERY_ACTION CLEANUP and RE-REGISTER, if data stall
4588      * symptom still occurred, it will perform next recovery action after 180000ms.
4589      * Array[2]: It's the timer between RECOVERY_ACTION RE-REGISTER and RADIO_RESTART, if data stall
4590      * symptom still occurred, it will perform next recovery action after 180000ms.
4591      * Array[3]: It's the timer between RECOVERY_ACTION RADIO_RESTART and RESET_MODEM, if data stall
4592      * symptom still occurred, it will perform next recovery action after 180000ms.
4593      *
4594      * See the {@code RECOVERY_ACTION_*} constants in
4595      * {@link com.android.internal.telephony.data.DataStallRecoveryManager}
4596      * @hide
4597      */
4598     public static final String KEY_DATA_STALL_RECOVERY_TIMERS_LONG_ARRAY =
4599             "data_stall_recovery_timers_long_array";
4600 
4601     /**
4602      * The data stall recovery action boolean array, we use this array to determine if the
4603      * data stall recovery action needs to be skipped.
4604      *
4605      * For example, if the carrier use the same APN for both of IA and default type,
4606      * the data call will not disconnect in modem side (so the RECOVERY_ACTION_CLEANUP
4607      * did not effect). In this case, we can config the boolean variable of action
4608      * RECOVERY_ACTION_CLEANUP to true, then it can be ignored to speed up the recovery
4609      * action procedure.
4610      *
4611      * The default value of boolean array are: [false, false, true, false, false]
4612      * Array[0]: When performing the recovery action, we can use this boolean value to determine
4613      * if we need to perform RECOVERY_ACTION_GET_DATA_CALL_LIST.
4614      * Array[1]: If data stall symptom still occurred, we can use this boolean value to determine
4615      * if we need to perform RECOVERY_ACTION_CLEANUP. For example, if the carrier use the same APN
4616      * for both of IA and default type, the data call will not disconnect in modem side
4617      * (so the RECOVERY_ACTION_CLEANUP did not effect). In this case, we can config the boolean
4618      * variable of action RECOVERY_ACTION_CLEANUP to true, then it can be ignored to speed up the
4619      * recovery action procedure.
4620      * Array[2]: If data stall symptom still occurred, we can use this boolean value to determine
4621      * if we need to perform RE-REGISTER.
4622      * Array[3]: If data stall symptom still occurred, we can use this boolean value to determine
4623      * if we need to perform RECOVERY_ACTION_RADIO_RESTART.
4624      * Array[4]: If data stall symptom still occurred, we can use this boolean value to determine
4625      * if we need to perform RECOVERY_ACTION_MODEM_RESET.
4626      *
4627      * See the {@code RECOVERY_ACTION_*} constants in
4628      * {@link com.android.internal.telephony.data.DataStallRecoveryManager}
4629      * @hide
4630      */
4631     public static final String KEY_DATA_STALL_RECOVERY_SHOULD_SKIP_BOOL_ARRAY =
4632             "data_stall_recovery_should_skip_bool_array";
4633 
4634     /**
4635      * String array containing the list of names for service numbers provided by carriers. This key
4636      * should be used with {@link #KEY_CARRIER_SERVICE_NUMBER_STRING_ARRAY}. The names provided in
4637      * this array will be mapped 1:1 with the numbers provided in the {@link
4638      * #KEY_CARRIER_SERVICE_NUMBER_STRING_ARRAY} array.
4639      *
4640      * <p>The data would be considered valid if and only if:
4641      *
4642      * <ul>
4643      *   <li>The number of items in both the arrays are equal
4644      *   <li>The data added to the {@link #KEY_CARRIER_SERVICE_NUMBER_STRING_ARRAY} array is valid.
4645      *       See {@link #KEY_CARRIER_SERVICE_NUMBER_STRING_ARRAY} for more information.
4646      * </ul>
4647      *
4648      * <p>Example:
4649      *
4650      * <pre><code>
4651      * <string-array name="carrier_service_name_array" num="2">
4652      *   <item value="Police"/>
4653      *   <item value="Ambulance"/>
4654      * </string-array>
4655      * </code></pre>
4656      */
4657     public static final String KEY_CARRIER_SERVICE_NAME_STRING_ARRAY = "carrier_service_name_array";
4658 
4659     /**
4660      * String array containing the list of service numbers provided by carriers. This key should be
4661      * used with {@link #KEY_CARRIER_SERVICE_NAME_STRING_ARRAY}. The numbers provided in this array
4662      * will be mapped 1:1 with the names provided in the {@link
4663      * #KEY_CARRIER_SERVICE_NAME_STRING_ARRAY} array.
4664      *
4665      * <p>The data would be considered valid if and only if:
4666      *
4667      * <ul>
4668      *   <li>The number of items in both the arrays are equal
4669      *   <li>The item added in this key follows a specific format. Either it should be all numbers,
4670      *       or "+" followed by all numbers.
4671      * </ul>
4672      *
4673      * <p>Example:
4674      *
4675      * <pre><code>
4676      * <string-array name="carrier_service_number_array" num="2">
4677      *   <item value="123"/>
4678      *   <item value="+343"/>
4679      * </string-array>
4680      * </code></pre>
4681      */
4682     public static final String KEY_CARRIER_SERVICE_NUMBER_STRING_ARRAY =
4683         "carrier_service_number_array";
4684 
4685     /**
4686      * Configs used by ImsServiceEntitlement.
4687      */
4688     public static final class ImsServiceEntitlement {
ImsServiceEntitlement()4689         private ImsServiceEntitlement() {}
4690 
4691         /** Prefix of all ImsServiceEntitlement.KEY_* constants. */
4692         public static final String KEY_PREFIX = "imsserviceentitlement.";
4693 
4694         /**
4695          * The address of the entitlement configuration server.
4696          *
4697          * Reference: GSMA TS.43-v5, section 2.1 Default Entitlement Configuration Server.
4698          */
4699         public static final String KEY_ENTITLEMENT_SERVER_URL_STRING =
4700                 KEY_PREFIX + "entitlement_server_url_string";
4701 
4702         /**
4703          * For some carriers, end-users may be presented with a web portal of the carrier before
4704          * being allowed to use the VoWiFi service.
4705          * To support this feature, the app hosts a {@link android.webkit.WebView} in the foreground
4706          * VoWiFi entitlement configuration flow to show the web portal.
4707          *
4708          * {@code true} - show the VoWiFi portal in a webview.
4709          *
4710          * Note: this is effective only if the {@link #KEY_WFC_EMERGENCY_ADDRESS_CARRIER_APP_STRING}
4711          * is set to this app.
4712          *
4713          * Reference: GSMA TS.43-v5, section 3, VoWiFi entitlement configuration.
4714          */
4715         public static final String KEY_SHOW_VOWIFI_WEBVIEW_BOOL =
4716                 KEY_PREFIX + "show_vowifi_webview_bool";
4717 
4718         /**
4719          * For some carriers, the network is not provisioned by default to support
4720          * IMS (VoLTE/VoWiFi/SMSoIP) service for all end users. Some type of network-side
4721          * provisioning must then take place before offering the IMS service to the end-user.
4722          *
4723          * {@code true} - need this ImsServiceEntitlement app to do IMS (VoLTE/VoWiFi/SMSoIP)
4724          * provisioning in the background before offering the IMS service to the end-user.
4725          *
4726          * Note: this is effective only if the carrier needs IMS provisioning, i.e.
4727          * {@link #KEY_CARRIER_VOLTE_PROVISIONING_REQUIRED_BOOL} is set to true.
4728          *
4729          * Reference: GSMA TS.43-v5, section 3 - 5, VoWiFi/VoLTE/SMSoIP entitlement configuration.
4730          */
4731         public static final String KEY_IMS_PROVISIONING_BOOL = KEY_PREFIX + "ims_provisioning_bool";
4732 
4733         /**
4734          * The FCM sender ID for the carrier.
4735          * Used to trigger a carrier network requested entitlement configuration
4736          * via Firebase Cloud Messaging (FCM). Do not set if the carrier doesn't use FCM for network
4737          * requested entitlement configuration.
4738          *
4739          * Reference: GSMA TS.43-v5, section 2.4, Network Requested Entitlement Configuration.
4740          *
4741          * @see <a href="https://firebase.google.com/docs/cloud-messaging/concept-options#senderid">
4742          *     About FCM messages - Credentials</a>
4743          */
4744         public static final String KEY_FCM_SENDER_ID_STRING = KEY_PREFIX + "fcm_sender_id_string";
4745 
getDefaults()4746         private static PersistableBundle getDefaults() {
4747             PersistableBundle defaults = new PersistableBundle();
4748             defaults.putString(KEY_ENTITLEMENT_SERVER_URL_STRING, "");
4749             defaults.putString(KEY_FCM_SENDER_ID_STRING, "");
4750             defaults.putBoolean(KEY_SHOW_VOWIFI_WEBVIEW_BOOL, false);
4751             defaults.putBoolean(KEY_IMS_PROVISIONING_BOOL, false);
4752             return defaults;
4753         }
4754     }
4755 
4756     /**
4757      * GPS configs. See the GNSS HAL documentation for more details.
4758      */
4759     public static final class Gps {
Gps()4760         private Gps() {}
4761 
4762         /** Prefix of all Gps.KEY_* constants. */
4763         public static final String KEY_PREFIX = "gps.";
4764 
4765         /**
4766          * Location information during (and after) an emergency call is only provided over control
4767          * plane signaling from the network.
4768          * @hide
4769          */
4770         public static final int SUPL_EMERGENCY_MODE_TYPE_CP_ONLY = 0;
4771 
4772         /**
4773          * Location information during (and after) an emergency call is provided over the data
4774          * plane and serviced by the framework GNSS service, but if it fails, the carrier also
4775          * supports control plane backup signaling.
4776          * @hide
4777          */
4778         public static final int SUPL_EMERGENCY_MODE_TYPE_CP_FALLBACK = 1;
4779 
4780         /**
4781          * Location information during (and after) an emergency call is provided over the data plane
4782          * and serviced by the framework GNSS service only. There is no backup signalling over the
4783          * control plane if it fails.
4784          * @hide
4785          */
4786         public static final int SUPL_EMERGENCY_MODE_TYPE_DP_ONLY = 2;
4787 
4788         /**
4789          * Determine whether current lpp_mode used for E-911 needs to be kept persistently.
4790          * {@code false} - not keeping the lpp_mode means using default configuration of gps.conf
4791          *                 when sim is not presented.
4792          * {@code true}  - current lpp_profile of carrier will be kepted persistently
4793          *                 even after sim is removed. This is default.
4794          */
4795         public static final String KEY_PERSIST_LPP_MODE_BOOL = KEY_PREFIX + "persist_lpp_mode_bool";
4796 
4797         /**
4798          * SUPL server host for SET Initiated & non-ES Network-Initiated SUPL requests.
4799          * Default to supl.google.com
4800          * @hide
4801          */
4802         public static final String KEY_SUPL_HOST_STRING = KEY_PREFIX + "supl_host";
4803 
4804         /**
4805          * SUPL server port. Default to 7275.
4806          * @hide
4807          */
4808         public static final String KEY_SUPL_PORT_STRING = KEY_PREFIX + "supl_port";
4809 
4810         /**
4811          * The SUPL version requested by Carrier. This is a bit mask
4812          * with bits 0:7 representing a service indicator field, bits 8:15
4813          * representing the minor version and bits 16:23 representing the
4814          * major version. Default to 0x20000.
4815          * @hide
4816          */
4817         public static final String KEY_SUPL_VER_STRING = KEY_PREFIX + "supl_ver";
4818 
4819         /**
4820          * SUPL_MODE configuration bit mask
4821          * 1 - Mobile Station Based. This is default.
4822          * 2 - Mobile Station Assisted.
4823          * @hide
4824          */
4825         public static final String KEY_SUPL_MODE_STRING = KEY_PREFIX + "supl_mode";
4826 
4827         /**
4828          * Whether to limit responses to SUPL ES mode requests only during user emergency sessions
4829          * (e.g. E911), and SUPL non-ES requests to only outside of non user emergency sessions.
4830          * 0 - no.
4831          * 1 - yes. This is default.
4832          * @hide
4833          */
4834         public static final String KEY_SUPL_ES_STRING = KEY_PREFIX + "supl_es";
4835 
4836         /**
4837          * LTE Positioning Profile settings bit mask.
4838          * 0 - Radio Resource Location Protocol in user plane and control plane. This is default.
4839          * 1 - Enable LTE Positioning Protocol in user plane.
4840          * 2 - Enable LTE Positioning Protocol in control plane.
4841          * @hide
4842          */
4843         public static final String KEY_LPP_PROFILE_STRING = KEY_PREFIX + "lpp_profile";
4844 
4845         /**
4846          * Determine whether to use emergency PDN for emergency SUPL.
4847          * 0 - no.
4848          * 1 - yes. This is default.
4849          * @hide
4850          */
4851         public static final String KEY_USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL_STRING =
4852                 KEY_PREFIX + "use_emergency_pdn_for_emergency_supl";
4853 
4854         /**
4855          * A_GLONASS_POS_PROTOCOL_SELECT bit mask.
4856          * 0 - Don't use A-GLONASS. This is default.
4857          * 1 - Use A-GLONASS in Radio Resource Control(RRC) control-plane.
4858          * 2 - Use A-GLONASS in Radio Resource Location user-plane.
4859          * 4 - Use A-GLONASS in LTE Positioning Protocol User plane.
4860          * @hide
4861          */
4862         public static final String KEY_A_GLONASS_POS_PROTOCOL_SELECT_STRING =
4863                 KEY_PREFIX + "a_glonass_pos_protocol_select";
4864 
4865         /**
4866          * GPS_LOCK configuration bit mask to specify GPS device behavior toward other services,
4867          * when Location Settings are off.
4868          * "0" - No lock.
4869          * "1" - Lock Mobile Originated GPS functionalities.
4870          * "2" - Lock Network initiated GPS functionalities.
4871          * "3" - Lock both. This is default.
4872          * @hide
4873          */
4874         public static final String KEY_GPS_LOCK_STRING = KEY_PREFIX + "gps_lock";
4875 
4876         /**
4877          * Control Plane / SUPL NI emergency extension time in seconds. Default to "0".
4878          * @hide
4879          */
4880         public static final String KEY_ES_EXTENSION_SEC_STRING = KEY_PREFIX + "es_extension_sec";
4881 
4882         /**
4883          * Space separated list of Android package names of proxy applications representing
4884          * the non-framework entities requesting location directly from GNSS without involving
4885          * the framework, as managed by IGnssVisibilityControl.hal. For example,
4886          * "com.example.mdt com.example.ims".
4887          * @hide
4888          */
4889         public static final String KEY_NFW_PROXY_APPS_STRING = KEY_PREFIX + "nfw_proxy_apps";
4890 
4891         /**
4892          * Determines whether or not SUPL ES mode supports a control-plane mechanism to get a user's
4893          * location in the event that data plane SUPL fails or is otherwise unavailable.
4894          * <p>
4895          * An integer value determines the support type of this carrier. If this carrier only
4896          * supports data plane SUPL ES, then the value will be
4897          * {@link #SUPL_EMERGENCY_MODE_TYPE_DP_ONLY}. If the carrier supports control plane fallback
4898          * for emergency SUPL, the value will be {@link #SUPL_EMERGENCY_MODE_TYPE_CP_FALLBACK}.
4899          * If the carrier does not support data plane SUPL using the framework, the value will be
4900          * {@link #SUPL_EMERGENCY_MODE_TYPE_CP_ONLY}.
4901          * <p>
4902          * The default value for this configuration is {@link #SUPL_EMERGENCY_MODE_TYPE_CP_ONLY}.
4903          * @hide
4904          */
4905         public static final String KEY_ES_SUPL_CONTROL_PLANE_SUPPORT_INT =
4906                 KEY_PREFIX + "es_supl_control_plane_support_int";
4907 
4908         /**
4909          * A list of roaming PLMNs where SUPL ES mode does not support a control-plane mechanism to
4910          * get a user's location in the event that data plane SUPL fails or is otherwise
4911          * unavailable.
4912          * <p>
4913          * A string array of PLMNs that do not support a control-plane mechanism for getting a
4914          * user's location for SUPL ES.
4915          * @hide
4916          */
4917         public static final String KEY_ES_SUPL_DATA_PLANE_ONLY_ROAMING_PLMN_STRING_ARRAY =
4918                 KEY_PREFIX + "es_supl_data_plane_only_roaming_plmn_string_array";
4919 
getDefaults()4920         private static PersistableBundle getDefaults() {
4921             PersistableBundle defaults = new PersistableBundle();
4922             defaults.putBoolean(KEY_PERSIST_LPP_MODE_BOOL, true);
4923             defaults.putString(KEY_SUPL_HOST_STRING, "supl.google.com");
4924             defaults.putString(KEY_SUPL_PORT_STRING, "7275");
4925             defaults.putString(KEY_SUPL_VER_STRING, "0x20000");
4926             defaults.putString(KEY_SUPL_MODE_STRING, "1");
4927             defaults.putString(KEY_SUPL_ES_STRING, "1");
4928             defaults.putString(KEY_LPP_PROFILE_STRING, "2");
4929             defaults.putString(KEY_USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL_STRING, "1");
4930             defaults.putString(KEY_A_GLONASS_POS_PROTOCOL_SELECT_STRING, "0");
4931             defaults.putString(KEY_GPS_LOCK_STRING, "3");
4932             defaults.putString(KEY_ES_EXTENSION_SEC_STRING, "0");
4933             defaults.putString(KEY_NFW_PROXY_APPS_STRING, "");
4934             defaults.putInt(KEY_ES_SUPL_CONTROL_PLANE_SUPPORT_INT,
4935                     SUPL_EMERGENCY_MODE_TYPE_CP_ONLY);
4936             defaults.putStringArray(KEY_ES_SUPL_DATA_PLANE_ONLY_ROAMING_PLMN_STRING_ARRAY, null);
4937             return defaults;
4938         }
4939     }
4940 
4941     /**
4942      * An int array containing CDMA enhanced roaming indicator values for Home (non-roaming)
4943      * network.
4944      * The default values come from 3GPP2 C.R1001 table 8.1-1.
4945      * Enhanced Roaming Indicator Number Assignments
4946      *
4947      * @hide
4948      */
4949     public static final String KEY_CDMA_ENHANCED_ROAMING_INDICATOR_FOR_HOME_NETWORK_INT_ARRAY =
4950             "cdma_enhanced_roaming_indicator_for_home_network_int_array";
4951 
4952     /**
4953      * Determines whether wifi calling location privacy policy is shown.
4954      */
4955     public static final String KEY_SHOW_WFC_LOCATION_PRIVACY_POLICY_BOOL =
4956             "show_wfc_location_privacy_policy_bool";
4957 
4958     /**
4959      * Indicates use 3GPP application to replace 3GPP2 application even if it's a CDMA/CDMA-LTE
4960      * phone, because some carriers' CSIM application is present but not supported.
4961      * @hide
4962      */
4963     public static final String KEY_USE_USIM_BOOL = "use_usim_bool";
4964 
4965     /**
4966      * Determines whether the carrier wants to cancel the cs reject notification automatically
4967      * when the voice registration state changes.
4968      * If true, the notification will be automatically removed
4969      *          when the voice registration state changes.
4970      * If false, the notification will persist until the user dismisses it,
4971      *           the SIM is removed, or the device is rebooted.
4972      * @hide
4973      */
4974     public static final String KEY_AUTO_CANCEL_CS_REJECT_NOTIFICATION =
4975             "carrier_auto_cancel_cs_notification";
4976 
4977     /**
4978      * Passing this value as {@link #KEY_SUBSCRIPTION_GROUP_UUID_STRING} will remove the
4979      * subscription from a group instead of adding it to a group.
4980      *
4981      * <p>This value will work all the way back to {@link android.os.Build.VERSION_CODES#Q}.
4982      */
4983     public static final String REMOVE_GROUP_UUID_STRING = "00000000-0000-0000-0000-000000000000";
4984 
4985     /**
4986      * The UUID of a Group of related subscriptions in which to place the current subscription.
4987      *
4988      * A grouped subscription will behave for billing purposes and other UI purposes as though it
4989      * is a transparent extension of other subscriptions in the group.
4990      *
4991      * <p>If set to {@link #REMOVE_GROUP_UUID_STRING}, then the subscription will be removed from
4992      * its current group.
4993      *
4994      * <p>This key will work all the way back to {@link android.os.Build.VERSION_CODES#Q}.
4995      */
4996     public static final String KEY_SUBSCRIPTION_GROUP_UUID_STRING =
4997             "subscription_group_uuid_string";
4998 
4999     /**
5000      * Controls the cellular usage setting.
5001      *
5002      * The usage setting indicates whether a device will remain attached to a network based on
5003      * the primary use case for the service. A device will detach and search for a more-preferred
5004      * network if the primary use case (voice or data) is not satisfied. Depending on the type
5005      * of device, it may operate in a voice or data-centric mode by default.
5006      *
5007      * <p>Sets the usage setting in accordance with 3gpp 24.301 sec 4.3 and 3gpp 24.501 sec 4.3.
5008      * Also refer to "UE's usage setting" as defined in 3gpp 24.301 section 3.1 and 3gpp 23.221
5009      * Annex A.
5010      *
5011      * Either omit this key or pass a value of
5012      * {@link SubscriptionManager#USAGE_SETTING_UNKNOWN unknown} to preserve the current setting.
5013      *
5014      * <p>Devices that support configuration of the cellular usage setting, including devices
5015      * with HAL capability to set the cellular usage setting, must honor this setting accordingly.
5016      *
5017      * {@link SubscriptionManager#USAGE_SETTING_DEFAULT default},
5018      * {@link SubscriptionManager#USAGE_SETTING_VOICE_CENTRIC voice-centric},
5019      * or {@link SubscriptionManager#USAGE_SETTING_DATA_CENTRIC data-centric}.
5020      * {@see SubscriptionInfo#getUsageSetting}
5021      *
5022      */
5023     public static final String KEY_CELLULAR_USAGE_SETTING_INT = "cellular_usage_setting_int";
5024 
5025     /**
5026      * Data switch validation minimal gap time, in milliseconds.
5027      *
5028      * Which means, if the same subscription on the same network (based on MCC+MNC+TAC+subId)
5029      * was recently validated (within this time gap), and Telephony receives a request to switch to
5030      * it again, Telephony will skip the validation part and switch to it as soon as connection
5031      * is setup, as if it's already validated.
5032      *
5033      * If the network was validated within the gap but the latest validation result is false, the
5034      * validation will not be skipped.
5035      *
5036      * If not set or set to 0, validation will never be skipped.
5037      * The max acceptable value of this config is 24 hours.
5038      *
5039      * @hide
5040      * @deprecated Use {@link #KEY_DATA_SWITCH_VALIDATION_MIN_INTERVAL_MILLIS_LONG} instead.
5041      */
5042     @Deprecated
5043     public static final String KEY_DATA_SWITCH_VALIDATION_MIN_GAP_LONG =
5044             "data_switch_validation_min_gap_long";
5045 
5046     /**
5047      * Data switch validation minimal interval, in milliseconds.
5048      *
5049      * If a connection to the default (Internet) PDN for the current subscription is validated on
5050      * a given operator within a given tracking area, re-validations to that matching operator will
5051      * be skipped if they would occur within the specified interval. Instead, the connection will
5052      * automatically considered validated.
5053      *
5054      * If the network was validated within the interval but the latest validation result was false,
5055      * the validation will not be skipped. If not set or set to 0, validation will not be skipped.
5056      *
5057      * The valid range of value is between 0 millisecond and 24 hours, inclusive in both sides. The
5058      * default value is 24 hours.
5059      *
5060      * @see android.net.NetworkCapabilities#NET_CAPABILITY_VALIDATED
5061      */
5062     public static final String KEY_DATA_SWITCH_VALIDATION_MIN_INTERVAL_MILLIS_LONG =
5063             KEY_DATA_SWITCH_VALIDATION_MIN_GAP_LONG;
5064 
5065     /**
5066      * A boolean property indicating whether this subscription should be managed as an opportunistic
5067      * subscription.
5068      *
5069      * If true, then this subscription will be selected based on available coverage and will not be
5070      * available for a user in settings menus for selecting macro network providers. If unset,
5071      * defaults to “false”.
5072      *
5073      * <p>This key will work all the way back to {@link android.os.Build.VERSION_CODES#Q}.
5074      */
5075     public static final String KEY_IS_OPPORTUNISTIC_SUBSCRIPTION_BOOL =
5076             "is_opportunistic_subscription_bool";
5077 
5078     /**
5079      * The flatten string {@link android.content.ComponentName componentName} of carrier
5080      * provisioning app receiver.
5081      *
5082      * <p>
5083      * The RadioInfo activity(*#*#INFO#*#*) will broadcast an intent to this receiver when the
5084      * "Carrier Provisioning Info" or "Trigger Carrier Provisioning" button clicked.
5085      *
5086      * <p>
5087      * e.g., com.google.android.carrierPackageName/.CarrierReceiverName
5088      *
5089      * @hide
5090      */
5091     public static final String KEY_CARRIER_PROVISIONING_APP_STRING =
5092             "carrier_provisioning_app_string";
5093 
5094     /**
5095      * Configs used by the IMS stack.
5096      */
5097     public static final class Ims {
5098         /** Prefix of all Ims.KEY_* constants. */
5099         public static final String KEY_PREFIX = "ims.";
5100 
5101         /**
5102          * Delay in milliseconds to turn off wifi when IMS is registered over wifi.
5103          */
5104         public static final String KEY_WIFI_OFF_DEFERRING_TIME_MILLIS_INT =
5105                 KEY_PREFIX + "wifi_off_deferring_time_millis_int";
5106 
5107         /**
5108          * A boolean flag specifying whether or not this carrier requires one IMS registration for
5109          * all IMS services (MMTEL and RCS).
5110          * <p>
5111          * If set to {@code true}, the IMS Service must use one IMS registration for all IMS
5112          * services. If set to {@code false}, IMS services may use separate IMS registrations for
5113          * MMTEL and RCS.
5114          * <p>
5115          * The default value for this configuration is {@code false}.
5116          * @see android.telephony.ims.SipDelegateManager
5117          */
5118         public static final String KEY_IMS_SINGLE_REGISTRATION_REQUIRED_BOOL =
5119                 KEY_PREFIX + "ims_single_registration_required_bool";
5120 
5121         /**
5122          * A boolean flag specifying whether or not this carrier supports the device notifying the
5123          * network of its RCS capabilities using the SIP PUBLISH procedure defined for User
5124          * Capability Exchange (UCE). See RCC.71, section 3 for more information.
5125          * <p>
5126          * If this key's value is set to false, the procedure for RCS contact capability exchange
5127          * via SIP SUBSCRIBE/NOTIFY will also be disabled internally, and this key must also be set
5128          * to false to ensure apps do not improperly think that capability exchange via SIP PUBLISH
5129          * is enabled.
5130          * <p> The default value for this key is {@code false}.
5131          */
5132         public static final String KEY_ENABLE_PRESENCE_PUBLISH_BOOL =
5133                 KEY_PREFIX + "enable_presence_publish_bool";
5134 
5135         /**
5136          * Each string in this array contains a mapping between the service-id and version portion
5137          * of the service-description element and the associated IMS feature tag(s) that are
5138          * associated with each element (see RCC.07 Table 7).
5139          * <p>
5140          * Each string contains 3 parts, which define the mapping between service-description and
5141          * feature tag(s) that must be present in the IMS REGISTER for the RCS service to be
5142          * published as part of the RCS PUBLISH procedure:
5143          * [service-id]|[version]|[desc]|[feature_tag];[feature_tag];...
5144          * <ul>
5145          *   <li>[service-id]: the service-id element associated with the RCS capability.</li>
5146          *   <li>[version]: The version element associated with that service-id</li>
5147          *   <li>[desc]: The optional desecription element associated with that service-id</li>
5148          *   <li>[feature_tag];[feature_tag]: The list of all feature tags associated with this
5149          *       capability that MUST ALL be present in the IMS registration for this this
5150          *       capability to be published to the network.</li>
5151          * </ul>
5152          * <p>
5153          * Features managed by the framework will be considered capable when the ImsService reports
5154          * that those services are capable via the
5155          * {@link MmTelFeature#notifyCapabilitiesStatusChanged(MmTelFeature.MmTelCapabilities)} or
5156          * {@link RcsFeature#notifyCapabilitiesStatusChanged(RcsFeature.RcsImsCapabilities)} APIs.
5157          * For RCS services not managed by the framework, the capability of these services are
5158          * determined by looking at the feature tags associated with the IMS registration using the
5159          * {@link ImsRegistrationAttributes} API and mapping them to the service-description map.
5160          * <p>
5161          * The framework contains a default value of this key, which is based off of RCC.07
5162          * specification. Capabilities based of carrier extensions may be added to this list on a
5163          * carrier-by-carrier basis as required in order to support additional services in the
5164          * PUBLISH. If this list contains a service-id and version that overlaps with the default,
5165          * it will override the framework default.
5166          * @hide
5167          */
5168         public static final String KEY_PUBLISH_SERVICE_DESC_FEATURE_TAG_MAP_OVERRIDE_STRING_ARRAY =
5169                 KEY_PREFIX + "publish_service_desc_feature_tag_map_override_string_array";
5170 
5171         /**
5172          * Flag indicating whether or not this carrier supports the exchange of phone numbers with
5173          * the carrier's RCS presence server in order to retrieve the RCS capabilities of requested
5174          * contacts used in the RCS User Capability Exchange (UCE) procedure. See RCC.71, section 3
5175          * for more information.
5176          * <p>
5177          * When presence is supported, the device uses the SIP SUBSCRIBE/NOTIFY procedure internally
5178          * to retrieve the requested RCS capabilities. See
5179          * {@link android.telephony.ims.RcsUceAdapter} for more information on how RCS capabilities
5180          * can be retrieved from the carrier's network.
5181          */
5182         public static final String KEY_ENABLE_PRESENCE_CAPABILITY_EXCHANGE_BOOL =
5183                 KEY_PREFIX + "enable_presence_capability_exchange_bool";
5184 
5185         /**
5186          * Flag indicating whether or not the carrier expects the RCS UCE service to periodically
5187          * refresh the RCS capabilities cache of the user's contacts as well as request the
5188          * capabilities of call contacts when the SIM card is first inserted or when a new contact
5189          * is added, removed, or modified. This corresponds to the RCC.07 A.19
5190          * "DISABLE INITIAL ADDRESS BOOK SCAN" parameter.
5191          * <p>
5192          * If this flag is disabled, the capabilities cache will not be refreshed internally at all
5193          * and will only be updated if the cached capabilities are stale when an application
5194          * requests them.
5195          *
5196          * @see RcsUceAdapter#isUceSettingEnabled() more information about this feature and how
5197          * it is enabled by the user.
5198          */
5199         public static final String KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL =
5200                 KEY_PREFIX + "rcs_bulk_capability_exchange_bool";
5201 
5202         /**
5203          * Flag indicating whether or not the carrier supports capability exchange with a list of
5204          * contacts. When {@code true}, the device will batch together multiple requests and
5205          * construct a RLMI document in the SIP SUBSCRIBE request (see RFC 4662). If {@code false},
5206          * the request will be split up into one SIP SUBSCRIBE request per contact.
5207          */
5208         public static final String KEY_ENABLE_PRESENCE_GROUP_SUBSCRIBE_BOOL =
5209                 KEY_PREFIX + "enable_presence_group_subscribe_bool";
5210 
5211         /**
5212          * Flag indicating whether or not to use SIP URI when send a presence subscribe.
5213          * When {@code true}, the device sets the To and Contact header to be SIP URI using
5214          * the TelephonyManager#getIsimDomain" API.
5215          * If {@code false}, the device uses a TEL URI.
5216          */
5217         public static final String KEY_USE_SIP_URI_FOR_PRESENCE_SUBSCRIBE_BOOL =
5218                 KEY_PREFIX + "use_sip_uri_for_presence_subscribe_bool";
5219 
5220         /**
5221          * Flag indicating whether or not to use TEL URI when setting the entity uri field and
5222          * contact element of each tuple.
5223          *
5224          * When {@code true}, the device sets the entity uri field and contact element to be
5225          * TEL URI. This is done by first searching for the first TEL URI provided in
5226          * p-associated-uri header. If there are no TEL URIs in the p-associated-uri header, we will
5227          * convert the first SIP URI provided in the header to a TEL URI. If there are no URIs in
5228          * the p-associated-uri header, we will then fall back to using the SIM card to generate the
5229          * TEL URI.
5230          * If {@code false}, the first URI provided in the p-associated-uri header is used,
5231          * independent of the URI scheme. If there are no URIs available from p-associated-uri
5232          * header, we will try to generate a SIP URI or TEL URI from the information provided by the
5233          * SIM card, depending on the information available.
5234          * @hide
5235          */
5236         public static final String KEY_USE_TEL_URI_FOR_PIDF_XML_BOOL =
5237                 KEY_PREFIX + "use_tel_uri_for_pidf_xml";
5238 
5239         /**
5240          * An integer key associated with the period of time in seconds the non-rcs capability
5241          * information of each contact is cached on the device.
5242          * <p>
5243          * The rcs capability cache expiration sec is managed by
5244          * {@code android.telephony.ims.ProvisioningManager} but non-rcs capability is managed by
5245          * {@link CarrierConfigManager} since non-rcs capability will be provided via ACS or carrier
5246          * config.
5247          * <p>
5248          * The default value is 2592000 secs (30 days), see RCC.07 Annex A.1.9.
5249          */
5250         public static final String KEY_NON_RCS_CAPABILITIES_CACHE_EXPIRATION_SEC_INT =
5251                 KEY_PREFIX + "non_rcs_capabilities_cache_expiration_sec_int";
5252 
5253         /**
5254          * Specifies the RCS feature tag allowed for the carrier.
5255          *
5256          * <p>The values refer to RCC.07 2.4.4.
5257          */
5258         public static final String KEY_RCS_FEATURE_TAG_ALLOWED_STRING_ARRAY =
5259                 KEY_PREFIX + "rcs_feature_tag_allowed_string_array";
5260 
5261         /**
5262          * Flag indicating whether or not carrier forbids device send the RCS request when the
5263          * device receive the network response with the SIP code 489 BAD EVENT.
5264          * <p>
5265          * The default value for this key is {@code false}.
5266          * @hide
5267          */
5268         public static final String KEY_RCS_REQUEST_FORBIDDEN_BY_SIP_489_BOOL =
5269                 KEY_PREFIX + "rcs_request_forbidden_by_sip_489_bool";
5270 
5271         /**
5272          * Indicates the interval that SUBSCRIBE requests from applications will be retried at when
5273          * the carrier network has responded to a previous request with a forbidden error.
5274          * <p>
5275          * The default value for this key is 20 minutes.
5276          * @hide
5277          */
5278         public static final String KEY_RCS_REQUEST_RETRY_INTERVAL_MILLIS_LONG =
5279                 KEY_PREFIX + "rcs_request_retry_interval_millis_long";
5280 
5281         /** SIP timer T1 as per 3GPP TS 24.229 Table 7.7.1 */
5282         public static final String KEY_SIP_TIMER_T1_MILLIS_INT =
5283                 KEY_PREFIX + "sip_timer_t1_millis_int";
5284 
5285         /** SIP timer T2 as per 3GPP TS 24.229 Table 7.7.1 */
5286         public static final String KEY_SIP_TIMER_T2_MILLIS_INT =
5287                 KEY_PREFIX + "sip_timer_t2_millis_int";
5288 
5289         /** SIP timer T4 as per 3GPP TS 24.229 Table 7.7.1 */
5290         public static final String KEY_SIP_TIMER_T4_MILLIS_INT =
5291                 KEY_PREFIX + "sip_timer_t4_millis_int";
5292 
5293         /** SIP timer B as per 3GPP TS 24.229 Table 7.7.1 */
5294         public static final String KEY_SIP_TIMER_B_MILLIS_INT =
5295                 KEY_PREFIX + "sip_timer_b_millis_int";
5296 
5297         /** SIP timer C as per 3GPP TS 24.229 Table 7.7.1 */
5298         public static final String KEY_SIP_TIMER_C_MILLIS_INT =
5299                 KEY_PREFIX + "sip_timer_c_millis_int";
5300 
5301         /** SIP timer D as per 3GPP TS 24.229 Table 7.7.1 */
5302         public static final String KEY_SIP_TIMER_D_MILLIS_INT =
5303                 KEY_PREFIX + "sip_timer_d_millis_int";
5304 
5305         /** SIP timer F as per 3GPP TS 24.229 Table 7.7.1 */
5306         public static final String KEY_SIP_TIMER_F_MILLIS_INT =
5307                 KEY_PREFIX + "sip_timer_f_millis_int";
5308 
5309         /** SIP timer H as per 3GPP TS 24.229 Table 7.7.1 */
5310         public static final String KEY_SIP_TIMER_H_MILLIS_INT =
5311                 KEY_PREFIX + "sip_timer_h_millis_int";
5312 
5313         /** SIP timer J as per 3GPP TS 24.229 Table 7.7.1 */
5314         public static final String KEY_SIP_TIMER_J_MILLIS_INT =
5315                 KEY_PREFIX + "sip_timer_j_millis_int";
5316 
5317         /** Specifies the SIP Server default port. */
5318         public static final String KEY_SIP_SERVER_PORT_NUMBER_INT =
5319                 KEY_PREFIX + "sip_server_port_number_int";
5320 
5321         /**
5322          * Specify the “phone-context” parameter as defined in
5323          * section 7.2A.10 in 3GPP TS 24.229.
5324          */
5325         public static final String KEY_PHONE_CONTEXT_DOMAIN_NAME_STRING =
5326                 KEY_PREFIX + "phone_context_domain_name_string";
5327 
5328         /** @hide */
5329         @IntDef({REQUEST_URI_FORMAT_TEL, REQUEST_URI_FORMAT_SIP})
5330         public @interface RequestUriFormatType {}
5331 
5332         /**
5333          *  Request URI is of type TEL URI.
5334          */
5335         public static final int REQUEST_URI_FORMAT_TEL = 0;
5336 
5337         /**
5338          *  Request URI is of type SIP URI.
5339          */
5340         public static final int REQUEST_URI_FORMAT_SIP = 1;
5341 
5342         /**
5343          * Specify whether the request URI is SIP URI
5344          * {@link #REQUEST_URI_FORMAT_SIP} or
5345          * TEL URI {@link #REQUEST_URI_FORMAT_TEL}.
5346          */
5347         public static final String KEY_REQUEST_URI_TYPE_INT =
5348                 KEY_PREFIX + "request_uri_type_int";
5349 
5350         /**
5351          * Flag indicating whether Globally Routable User agent (GRUU)
5352          * in supported HEADER is included or not.
5353          *
5354          * <p> Reference: RFC 5627.
5355          */
5356         public static final String KEY_GRUU_ENABLED_BOOL =
5357                 KEY_PREFIX + "gruu_enabled_bool";
5358 
5359         /**
5360          * Flag indicating whether to keep/release IMS PDN in case of
5361          * moving to non VOPS area.
5362          *
5363          * <p>if {@code True}, keep IMS PDN in case of moving to non VOPS area.
5364          * if {@code false}, otherwise.
5365          */
5366         public static final String KEY_KEEP_PDN_UP_IN_NO_VOPS_BOOL =
5367                 KEY_PREFIX + "keep_pdn_up_in_no_vops_bool";
5368 
5369         /** @hide */
5370         @IntDef({
5371             PREFERRED_TRANSPORT_UDP,
5372             PREFERRED_TRANSPORT_TCP,
5373             PREFERRED_TRANSPORT_DYNAMIC_UDP_TCP,
5374             PREFERRED_TRANSPORT_TLS
5375         })
5376         public @interface PreferredTransportType {}
5377 
5378         /** Preferred Transport is always UDP. */
5379         public static final int PREFERRED_TRANSPORT_UDP = 0;
5380 
5381         /** Preferred Transport is always TCP. */
5382         public static final int PREFERRED_TRANSPORT_TCP = 1;
5383 
5384         /**
5385          *  Preferred Transport is both UDP and TCP and selected based
5386          *  on MTU size specified in {@link #KEY_IPV4_SIP_MTU_SIZE_CELLULAR_INT}
5387          *  and {@link #KEY_IPV6_SIP_MTU_SIZE_CELLULAR_INT}.
5388          *
5389          *  <p>Default transport is UDP. If message size is larger
5390          *  than MTU, then TCP shall be used.
5391          */
5392         public static final int PREFERRED_TRANSPORT_DYNAMIC_UDP_TCP = 2;
5393 
5394         /** Preferred Transport is TLS. */
5395         public static final int PREFERRED_TRANSPORT_TLS = 3;
5396 
5397         /**
5398          * Specify the preferred transport protocol for SIP messages.
5399          *
5400          * <p>Possible values are,
5401          * {@link #PREFERRED_TRANSPORT_UDP},
5402          * {@link #PREFERRED_TRANSPORT_TCP},
5403          * {@link #PREFERRED_TRANSPORT_DYNAMIC_UDP_TCP}
5404          */
5405         public static final String KEY_SIP_PREFERRED_TRANSPORT_INT =
5406                 KEY_PREFIX + "sip_preferred_transport_int";
5407 
5408         /**
5409          * Specify the maximum IPV4 MTU size of SIP message on Cellular.
5410          *
5411          * <p>If {@link #KEY_SIP_PREFERRED_TRANSPORT_INT} is
5412          * {@link #PREFERRED_TRANSPORT_DYNAMIC_UDP_TCP} and SIP message MTU size
5413          * is more than this value, then SIP transport will be TCP, else the
5414          * SIP transport is UDP.
5415          */
5416         public static final String KEY_IPV4_SIP_MTU_SIZE_CELLULAR_INT =
5417                 KEY_PREFIX + "ipv4_sip_mtu_size_cellular_int";
5418 
5419         /**
5420          * Specify the maximum IPV6 MTU size of SIP message on Cellular.
5421          *
5422          * <p>If {@link #KEY_SIP_PREFERRED_TRANSPORT_INT} is
5423          * {@link #PREFERRED_TRANSPORT_DYNAMIC_UDP_TCP} and SIP message MTU size
5424          * is more than this value, then SIP transport will be TCP, else the
5425          * SIP transport is UDP.
5426          */
5427         public static final String KEY_IPV6_SIP_MTU_SIZE_CELLULAR_INT =
5428                 KEY_PREFIX + "ipv6_sip_mtu_size_cellular_int";
5429 
5430         /**
5431          * This config determines whether IMS PDN needs to be enabled
5432          * when VOPS support is not available in both home and roaming scenarios.
5433          *
5434          * <p>This is applicable before IMS PDN is up, to decide whether
5435          * IMS PDN needs to be enabled based on VOPS support in home/roaming.
5436          *
5437          * <p>Possible values are,
5438          * {@link #NETWORK_TYPE_HOME},
5439          * {@link #NETWORK_TYPE_ROAMING}
5440          * An empty array indicates IMS PDN depends on VOPS on both home
5441          * and roaming scenarios.
5442          */
5443         public static final String KEY_IMS_PDN_ENABLED_IN_NO_VOPS_SUPPORT_INT_ARRAY =
5444                 KEY_PREFIX + "ims_pdn_enabled_in_no_vops_support_int_array";
5445 
5446         /**
5447          * Flag indicating whether IPSec enabled for SIP messages.
5448          *
5449          * <p> Reference: 3GPP TS 33.203 and RFC 3329.
5450          */
5451         public static final String KEY_SIP_OVER_IPSEC_ENABLED_BOOL =
5452                 KEY_PREFIX + "sip_over_ipsec_enabled_bool";
5453 
5454         /** @hide */
5455         @IntDef({IPSEC_AUTHENTICATION_ALGORITHM_HMAC_MD5, IPSEC_AUTHENTICATION_ALGORITHM_HMAC_SHA1})
5456         public @interface IpsecAuthenticationAlgorithmType {}
5457 
5458         /** IPSec Authentication algorithm is HMAC-MD5. see Annex H of TS 33.203 */
5459         public static final int IPSEC_AUTHENTICATION_ALGORITHM_HMAC_MD5 = 0;
5460 
5461         /** IPSec Authentication algorithm is HMAC-SHA1. see Annex H of TS 33.203 */
5462         public static final int IPSEC_AUTHENTICATION_ALGORITHM_HMAC_SHA1 = 1;
5463 
5464         /**
5465          * List of supported IPSEC Authentication algorithms.
5466          *
5467          * <p>Possible values are,
5468          * {@link #IPSEC_AUTHENTICATION_ALGORITHM_HMAC_MD5},
5469          * {@link #IPSEC_AUTHENTICATION_ALGORITHM_HMAC_SHA1}
5470          */
5471         public static final String KEY_IPSEC_AUTHENTICATION_ALGORITHMS_INT_ARRAY =
5472                 KEY_PREFIX + "ipsec_authentication_algorithms_int_array";
5473 
5474         /** @hide */
5475         @IntDef({
5476             IPSEC_ENCRYPTION_ALGORITHM_NULL,
5477             IPSEC_ENCRYPTION_ALGORITHM_DES_EDE3_CBC,
5478             IPSEC_ENCRYPTION_ALGORITHM_AES_CBC
5479         })
5480         public @interface IpsecEncryptionAlgorithmType {}
5481 
5482         /** IPSec Encryption algorithm is NULL. see Annex H of TS 33.203 */
5483         public static final int IPSEC_ENCRYPTION_ALGORITHM_NULL = 0;
5484 
5485         /** IPSec Encryption algorithm is DES_EDE3_CBC. see Annex H of TS 33.203 */
5486         public static final int IPSEC_ENCRYPTION_ALGORITHM_DES_EDE3_CBC = 1;
5487 
5488         /** IPSec Encryption algorithm is AES_CBC. see Annex H of TS 33.203 */
5489         public static final int IPSEC_ENCRYPTION_ALGORITHM_AES_CBC = 2;
5490 
5491         /**
5492          * List of supported IPSEC encryption algorithms.
5493          *
5494          * <p>Possible values are,
5495          * {@link #IPSEC_ENCRYPTION_ALGORITHM_NULL},
5496          * {@link #IPSEC_ENCRYPTION_ALGORITHM_DES_EDE3_CBC},
5497          * {@link #IPSEC_ENCRYPTION_ALGORITHM_AES_CBC}
5498          */
5499         public static final String KEY_IPSEC_ENCRYPTION_ALGORITHMS_INT_ARRAY =
5500                 KEY_PREFIX + "ipsec_encryption_algorithms_int_array";
5501 
5502         /**
5503          * Expiry timer for IMS Registration in seconds.
5504          * <p>Reference: RFC 3261 Section 20.19.
5505          */
5506         public static final String KEY_REGISTRATION_EXPIRY_TIMER_SEC_INT =
5507                 KEY_PREFIX + "registration_expiry_timer_sec_int";
5508 
5509         /** Registration Retry Base-time as per RFC 5626 Section 4.5. */
5510         public static final String KEY_REGISTRATION_RETRY_BASE_TIMER_MILLIS_INT =
5511                 KEY_PREFIX + "registration_retry_base_timer_millis_int";
5512 
5513         /** Registration Retry max-time as per RFC 5626 Section 4.5. */
5514         public static final String KEY_REGISTRATION_RETRY_MAX_TIMER_MILLIS_INT =
5515                 KEY_PREFIX + "registration_retry_max_timer_millis_int";
5516 
5517         /**
5518          * Flag indicating whether subscription to registration event package
5519          * is supported or not.
5520          */
5521         public static final String KEY_REGISTRATION_EVENT_PACKAGE_SUPPORTED_BOOL =
5522                 KEY_PREFIX + "registration_event_package_supported_bool";
5523 
5524         /**
5525          * Expiry timer for SUBSCRIBE in seconds.
5526          * <p>Reference: RFC 3261 Section 20.19.
5527          */
5528         public static final String KEY_REGISTRATION_SUBSCRIBE_EXPIRY_TIMER_SEC_INT =
5529                 KEY_PREFIX + "registration_subscribe_expiry_timer_sec_int";
5530 
5531         /** @hide */
5532         @IntDef({
5533             GEOLOCATION_PIDF_FOR_NON_EMERGENCY_ON_WIFI,
5534             GEOLOCATION_PIDF_FOR_EMERGENCY_ON_WIFI,
5535             GEOLOCATION_PIDF_FOR_NON_EMERGENCY_ON_CELLULAR,
5536             GEOLOCATION_PIDF_FOR_EMERGENCY_ON_CELLULAR
5537         })
5538         public @interface GeolocationPidfAllowedType {}
5539 
5540         /**
5541          * Indicates geolocation PIDF XML needs to be included for
5542          * normal/non-emergency call scenario on WiFi
5543          *
5544          * <p>Geolocation for normal/non-emergency call should only include
5545          * country code.
5546          */
5547         public static final int GEOLOCATION_PIDF_FOR_NON_EMERGENCY_ON_WIFI = 1;
5548 
5549         /**
5550          * Indicates geolocation PIDF XML needs to be included for emergency
5551          * call scenario on WiFi
5552          */
5553         public static final int GEOLOCATION_PIDF_FOR_EMERGENCY_ON_WIFI = 2;
5554 
5555         /**
5556          * Indicates geolocation PIDF XML needs to be included for normal/non-emergency
5557          * call scenario on Cellular
5558          *
5559          * <p>Geolocation for normal/non-emergency call should only include
5560          * country code.
5561          */
5562         public static final int GEOLOCATION_PIDF_FOR_NON_EMERGENCY_ON_CELLULAR = 3;
5563 
5564         /**
5565          * Indicates geolocation PIDF XML needs to be included for emergency
5566          * call scenario on Cellular
5567          */
5568         public static final int GEOLOCATION_PIDF_FOR_EMERGENCY_ON_CELLULAR = 4;
5569 
5570         /**
5571          * List of cases where geolocation PIDF XML needs to be included in the
5572          * SIP REGISTER over WiFi and Cellular.
5573          *
5574          * <p>Possible values are,
5575          * {@link #GEOLOCATION_PIDF_FOR_NON_EMERGENCY_ON_WIFI},
5576          * {@link #GEOLOCATION_PIDF_FOR_EMERGENCY_ON_WIFI},
5577          * {@link #GEOLOCATION_PIDF_FOR_NON_EMERGENCY_ON_CELLULAR},
5578          * {@link #GEOLOCATION_PIDF_FOR_EMERGENCY_ON_CELLULAR}
5579          *
5580          * <p>An empty array indicates geolocation PIDF XML should not be included in
5581          * the SIP REGISTER over WiFi and Cellular.
5582          */
5583         public static final String KEY_GEOLOCATION_PIDF_IN_SIP_REGISTER_SUPPORT_INT_ARRAY =
5584                 KEY_PREFIX + "geolocation_pidf_in_sip_register_support_int_array";
5585 
5586         /**
5587          * List of cases where geolocation PIDF XML needs to be included in the
5588          * SIP INVITE over WiFi and Cellular.
5589          *
5590          * <p>Possible values are,
5591          * {@link #GEOLOCATION_PIDF_FOR_NON_EMERGENCY_ON_WIFI},
5592          * {@link #GEOLOCATION_PIDF_FOR_EMERGENCY_ON_WIFI},
5593          * {@link #GEOLOCATION_PIDF_FOR_NON_EMERGENCY_ON_CELLULAR},
5594          * {@link #GEOLOCATION_PIDF_FOR_EMERGENCY_ON_CELLULAR}
5595          *
5596          * <p>An empty array indicates geolocation PIDF XML should not be included
5597          * in the SIP INVITE over WiFi and Cellular.
5598          */
5599         public static final String KEY_GEOLOCATION_PIDF_IN_SIP_INVITE_SUPPORT_INT_ARRAY =
5600                 KEY_PREFIX + "geolocation_pidf_in_sip_invite_support_int_array";
5601 
5602         /**
5603          * Specifies the IMS User Agent in template format.
5604          *
5605          * <p>Example: #MANUFACTURER#_#MODEL#_Android#AV#_#BUILD#".
5606          * IMS Stack should internally substitute the tokens with the
5607          * values from the respective android properties.
5608          *
5609          * <p>List of allowed tokens and the corresponding android properties are,
5610          * <UL>
5611          *   <LI>MANUFACTURER : ro.product.manufacturer</LI>
5612          *   <LI>MODEL :  ro.product.model</LI>
5613          *   <LI>AV : ro.build.version.release"</LI>
5614          *   <LI>BUILD : ro.build.id</LI>
5615          * </UL>
5616          * <p> Vendor IMS Stack should strip any whitespace characters present
5617          * in the android properties values before replacing the token.
5618          *
5619          * <p> An empty string is invalid as per IR92 section 2.6. This key is
5620          * considered invalid if the format is violated. If the key is invalid or
5621          * not configured, IMS stack should use internal default values.
5622          */
5623         public static final String KEY_IMS_USER_AGENT_STRING =
5624                 KEY_PREFIX + "ims_user_agent_string";
5625 
5626         /** @hide */
5627         @IntDef({
5628             NETWORK_TYPE_HOME,
5629             NETWORK_TYPE_ROAMING
5630         })
5631         public @interface NetworkType {}
5632 
5633         /** Indicates HOME Network. */
5634         public static final int NETWORK_TYPE_HOME = 0;
5635 
5636         /** Indicates Roaming Network. */
5637         public static final int NETWORK_TYPE_ROAMING = 1;
5638 
5639         /** @hide */
5640         @IntDef({
5641             RTCP_INACTIVITY_ON_HOLD,
5642             RTCP_INACTIVITY_ON_CONNECTED,
5643             RTP_INACTIVITY_ON_CONNECTED,
5644             E911_RTCP_INACTIVITY_ON_CONNECTED,
5645             E911_RTP_INACTIVITY_ON_CONNECTED
5646         })
5647         public @interface MediaInactivityReason {}
5648 
5649         /**  RTCP inactivity occurred when call is on HOLD. */
5650         public static final int RTCP_INACTIVITY_ON_HOLD = 0;
5651 
5652         /**  RTCP inactivity occurred when call is connected. */
5653         public static final int RTCP_INACTIVITY_ON_CONNECTED = 1;
5654 
5655         /**  RTP inactivity occurred when call is connected. */
5656         public static final int RTP_INACTIVITY_ON_CONNECTED = 2;
5657 
5658         /**  E911 RTCP inactivity occurred when call is connected. */
5659         public static final int E911_RTCP_INACTIVITY_ON_CONNECTED = 3;
5660 
5661         /**  E911 RTP inactivity occurred when call is connected. */
5662         public static final int E911_RTP_INACTIVITY_ON_CONNECTED = 4;
5663 
5664         /**
5665          * List of different RAT technologies on which IMS
5666          * is supported.
5667          *
5668          * <p>Possible values are,
5669          * {@link AccessNetworkConstants.AccessNetworkType#NGRAN}
5670          * {@link AccessNetworkConstants.AccessNetworkType#EUTRAN}
5671          * {@link AccessNetworkConstants.AccessNetworkType#IWLAN}
5672          * {@link AccessNetworkConstants.AccessNetworkType#UTRAN}
5673          * {@link AccessNetworkConstants.AccessNetworkType#GERAN}
5674          */
5675         public static final String KEY_SUPPORTED_RATS_INT_ARRAY =
5676                 KEY_PREFIX + "supported_rats_int_array";
5677 
5678         /**
5679          * A bundle which specifies the MMTEL capability and registration technology
5680          * that requires provisioning. If a tuple is not present, the
5681          * framework will not require that the tuple requires provisioning before
5682          * enabling the capability.
5683          * <p> Possible keys in this bundle are
5684          * <ul>
5685          *     <li>{@link #KEY_CAPABILITY_TYPE_VOICE_INT_ARRAY}</li>
5686          *     <li>{@link #KEY_CAPABILITY_TYPE_VIDEO_INT_ARRAY}</li>
5687          *     <li>{@link #KEY_CAPABILITY_TYPE_UT_INT_ARRAY}</li>
5688          *     <li>{@link #KEY_CAPABILITY_TYPE_SMS_INT_ARRAY}</li>
5689          *     <li>{@link #KEY_CAPABILITY_TYPE_CALL_COMPOSER_INT_ARRAY}</li>
5690          * </ul>
5691          * <p> The values are defined in
5692          * {@link ImsRegistrationImplBase.ImsRegistrationTech}
5693          *
5694          * changing mmtel_requires_provisioning_bundle requires changes to
5695          * carrier_volte_provisioning_required_bool and vice versa
5696          * {@link Ims#KEY_CARRIER_VOLTE_PROVISIONING_REQUIRED_BOOL}
5697          */
5698         public static final String KEY_MMTEL_REQUIRES_PROVISIONING_BUNDLE =
5699                 KEY_PREFIX + "mmtel_requires_provisioning_bundle";
5700 
5701         /**
5702          * List of different RAT technologies on which Provisioning for Voice calling (IR.92)
5703          * is supported.
5704          * @see MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_VOICE
5705          * <p>Possible values are,
5706          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_LTE}
5707          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_IWLAN}
5708          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_CROSS_SIM}
5709          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_NR}
5710          */
5711         public static final String KEY_CAPABILITY_TYPE_VOICE_INT_ARRAY =
5712                 KEY_PREFIX + "capability_type_voice_int_array";
5713 
5714         /**
5715          * List of different RAT technologies on which Provisioning for Video Telephony (IR.94)
5716          * is supported.
5717          * @see MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_VIDEO
5718          * <p>Possible values are,
5719          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_LTE}
5720          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_IWLAN}
5721          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_CROSS_SIM}
5722          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_NR}
5723          */
5724         public static final String KEY_CAPABILITY_TYPE_VIDEO_INT_ARRAY =
5725                 KEY_PREFIX + "capability_type_video_int_array";
5726 
5727         /**
5728          * List of different RAT technologies on which Provisioning for XCAP over Ut for
5729          * supplementary services. (IR.92) is supported.
5730          * @see MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_UT
5731          * <p>Possible values are,
5732          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_LTE}
5733          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_IWLAN}
5734          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_CROSS_SIM}
5735          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_NR}
5736          */
5737         public static final String KEY_CAPABILITY_TYPE_UT_INT_ARRAY =
5738                 KEY_PREFIX + "capability_type_ut_int_array";
5739 
5740         /**
5741          * List of different RAT technologies on which Provisioning for SMS (IR.92) is supported.
5742          * @see MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_SMS
5743          * <p>Possible values are,
5744          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_LTE}
5745          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_IWLAN}
5746          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_CROSS_SIM}
5747          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_NR}
5748          */
5749         public static final String KEY_CAPABILITY_TYPE_SMS_INT_ARRAY =
5750                 KEY_PREFIX + "capability_type_sms_int_array";
5751 
5752         /**
5753          * List of different RAT technologies on which Provisioning for Call Composer
5754          * (section 2.4 of RCC.20) is supported.
5755          * @see MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_CALL_COMPOSER
5756          * <p>Possible values are,
5757          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_LTE}
5758          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_IWLAN}
5759          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_CROSS_SIM}
5760          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_NR}
5761          */
5762         public static final String KEY_CAPABILITY_TYPE_CALL_COMPOSER_INT_ARRAY =
5763                 KEY_PREFIX + "capability_type_call_composer_int_array";
5764 
5765         /**
5766          * A bundle which specifies the RCS capability and registration technology
5767          * that requires provisioning. If a tuple is not present, the
5768          * framework will not require that the tuple requires provisioning before
5769          * enabling the capability.
5770          * <p> Possible keys in this bundle are
5771          * <ul>
5772          *     <li>{@link #KEY_CAPABILITY_TYPE_OPTIONS_UCE_INT_ARRAY}</li>
5773          *     <li>{@link #KEY_CAPABILITY_TYPE_PRESENCE_UCE_INT_ARRAY}</li>
5774          * </ul>
5775          * <p> The values are defined in
5776          * {@link ImsRegistrationImplBase.ImsRegistrationTech}
5777          */
5778         public static final String KEY_RCS_REQUIRES_PROVISIONING_BUNDLE =
5779                 KEY_PREFIX + "rcs_requires_provisioning_bundle";
5780 
5781         /**
5782          * This carrier supports User Capability Exchange using SIP OPTIONS as defined by the
5783          * framework. If set, the RcsFeature should support capability exchange using SIP OPTIONS.
5784          * If not set, this RcsFeature should not service capability requests.
5785          * @see RcsFeature.RcsImsCapabilities#CAPABILITY_TYPE_OPTIONS_UCE
5786          * <p>Possible values are,
5787          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_LTE}
5788          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_IWLAN}
5789          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_CROSS_SIM}
5790          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_NR}
5791          */
5792         public static final String KEY_CAPABILITY_TYPE_OPTIONS_UCE_INT_ARRAY =
5793                 KEY_PREFIX + "capability_type_options_uce_int_array";
5794 
5795         /**
5796          * This carrier supports User Capability Exchange using a presence server as defined by the
5797          * framework. If set, the RcsFeature should support capability exchange using a presence
5798          * server. If not set, this RcsFeature should not publish capabilities or service capability
5799          * requests using presence.
5800          * @see RcsFeature.RcsImsCapabilities#CAPABILITY_TYPE_PRESENCE_UCE
5801          * <p>Possible values are,
5802          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_LTE}
5803          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_IWLAN}
5804          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_CROSS_SIM}
5805          * {@link ImsRegistrationImplBase.ImsRegistrationTech#REGISTRATION_TECH_NR}
5806          */
5807         public static final String KEY_CAPABILITY_TYPE_PRESENCE_UCE_INT_ARRAY =
5808                 KEY_PREFIX + "capability_type_presence_uce_int_array";
5809 
5810         /**
5811          * Specifies the policy for disabling NR SA mode. Default value is
5812          *{@link #SA_DISABLE_POLICY_NONE}.
5813          * The value set as below:
5814          * <ul>
5815          * <li>0: {@link #SA_DISABLE_POLICY_NONE }</li>
5816          * <li>1: {@link #SA_DISABLE_POLICY_WFC_ESTABLISHED }</li>
5817          * <li>2: {@link #SA_DISABLE_POLICY_WFC_ESTABLISHED_WHEN_VONR_DISABLED  }</li>
5818          * <li>3: {@link #SA_DISABLE_POLICY_VOWIFI_REGISTERED  }</li>
5819          * </ul>
5820          * @hide
5821          */
5822         public static final String KEY_NR_SA_DISABLE_POLICY_INT =
5823                 KEY_PREFIX + "sa_disable_policy_int";
5824 
5825         /** @hide */
5826         @IntDef({
5827                 NR_SA_DISABLE_POLICY_NONE,
5828                 NR_SA_DISABLE_POLICY_WFC_ESTABLISHED,
5829                 NR_SA_DISABLE_POLICY_WFC_ESTABLISHED_WHEN_VONR_DISABLED,
5830                 NR_SA_DISABLE_POLICY_VOWIFI_REGISTERED
5831         })
5832         public @interface NrSaDisablePolicy {}
5833 
5834         /**
5835          * Do not disables NR SA mode.
5836          * @hide
5837          */
5838         public static final int NR_SA_DISABLE_POLICY_NONE = 0;
5839 
5840         /**
5841          * Disables NR SA mode when VoWiFi call is established in order to improve the delay or
5842          * voice mute when the handover from ePDG to NR is not supported in UE or network.
5843          * @hide
5844          */
5845         public static final int NR_SA_DISABLE_POLICY_WFC_ESTABLISHED = 1;
5846 
5847         /**
5848          * Disables NR SA mode when VoWiFi call is established when VoNR is disabled in order to
5849          * improve the delay or voice mute when the handover from ePDG to NR is not supported
5850          * in UE or network.
5851          * @hide
5852          */
5853         public static final int NR_SA_DISABLE_POLICY_WFC_ESTABLISHED_WHEN_VONR_DISABLED = 2;
5854 
5855         /**
5856          * Disables NR SA mode when IMS is registered over WiFi in order to improve the delay or
5857          * voice mute when the handover from ePDG to NR is not supported in UE or network.
5858          * @hide
5859          */
5860         public static final int NR_SA_DISABLE_POLICY_VOWIFI_REGISTERED = 3;
5861 
5862         /**
5863          * This specifies whether the carrier support the global number format or not.
5864          * {@link SubscriptionManager#getPhoneNumber(int)},
5865          * {@link SubscriptionManager#getPhoneNumber(int, int)} with
5866          * {@link SubscriptionManager#PHONE_NUMBER_SOURCE_IMS}
5867          * In order to provide the phone number to the APIs, the framework extracts the phone
5868          * number from the message received from the carrier server. If the carrier does not use
5869          * global number format, the framework could not provide phone number.
5870          * <p>
5871          * If not set or set to false value, the framework handle only global number format URI.
5872          * @hide
5873          */
5874         public static final String KEY_ALLOW_NON_GLOBAL_PHONE_NUMBER_FORMAT_BOOL =
5875                 KEY_PREFIX + "allow_non_global_phone_number_format_bool";
5876 
Ims()5877         private Ims() {}
5878 
getDefaults()5879         private static PersistableBundle getDefaults() {
5880             PersistableBundle defaults = new PersistableBundle();
5881             defaults.putInt(KEY_WIFI_OFF_DEFERRING_TIME_MILLIS_INT, 4000);
5882             defaults.putBoolean(KEY_IMS_SINGLE_REGISTRATION_REQUIRED_BOOL, false);
5883             defaults.putBoolean(KEY_ENABLE_PRESENCE_PUBLISH_BOOL, false);
5884             defaults.putStringArray(KEY_PUBLISH_SERVICE_DESC_FEATURE_TAG_MAP_OVERRIDE_STRING_ARRAY,
5885                     new String[0]);
5886             defaults.putBoolean(KEY_ENABLE_PRESENCE_CAPABILITY_EXCHANGE_BOOL, false);
5887             defaults.putBoolean(KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL, false);
5888             defaults.putBoolean(KEY_ENABLE_PRESENCE_GROUP_SUBSCRIBE_BOOL, false);
5889             defaults.putBoolean(KEY_USE_SIP_URI_FOR_PRESENCE_SUBSCRIBE_BOOL, false);
5890             defaults.putInt(KEY_NON_RCS_CAPABILITIES_CACHE_EXPIRATION_SEC_INT, 30 * 24 * 60 * 60);
5891             defaults.putBoolean(KEY_RCS_REQUEST_FORBIDDEN_BY_SIP_489_BOOL, false);
5892             defaults.putLong(KEY_RCS_REQUEST_RETRY_INTERVAL_MILLIS_LONG, 20 * 60 * 1000);
5893             defaults.putStringArray(KEY_RCS_FEATURE_TAG_ALLOWED_STRING_ARRAY, new String[]{
5894                     "+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gpp-service.ims.icsi.oma.cpm.msg\"",
5895                     "+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gpp-service.ims.icsi.oma.cpm.largemsg\"",
5896                     "+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gpp-service.ims.icsi.oma.cpm.deferred\"",
5897                     "+g.gsma.rcs.cpm.pager-large",
5898                     "+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gpp-service.ims.icsi.oma.cpm.session\"",
5899                     "+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gpp-service.ims.icsi.oma.cpm.filetransfer\"",
5900                     "+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.rcs.fthttp\"",
5901                     "+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.rcs.ftsms\"",
5902                     "+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-service.ims.icsi.gsma.callcomposer\"",
5903                     "+g.gsma.callcomposer",
5904                     "+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gpp-service.ims.icsi.gsma.callunanswered\"",
5905                     "+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gpp-service.ims.icsi.gsma.sharedmap\"",
5906                     "+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gpp-service.ims.icsi.gsma.sharedsketch\"",
5907                     "+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.rcs.geopush\"",
5908                     "+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.rcs.geosms\"",
5909                     "+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.rcs.chatbot\"",
5910                     "+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.rcs.chatbot.sa\"",
5911                     "+g.gsma.rcs.botversion=\"#=1,#=2\"",
5912                     "+g.gsma.rcs.cpimext"});
5913 
5914             /**
5915              * @see #KEY_MMTEL_REQUIRES_PROVISIONING_BUNDLE
5916              */
5917             defaults.putPersistableBundle(
5918                     KEY_MMTEL_REQUIRES_PROVISIONING_BUNDLE, new PersistableBundle());
5919             /**
5920              * @see #KEY_RCS_REQUIRES_PROVISIONING_BUNDLE
5921              */
5922             defaults.putPersistableBundle(
5923                     KEY_RCS_REQUIRES_PROVISIONING_BUNDLE, new PersistableBundle());
5924 
5925             defaults.putBoolean(KEY_GRUU_ENABLED_BOOL, false);
5926             defaults.putBoolean(KEY_SIP_OVER_IPSEC_ENABLED_BOOL, true);
5927             defaults.putBoolean(KEY_KEEP_PDN_UP_IN_NO_VOPS_BOOL, false);
5928             defaults.putBoolean(KEY_REGISTRATION_EVENT_PACKAGE_SUPPORTED_BOOL, true);
5929 
5930             defaults.putInt(KEY_SIP_TIMER_T1_MILLIS_INT, 2000);
5931             defaults.putInt(KEY_SIP_TIMER_T2_MILLIS_INT, 16000);
5932             defaults.putInt(KEY_SIP_TIMER_T4_MILLIS_INT, 17000);
5933             defaults.putInt(KEY_SIP_TIMER_B_MILLIS_INT, 128000);
5934             defaults.putInt(KEY_SIP_TIMER_C_MILLIS_INT, 210000);
5935             defaults.putInt(KEY_SIP_TIMER_D_MILLIS_INT, 130000);
5936             defaults.putInt(KEY_SIP_TIMER_F_MILLIS_INT, 128000);
5937             defaults.putInt(KEY_SIP_TIMER_H_MILLIS_INT, 128000);
5938             defaults.putInt(KEY_SIP_TIMER_J_MILLIS_INT, 128000);
5939             defaults.putInt(KEY_SIP_SERVER_PORT_NUMBER_INT, 5060);
5940             defaults.putInt(KEY_REQUEST_URI_TYPE_INT, REQUEST_URI_FORMAT_TEL);
5941             defaults.putInt(KEY_SIP_PREFERRED_TRANSPORT_INT, PREFERRED_TRANSPORT_DYNAMIC_UDP_TCP);
5942             defaults.putInt(KEY_IPV4_SIP_MTU_SIZE_CELLULAR_INT, 1500);
5943             defaults.putInt(KEY_IPV6_SIP_MTU_SIZE_CELLULAR_INT, 1500);
5944             defaults.putInt(KEY_REGISTRATION_EXPIRY_TIMER_SEC_INT, 600000);
5945             defaults.putInt(KEY_REGISTRATION_RETRY_BASE_TIMER_MILLIS_INT, 30000);
5946             defaults.putInt(KEY_REGISTRATION_RETRY_MAX_TIMER_MILLIS_INT, 1800000);
5947             defaults.putInt(KEY_REGISTRATION_SUBSCRIBE_EXPIRY_TIMER_SEC_INT, 600000);
5948             defaults.putInt(KEY_NR_SA_DISABLE_POLICY_INT, NR_SA_DISABLE_POLICY_NONE);
5949 
5950             defaults.putIntArray(
5951                     KEY_IPSEC_AUTHENTICATION_ALGORITHMS_INT_ARRAY,
5952                     new int[] {
5953                         IPSEC_AUTHENTICATION_ALGORITHM_HMAC_MD5,
5954                         IPSEC_AUTHENTICATION_ALGORITHM_HMAC_SHA1
5955                     });
5956             defaults.putIntArray(
5957                     KEY_IPSEC_ENCRYPTION_ALGORITHMS_INT_ARRAY,
5958                     new int[] {
5959                         IPSEC_ENCRYPTION_ALGORITHM_NULL,
5960                         IPSEC_ENCRYPTION_ALGORITHM_DES_EDE3_CBC,
5961                         IPSEC_ENCRYPTION_ALGORITHM_AES_CBC
5962                     });
5963             defaults.putIntArray(
5964                     KEY_IMS_PDN_ENABLED_IN_NO_VOPS_SUPPORT_INT_ARRAY,
5965                     new int[] {
5966                     });
5967             defaults.putIntArray(
5968                     KEY_GEOLOCATION_PIDF_IN_SIP_REGISTER_SUPPORT_INT_ARRAY,
5969                     new int[] {
5970                         GEOLOCATION_PIDF_FOR_EMERGENCY_ON_WIFI
5971                     });
5972             defaults.putIntArray(
5973                     KEY_GEOLOCATION_PIDF_IN_SIP_INVITE_SUPPORT_INT_ARRAY,
5974                     new int[] {
5975                         GEOLOCATION_PIDF_FOR_EMERGENCY_ON_WIFI
5976                     });
5977             defaults.putIntArray(
5978                     KEY_SUPPORTED_RATS_INT_ARRAY,
5979                     new int[] {
5980                         AccessNetworkType.NGRAN,
5981                         AccessNetworkType.EUTRAN,
5982                         AccessNetworkType.IWLAN
5983                     });
5984 
5985             defaults.putString(KEY_PHONE_CONTEXT_DOMAIN_NAME_STRING, "");
5986             defaults.putString(KEY_IMS_USER_AGENT_STRING,
5987                                "#MANUFACTURER#_#MODEL#_Android#AV#_#BUILD#");
5988 
5989             defaults.putBoolean(KEY_ALLOW_NON_GLOBAL_PHONE_NUMBER_FORMAT_BOOL, false);
5990 
5991             return defaults;
5992         }
5993     }
5994 
5995     /**
5996      * IMS Voice configs. This groups the configs required for IMS Voice - VoNR/VoLTE
5997      *
5998      * <p>Reference: IR.92
5999      */
6000     public static final class ImsVoice {
ImsVoice()6001         private ImsVoice() {}
6002 
6003         /** Prefix of all imsvoice.KEY_* constants. */
6004         public static final String KEY_PREFIX = "imsvoice.";
6005 
6006         /**
6007          * Flag specifying whether VoLTE should be available when on
6008          * roaming network.
6009          *
6010          * <p>If {@code false}: hard disabled.
6011          * If {@code true}: then depends on availability, etc.
6012          */
6013         public static final String KEY_CARRIER_VOLTE_ROAMING_AVAILABLE_BOOL =
6014                 KEY_PREFIX + "carrier_volte_roaming_available_bool";
6015 
6016         /**
6017          * Flag specifying whether to send vertical caller id service codes
6018          * (*67 and *82) in the dialed string in the SIP:INVITE.
6019          *
6020          * <p>If {@code true}, vertical caller id service codes *67 and *82
6021          * will be sent in the dialed string in the SIP:INVITE.
6022          * If {@code false}, *67 and *82 will be removed.
6023          */
6024         public static final String KEY_INCLUDE_CALLER_ID_SERVICE_CODES_IN_SIP_INVITE_BOOL =
6025                 KEY_PREFIX + "include_caller_id_service_codes_in_sip_invite_bool";
6026 
6027         /**
6028          * Flag indicating whether Multi-end point setting is enabled or not.
6029          */
6030         public static final String KEY_MULTIENDPOINT_SUPPORTED_BOOL =
6031                 KEY_PREFIX + "multiendpoint_supported_bool";
6032 
6033         /**
6034          * Flag indicating whether Supported header field with the option tag
6035          *  'timer' is enabled or not.
6036          *
6037          * <p>If {@code true}, session timer support is available.{@code false} otherwise.
6038          *
6039          * Reference: RFC 4028 Section 3
6040          */
6041         public static final String KEY_SESSION_TIMER_SUPPORTED_BOOL =
6042                 KEY_PREFIX + "session_timer_supported_bool";
6043 
6044         /**
6045          * Session-expires header field expressed in seconds as per
6046          * RFC 4028 Section 3.
6047          *
6048          * <p>This establishes the upper bound for the session refresh interval.
6049          */
6050         public static final String KEY_SESSION_EXPIRES_TIMER_SEC_INT =
6051                 KEY_PREFIX + "session_expires_timer_sec_int";
6052 
6053         /**
6054          * Indicates the minimum value for the session interval in seconds.
6055          * Represented as min-SE header field as per RFC 4028 Section 3.
6056          *
6057          * <p>This establishes the lower bound for the session refresh interval.
6058          */
6059         public static final String KEY_MINIMUM_SESSION_EXPIRES_TIMER_SEC_INT =
6060                 KEY_PREFIX + "minimum_session_expires_timer_sec_int";
6061 
6062         /** @hide */
6063         @IntDef({
6064             SESSION_REFRESHER_TYPE_UNKNOWN,
6065             SESSION_REFRESHER_TYPE_UAC,
6066             SESSION_REFRESHER_TYPE_UAS
6067         })
6068         public @interface SessionRefresherType {}
6069 
6070         /**
6071          * Session Refresher entity is unknown. This means UE does not include the
6072          * "refresher" parameter in the Session-Expires header field of
6073          * the SIP INVITE request.
6074          */
6075         public static final int SESSION_REFRESHER_TYPE_UNKNOWN = 0;
6076 
6077         /**
6078          * Session Refresher entity is User Agent Client (UAC).
6079          *
6080          * <p>Type of "refresher" parameter in the Session-Expires header field
6081          * of the SIP INVITE request is UAC.
6082          */
6083         public static final int SESSION_REFRESHER_TYPE_UAC = 1;
6084 
6085         /**
6086          * Session Refresher entity is User Agent Server (UAS).
6087          *
6088          * <p>Type of "refresher" parameter in the Session-Expires header field
6089          * of the SIP INVITE request is UAS.
6090          */
6091         public static final int SESSION_REFRESHER_TYPE_UAS = 2;
6092 
6093         /**
6094          * Session Refresher entity as per RFC 4028 and IR.92 Section 2.2.8.
6095          *
6096          * <p>This determines,
6097          * a) whether to include the "refresher" parameter
6098          * b) Type of refresher" parameter
6099          * in the Session-Expires header field of the SIP INVITE request.
6100          *
6101          * <p>Possible values are,
6102          * {@link #SESSION_REFRESHER_TYPE_UNKNOWN},
6103          * {@link #SESSION_REFRESHER_TYPE_UAC},
6104          * {@link #SESSION_REFRESHER_TYPE_UAS}
6105          */
6106         public static final String KEY_SESSION_REFRESHER_TYPE_INT =
6107                 KEY_PREFIX + "session_refresher_type_int";
6108 
6109         /** @hide */
6110         @IntDef({
6111             SESSION_PRIVACY_TYPE_HEADER,
6112             SESSION_PRIVACY_TYPE_NONE,
6113             SESSION_PRIVACY_TYPE_ID
6114         })
6115         public @interface SessionPrivacyType {}
6116 
6117         /**
6118          * Session privacy type is HEADER as per RFC 3323 Section 4.2.
6119          */
6120         public static final int SESSION_PRIVACY_TYPE_HEADER = 0;
6121 
6122         /**
6123          * Session privacy type is NONE as per RFC 3323 Section 4.2.
6124          */
6125         public static final int SESSION_PRIVACY_TYPE_NONE = 1;
6126 
6127         /**
6128          * Session privacy type is ID as per RFC 3325 Section 9.3.
6129          */
6130         public static final int SESSION_PRIVACY_TYPE_ID = 2;
6131 
6132         /**
6133          * Specify the session privacy type.
6134          *
6135          * <p>Reference: RFC 3323 Section 4.2, RFC 3325 Section 9.3.
6136          *
6137          * <p>Possible values are,
6138          * {@link #SESSION_PRIVACY_TYPE_HEADER},
6139          * {@link #SESSION_PRIVACY_TYPE_NONE},
6140          * {@link #SESSION_PRIVACY_TYPE_ID}
6141          */
6142         public static final String KEY_SESSION_PRIVACY_TYPE_INT =
6143                 KEY_PREFIX + "session_privacy_type_int";
6144 
6145         /**
6146          * Flag indicating whether PRACK must be enabled for all 18x messages.
6147          *
6148          * <p>If {@code false}, only 18x responses with SDP are sent reliably.
6149          * If {@code true},  SIP 18x responses (other than SIP 183 response)
6150          * are sent reliably.
6151          */
6152         public static final String KEY_PRACK_SUPPORTED_FOR_18X_BOOL =
6153                 KEY_PREFIX + "prack_supported_for_18x_bool";
6154 
6155         /** @hide */
6156         @IntDef({
6157             CONFERENCE_SUBSCRIBE_TYPE_IN_DIALOG,
6158             CONFERENCE_SUBSCRIBE_TYPE_OUT_OF_DIALOG
6159         })
6160         public @interface ConferenceSubscribeType {}
6161 
6162         /**
6163          * The SIP SUBSCRIBE to conference state events is sent in the
6164          * SIP INVITE dialog between the UE and the conference server.
6165          *
6166          * <p>Reference: IR.92 Section 2.3.3.
6167          */
6168         public static final int CONFERENCE_SUBSCRIBE_TYPE_IN_DIALOG = 0;
6169 
6170         /**
6171          * The SIP SUBSCRIBE to conference state events is sent out of
6172          * the SIP INVITE dialog between the UE and the conference server.
6173          *
6174          * <p>Reference: IR.92 Section 2.3.3.
6175          */
6176         public static final int CONFERENCE_SUBSCRIBE_TYPE_OUT_OF_DIALOG = 1;
6177 
6178         /**
6179          * This is used to specify whether the SIP SUBSCRIBE to conference state events,
6180          * is sent in or out of the SIP INVITE dialog between the UE and the
6181          * conference server.
6182          *
6183          * <p>Reference: IR.92 Section 2.3.3.
6184          *
6185          * <p>Possible values are,
6186          * {@link #CONFERENCE_SUBSCRIBE_TYPE_IN_DIALOG},
6187          * {@link #CONFERENCE_SUBSCRIBE_TYPE_OUT_OF_DIALOG}
6188          *
6189          * An empty array indicates SUBSCRIBE to conference event package
6190          * is not required.
6191          */
6192         public static final String KEY_CONFERENCE_SUBSCRIBE_TYPE_INT =
6193                 KEY_PREFIX + "conference_subscribe_type_int";
6194 
6195         /**
6196          * Flag specifying whether QoS preconditions are supported during call setup.
6197          *
6198          * <p>If {@code true}: QoS Preconditions are supported during call setup and
6199          * 'precondition' tag is included in the SIP INVITE header and precondition
6200          * parameters are sent in SDP as required.
6201          * <p>If {@code false}: QoS Preconditions are not supported during call setup.
6202          *
6203          * <p>Reference: 3GPP TS 24.229
6204          */
6205         public static final String KEY_VOICE_QOS_PRECONDITION_SUPPORTED_BOOL =
6206                 KEY_PREFIX + "voice_qos_precondition_supported_bool";
6207 
6208         /**
6209          * Flag specifying whether voice is allowed on default bearer.
6210          *
6211          * <p>If {@code true}: voice packets can be sent on default bearer. {@code false} otherwise.
6212          */
6213         public static final String KEY_VOICE_ON_DEFAULT_BEARER_SUPPORTED_BOOL =
6214                 KEY_PREFIX + "voice_on_default_bearer_supported_bool";
6215 
6216         /**
6217          * Specifies the dedicated bearer wait time during call establishment.
6218          *
6219          * <p>If dedicated bearer is not established within this time and if
6220          * {@link #KEY_VOICE_ON_DEFAULT_BEARER_SUPPORTED_BOOL} is false, then call setup would fail.
6221          * <p>If dedicated bearer is not established within this time and if
6222          * {@link #KEY_VOICE_ON_DEFAULT_BEARER_SUPPORTED_BOOL} is true, then the media is allowed
6223          * on default bearer.
6224          */
6225         public static final String KEY_DEDICATED_BEARER_WAIT_TIMER_MILLIS_INT =
6226                 KEY_PREFIX + "dedicated_bearer_wait_timer_millis_int";
6227 
6228         /** @hide */
6229         @IntDef({
6230             BASIC_SRVCC_SUPPORT,
6231             ALERTING_SRVCC_SUPPORT,
6232             PREALERTING_SRVCC_SUPPORT,
6233             MIDCALL_SRVCC_SUPPORT
6234         })
6235         public @interface SrvccType {}
6236 
6237         /**
6238          * Indicates support for basic SRVCC, typically 1 active call
6239          * as detailed in IR.92 Section A.3.
6240          */
6241         public static final int BASIC_SRVCC_SUPPORT = 0;
6242 
6243         /**
6244          * SRVCC access transfer for calls in alerting phase as per 3GPP 24.237
6245          * and IR.64 Section 4.4.
6246          * Media feature tag used: g.3gpp.srvcc-alerting.
6247          */
6248         public static final int ALERTING_SRVCC_SUPPORT = 1;
6249 
6250         /**
6251          * SRVCC access transfer for calls in pre-alerting phase as per 3GPP 24.237.
6252          * Media feature tag used: g.3gpp.ps2cs-srvcc-orig-pre-alerting.
6253          */
6254         public static final int PREALERTING_SRVCC_SUPPORT = 2;
6255 
6256         /**
6257          * SRVCC access transfer for calls in mid-call phase as per 3GPP 24.237.
6258          * and IR.64 Section 4.4.
6259          * <p>This means UE supports the MSC server assisted mid-call feature.
6260          * Media feature tag used: g.3gpp.mid-call.
6261          */
6262         public static final int MIDCALL_SRVCC_SUPPORT = 3;
6263 
6264         /**
6265          * List of different SRVCC types supported as defined in 3GPP 24.237.
6266          *
6267          * <p> Possible values are,
6268          * {@link #BASIC_SRVCC_SUPPORT},
6269          * {@link #ALERTING_SRVCC_SUPPORT},
6270          * {@link #PREALERTING_SRVCC_SUPPORT},
6271          * {@link #MIDCALL_SRVCC_SUPPORT}
6272          *
6273          * <p> Reference: IR.64, 3GPP 24.237, 3GPP 23.216
6274          */
6275         public static final String KEY_SRVCC_TYPE_INT_ARRAY =
6276                 KEY_PREFIX + "srvcc_type_int_array";
6277 
6278         /**
6279          * Specifies the ringing timer for Mobile terminated calls.
6280          *
6281          * <p>Ringing timer starts when the device sends SIP 180 Ringing in
6282          * response to a received SIP INVITE. If Ringing timer expires,
6283          * the device sends SIP 486 response.
6284          */
6285         public static final String KEY_RINGING_TIMER_MILLIS_INT =
6286                 KEY_PREFIX + "ringing_timer_millis_int";
6287 
6288         /**
6289          * Specifies the ringback timer for Mobile originated calls.
6290          *
6291          * <p>Ringback timer starts when the device receives SIP 180 Ringing
6292          * in response to its SIP INVITE. If Ringback timer expires,
6293          * the device sends SIP CANCEL.
6294          */
6295         public static final String KEY_RINGBACK_TIMER_MILLIS_INT =
6296                 KEY_PREFIX + "ringback_timer_millis_int";
6297 
6298         /**
6299          * Specifies the timeout value for RTP inactivity for audio media.
6300          * <p>On timer expiry, call will end.
6301          * See {@link #KEY_AUDIO_INACTIVITY_CALL_END_REASONS_INT_ARRAY} for more
6302          * details.
6303          * <p> Value of 0 means this timer is not enabled.
6304          */
6305         public static final String KEY_AUDIO_RTP_INACTIVITY_TIMER_MILLIS_INT =
6306                 KEY_PREFIX + "audio_rtp_inactivity_timer_millis_int";
6307 
6308         /**
6309          * Specifies the timeout value for RTCP inactivity for audio media.
6310          * <p>On timer expiry, call will end.
6311          * See {@link #KEY_AUDIO_INACTIVITY_CALL_END_REASONS_INT_ARRAY} for more
6312          * details.
6313          * <p> Value of 0 means this timer is not enabled.
6314          */
6315         public static final String KEY_AUDIO_RTCP_INACTIVITY_TIMER_MILLIS_INT =
6316                 KEY_PREFIX + "audio_rtcp_inactivity_timer_millis_int";
6317 
6318         /**
6319          * Used to specify the conference factory URI.
6320          *
6321          * <p>If this is empty, then conference URI is generated from MCC/MNC as
6322          * specified in clause 13.10 of 3GPP 23.003.
6323          */
6324         public static final String KEY_CONFERENCE_FACTORY_URI_STRING =
6325                 KEY_PREFIX + "conference_factory_uri_string";
6326 
6327         /** @hide */
6328         @IntDef({
6329             SESSION_REFRESH_METHOD_INVITE,
6330             SESSION_REFRESH_METHOD_UPDATE_PREFERRED
6331         })
6332         public @interface SessionRefreshMethod {}
6333 
6334         /**
6335          * SIP INVITE is used for Session Refresh
6336          */
6337         public static final int SESSION_REFRESH_METHOD_INVITE = 0;
6338 
6339         /**
6340          * Both SIP INVITE and UPDATE are used for session refresh.
6341          *
6342          * <p>SIP UPDATE will be used if UPDATE is in 'Allow' header.
6343          * If UPDATE is not in 'Allow' header, then INVITE will be used.
6344          */
6345         public static final int SESSION_REFRESH_METHOD_UPDATE_PREFERRED = 1;
6346 
6347         /**
6348          * This is used to specify the method used for session refresh.
6349          *
6350          * <p>Possible values are,
6351          * {@link #SESSION_REFRESH_METHOD_INVITE},
6352          * {@link #SESSION_REFRESH_METHOD_UPDATE_PREFERRED}
6353          */
6354         public static final String KEY_SESSION_REFRESH_METHOD_INT =
6355                 KEY_PREFIX + "session_refresh_method_int";
6356 
6357         /**
6358          * Flag specifying whether the 'From' header field is used for determination of
6359          * the originating party identity in Originating Identification Presentation(OIP)
6360          * service.
6361          *
6362          * <p>If {@code true}: Indicates that the 'From' header field is used for
6363          * determination of the originating party identity in OIP.
6364          * {@code false} otherwise.
6365          */
6366         public static final String KEY_OIP_SOURCE_FROM_HEADER_BOOL =
6367                 KEY_PREFIX + "oip_source_from_header_bool";
6368 
6369         /**
6370          * Specifies the timer value for INVITE to the first 1xx response
6371          * (including 100 trying). If no response is received at timer expiry,
6372          * call is redialed over CS.
6373          *
6374          * <p> Reference: 24.173 Table L.1
6375          */
6376         public static final String KEY_MO_CALL_REQUEST_TIMEOUT_MILLIS_INT =
6377                 KEY_PREFIX + "mo_call_request_timeout_millis_int";
6378 
6379         /**
6380          * List of various reasons of media inactivity for which
6381          * voice/emergency call will end.
6382          *
6383          * <p>Possible values are,
6384          * {@link Ims#RTCP_INACTIVITY_ON_HOLD},
6385          * {@link Ims#RTCP_INACTIVITY_ON_CONNECTED},
6386          * {@link Ims#RTP_INACTIVITY_ON_CONNECTED}
6387          * {@link Ims#E911_RTCP_INACTIVITY_ON_CONNECTED},
6388          * {@link Ims#E911_RTP_INACTIVITY_ON_CONNECTED}
6389          */
6390         public static final String KEY_AUDIO_INACTIVITY_CALL_END_REASONS_INT_ARRAY =
6391                 KEY_PREFIX + "audio_inactivity_call_end_reasons_int_array";
6392 
6393         /**
6394          * Specifies the AS (Application Specific) SDP modifier for audio media.
6395          *
6396          * <p>This value is expressed in kilobits per second.
6397          * Reference: RFC 3556 Section 2.
6398          */
6399         public static final String KEY_AUDIO_AS_BANDWIDTH_KBPS_INT =
6400                 KEY_PREFIX + "audio_as_bandwidth_kbps_int";
6401 
6402         /**
6403          * Specifies the RS SDP modifier for audio media. This indicates the RTCP
6404          * bandwidth allocated to active data senders for audio media.
6405          *
6406          * <p>This value is expressed in bits per second.
6407          * Reference: RFC 3556 Section 2.
6408          */
6409         public static final String KEY_AUDIO_RS_BANDWIDTH_BPS_INT =
6410                 KEY_PREFIX + "audio_rs_bandwidth_bps_int";
6411 
6412         /**
6413          * Specifies the RR SDP modifier for audio media. This indicates the RTCP
6414          * bandwidth allocated to receivers for audio media.
6415          *
6416          * <p>This value is expressed in bits per second.
6417          * Reference: RFC 3556 Section 2.
6418          */
6419         public static final String KEY_AUDIO_RR_BANDWIDTH_BPS_INT =
6420                 KEY_PREFIX + "audio_rr_bandwidth_bps_int";
6421 
6422         /**
6423          * Specifies the Audio Codec capability. This contains a list of payload types
6424          * representing different audio codec instances.
6425          *
6426          * <p> The priority of the codecs is EVS, AMRWB, AMRNB,  DTMF WB, DTMF NB
6427          * from highest to lowest. In each individual codec, the priority is determined
6428          * by the order of the payload types from highest to lowest.
6429          *
6430          * <p>Possible keys in this bundle are,
6431          * <UL>
6432          *     <LI>{@link #KEY_EVS_PAYLOAD_TYPE_INT_ARRAY}</LI>
6433          *     <LI>{@link #KEY_AMRWB_PAYLOAD_TYPE_INT_ARRAY}</LI>
6434          *     <LI>{@link #KEY_AMRNB_PAYLOAD_TYPE_INT_ARRAY}</LI>
6435          *     <LI>{@link #KEY_DTMFWB_PAYLOAD_TYPE_INT_ARRAY}</LI>
6436          *     <LI>{@link #KEY_DTMFNB_PAYLOAD_TYPE_INT_ARRAY}</LI>
6437          * </UL>
6438          * <p>To specify payload descriptions for each of the audio payload types, see
6439          * <UL>
6440          *     <LI>{@link #KEY_EVS_PAYLOAD_DESCRIPTION_BUNDLE}</LI>
6441          *     <LI>{@link #KEY_AMRNB_PAYLOAD_DESCRIPTION_BUNDLE}</LI>
6442          *     <LI>{@link #KEY_AMRWB_PAYLOAD_DESCRIPTION_BUNDLE}</LI>
6443          * </UL>
6444          */
6445         public static final String KEY_AUDIO_CODEC_CAPABILITY_PAYLOAD_TYPES_BUNDLE =
6446                 KEY_PREFIX + "audio_codec_capability_payload_types_bundle";
6447 
6448         /**
6449          * A list of integers representing the different payload types
6450          * in EVS codec in priority order from highest to lowest.
6451          * <p>Payload type is an integer in dynamic payload type range 96-127
6452          * as per RFC RFC 3551 Section 6.
6453          */
6454         public static final String KEY_EVS_PAYLOAD_TYPE_INT_ARRAY =
6455                 KEY_PREFIX + "evs_payload_type_int_array";
6456 
6457         /**
6458          * A list of integers representing the different payload types
6459          * in AMR-WB codec in priority order from highest to lowest.
6460          * <p>Payload type is an integer in dynamic payload type range 96-127
6461          * as per RFC RFC 3551 Section 6.
6462          */
6463         public static final String KEY_AMRWB_PAYLOAD_TYPE_INT_ARRAY =
6464                 KEY_PREFIX + "amrwb_payload_type_int_array";
6465 
6466         /**
6467          * A list of integers representing the different payload types
6468          * in AMR-NB codec in priority order from highest to lowest.
6469          * <p>Payload type is an integer in dynamic payload type range 96-127
6470          * as per RFC RFC 3551 Section 6.
6471          */
6472         public static final String KEY_AMRNB_PAYLOAD_TYPE_INT_ARRAY =
6473                 KEY_PREFIX + "amrnb_payload_type_int_array";
6474 
6475         /**
6476          * A list of integers representing the different payload types
6477          * in DTMF WB codec in priority order from highest to lowest.
6478          * <p>Payload type is an integer in dynamic payload type range 96-127
6479          * as per RFC RFC 3551 Section 6.
6480          */
6481         public static final String KEY_DTMFWB_PAYLOAD_TYPE_INT_ARRAY =
6482                 KEY_PREFIX + "dtmfwb_payload_type_int_array";
6483 
6484         /**
6485          * A list of integers representing the different payload types
6486          * in DTMF NB codec in priority order from highest to lowest.
6487          * <p>Payload type is an integer in dynamic payload type range 96-127
6488          * as per RFC RFC 3551 Section 6.
6489          */
6490         public static final String KEY_DTMFNB_PAYLOAD_TYPE_INT_ARRAY =
6491                 KEY_PREFIX + "dtmfnb_payload_type_int_array";
6492 
6493         /**
6494          * This indicates the threshold for RTP packet loss rate in percentage. If measured packet
6495          * loss rate crosses this, a callback with {@link MediaQualityStatus} will be invoked to
6496          * listeners.
6497          * See {@link android.telephony.TelephonyCallback.MediaQualityStatusChangedListener}
6498          *
6499          * <p/>
6500          * Valid threshold range : 0 ~ 100
6501          *
6502          * @hide
6503          */
6504         public static final String KEY_VOICE_RTP_PACKET_LOSS_RATE_THRESHOLD_INT =
6505                 KEY_PREFIX + "rtp_packet_loss_rate_threshold_int";
6506 
6507         /**
6508          * This indicates the threshold for RTP jitter value in milliseconds (RFC3550). If measured
6509          * jitter value crosses this, a callback with {@link MediaQualityStatus} will be invoked
6510          * to listeners.
6511          * See {@link android.telephony.TelephonyCallback.MediaQualityStatusChangedListener}
6512          *
6513          * <p/>
6514          * Valid threshold range : 0 ~ 10000
6515          *
6516          * @hide
6517          */
6518         public static final String KEY_VOICE_RTP_JITTER_THRESHOLD_MILLIS_INT =
6519                 KEY_PREFIX + "rtp_jitter_threshold_millis_int";
6520 
6521         /**
6522          * This indicates the threshold for RTP inactivity time in milliseconds. If measured
6523          * inactivity timer crosses this, a callback with {@link MediaQualityStatus} will be invoked
6524          * to listeners.
6525          * See {@link android.telephony.TelephonyCallback.MediaQualityStatusChangedListener}
6526          *
6527          * <p/>
6528          * Valid threshold range : 0 ~ 60000
6529          *
6530          * @hide
6531          */
6532         public static final String KEY_VOICE_RTP_INACTIVITY_TIME_THRESHOLD_MILLIS_LONG =
6533                 KEY_PREFIX + "rtp_inactivity_time_threshold_millis_long";
6534 
6535         /** @hide */
6536         @IntDef({
6537             BANDWIDTH_EFFICIENT,
6538             OCTET_ALIGNED
6539         })
6540         public @interface AmrPayloadFormat {}
6541 
6542         /** AMR NB/WB Payload format is bandwidth-efficient. */
6543         public static final int BANDWIDTH_EFFICIENT = 0;
6544 
6545         /** AMR NB/WB Payload format is octet-aligned. */
6546         public static final int OCTET_ALIGNED = 1;
6547 
6548         /**
6549          * Specifies the payload format of the AMR-NB/AMR-WB codec.
6550          *
6551          * <p>Possible values are,
6552          * {@link #BANDWIDTH_EFFICIENT},
6553          * {@link #OCTET_ALIGNED}
6554 
6555          * <p>If value is not specified, payload format is
6556          * {@link #BANDWIDTH_EFFICIENT}.
6557          *
6558          * <p>Reference: RFC 4867 Section 8.1.
6559          */
6560         public static final String KEY_AMR_CODEC_ATTRIBUTE_PAYLOAD_FORMAT_INT =
6561                 KEY_PREFIX + "amr_codec_attribute_payload_format_int";
6562 
6563         /**
6564          * Restricts the active mode set to a subset of all modes in the codec.
6565          *
6566          * <p>This attribute is optional. If value is set, then session mode
6567          * set is restricted to the modes specified in this list. If this value
6568          * is not specified, then all available modes in the codec are allowed.
6569          * This attribute is applicable for AMR-WB, AMR-NB,
6570          * and EVS codec (operating in AMR-WB IO Mode).
6571          *
6572          * <p>Possible values are subset of,
6573          * [0,1,2,3,4,5,6,7,8] - AMRWB with the modes representing nine speech codec modes
6574          * with bit rates of 6.6, 8.85, 12.65, 14.25,  15.85, 18.25, 19.85, 23.05, 23.85 kbps.
6575          * [0,1,2,3,4,5,6,7] - AMRNB with the modes representing eight speech codec modes
6576          * with bit rates of 4.75, 5.15, 5.90, 6.70, 7.40, 7.95, 10.2, 12.2 kbps.
6577          *
6578          * <p>If value is not specified, then it means device supports all
6579          * modes in the codec but not included in SDP.
6580          *
6581          * <p>Reference: RFC 4867 Section 8.1, 3GPP 26.445 A.3.1
6582          */
6583         public static final String KEY_AMR_CODEC_ATTRIBUTE_MODESET_INT_ARRAY =
6584                 KEY_PREFIX + "amr_codec_attribute_modeset_int_array";
6585 
6586         /**
6587          * Specifies the codec attributes of different payload types in
6588          * the AMR NarrowBand (AMR-NB) codec.
6589          *
6590          * <p> The keys in this bundle are payload types specified
6591          * in {@link #KEY_AMRNB_PAYLOAD_TYPE_INT_ARRAY}.
6592          *
6593          * <p>Codec attributes allowed as part of AMR-NB codec bundle are,
6594          * <UL>
6595          *     <LI>{@link #KEY_AMR_CODEC_ATTRIBUTE_PAYLOAD_FORMAT_INT}</LI>
6596          *     <LI>{@link #KEY_AMR_CODEC_ATTRIBUTE_MODESET_INT_ARRAY}</LI>
6597          * </UL>
6598          *
6599          * <p> If this bundle is not configured and AMRNB payload type is added
6600          * in {@link #KEY_AMRNB_PAYLOAD_TYPE_INT_ARRAY}, then default
6601          * values as in the individual codec attribute to be used
6602          * for that payload type.
6603          */
6604         public static final String KEY_AMRNB_PAYLOAD_DESCRIPTION_BUNDLE =
6605                 KEY_PREFIX + "amrnb_payload_description_bundle";
6606 
6607         /**
6608          * Specifies the codec attributes of different payload types in
6609          * the AMR WideBand (AMR-WB) codec.
6610          *
6611          * <p> The keys in this bundle are payload types specified
6612          * in {@link #KEY_AMRWB_PAYLOAD_TYPE_INT_ARRAY}.
6613          *
6614          * <p>Codec attributes allowed as part of AMR-NB codec bundle are,
6615          * <UL>
6616          *     <LI>{@link #KEY_AMR_CODEC_ATTRIBUTE_PAYLOAD_FORMAT_INT}</LI>
6617          *     <LI>{@link #KEY_AMR_CODEC_ATTRIBUTE_MODESET_INT_ARRAY}</LI>
6618          * </UL>
6619          *
6620          * <p> If this bundle is not configured and AMRWB payload type is added
6621          * in {@link #KEY_AMRWB_PAYLOAD_TYPE_INT_ARRAY}, then default
6622          * values as in the individual codec attribute to be used
6623          * for that payload type.
6624          */
6625         public static final String KEY_AMRWB_PAYLOAD_DESCRIPTION_BUNDLE =
6626                 KEY_PREFIX + "amrwb_payload_description_bundle";
6627 
6628         /** @hide */
6629         @IntDef({
6630             EVS_OPERATIONAL_MODE_PRIMARY,
6631             EVS_OPERATIONAL_MODE_AMRWB_IO
6632         })
6633         public @interface EvsOperationalMode {}
6634 
6635         /**  Indicates the EVS primary mode. 3GPP 26.445 Section 3.1 */
6636         public static final int EVS_OPERATIONAL_MODE_PRIMARY = 0;
6637 
6638         /** Indicates the EVS AMR-WB IO mode. 3GPP 26.445 Section 3.1 */
6639         public static final int EVS_OPERATIONAL_MODE_AMRWB_IO = 1;
6640 
6641         /**
6642          * Specifies if the EVS mode used is EVS primary mode
6643          * or EVS AMR-WB IO mode.
6644          *
6645          * <p>Possible values are,
6646          * {@link #EVS_OPERATIONAL_MODE_PRIMARY},
6647          * {@link #EVS_OPERATIONAL_MODE_AMRWB_IO}
6648          *
6649          * <p>If this is not present, then {@link #EVS_OPERATIONAL_MODE_PRIMARY} is used.
6650          * <p>Reference: 3GPP 26.445 Section 3.1.
6651          */
6652         public static final String KEY_EVS_CODEC_ATTRIBUTE_MODE_SWITCH_INT =
6653                 KEY_PREFIX + "evs_codec_attribute_mode_switch_int";
6654 
6655         /** @hide */
6656         @IntDef({
6657             EVS_ENCODED_BW_TYPE_NB,
6658             EVS_ENCODED_BW_TYPE_WB,
6659             EVS_ENCODED_BW_TYPE_SWB,
6660             EVS_ENCODED_BW_TYPE_FB,
6661             EVS_ENCODED_BW_TYPE_NB_WB,
6662             EVS_ENCODED_BW_TYPE_NB_WB_SWB,
6663             EVS_ENCODED_BW_TYPE_NB_WB_SWB_FB,
6664             EVS_ENCODED_BW_TYPE_WB_SWB,
6665             EVS_ENCODED_BW_TYPE_WB_SWB_FB
6666         })
6667         public @interface EvsEncodedBwType {}
6668 
6669         /**
6670          * EVS encoded Bandwidth is Narrow Band (NB).
6671          * Reference: 3GPP 26.441 Table 1.
6672          */
6673         public static final int EVS_ENCODED_BW_TYPE_NB = 0;
6674 
6675         /**
6676          * EVS encoded Bandwidth is Wide Band (WB).
6677          * Reference: 3GPP 26.441 Table 1.
6678          */
6679         public static final int EVS_ENCODED_BW_TYPE_WB = 1;
6680 
6681         /**
6682          * EVS encoded Bandwidth is Super WideBand (SWB).
6683          * Reference: 3GPP 26.441 Table 1.
6684          */
6685         public static final int EVS_ENCODED_BW_TYPE_SWB = 2;
6686 
6687         /**
6688          * EVS encoded Bandwidth is Full Band (FB).
6689          * Reference: 3GPP 26.441 Table 1.
6690          */
6691         public static final int EVS_ENCODED_BW_TYPE_FB = 3;
6692 
6693         /**
6694          * EVS encoded Bandwidth is in the range NB,WB.
6695          * Reference: 3GPP 26.441 Table 1.
6696          */
6697         public static final int EVS_ENCODED_BW_TYPE_NB_WB = 4;
6698 
6699         /**
6700          * EVS encoded Bandwidth is in the range NB,WB,SWB.
6701          * Reference: 3GPP 26.441 Table 1.
6702          */
6703         public static final int EVS_ENCODED_BW_TYPE_NB_WB_SWB = 5;
6704 
6705         /**
6706          * EVS encoded Bandwidth is in the range NB,WB,SWB,FB.
6707          * Reference: 3GPP 26.441 Table 1.
6708          */
6709         public static final int EVS_ENCODED_BW_TYPE_NB_WB_SWB_FB = 6;
6710 
6711         /**
6712          * EVS encoded Bandwidth is in the range WB,SWB.
6713          * Reference: 3GPP 26.441 Table 1.
6714          */
6715         public static final int EVS_ENCODED_BW_TYPE_WB_SWB = 7;
6716 
6717         /**
6718          * EVS encoded Bandwidth is in the range WB,SWB,FB.
6719          * Reference: 3GPP 26.441 Table 1.
6720          */
6721         public static final int EVS_ENCODED_BW_TYPE_WB_SWB_FB = 8;
6722 
6723         /**
6724          * Specifies the EVS codec encoding bandwidth options.
6725          *
6726          * Possible values are,
6727          * {@link #EVS_ENCODED_BW_TYPE_NB},
6728          * {@link #EVS_ENCODED_BW_TYPE_WB},
6729          * {@link #EVS_ENCODED_BW_TYPE_SWB},
6730          * {@link #EVS_ENCODED_BW_TYPE_FB},
6731          * {@link #EVS_ENCODED_BW_TYPE_NB_WB},
6732          * {@link #EVS_ENCODED_BW_TYPE_NB_WB_SWB},
6733          * {@link #EVS_ENCODED_BW_TYPE_NB_WB_SWB_FB},
6734          * {@link #EVS_ENCODED_BW_TYPE_WB_SWB},
6735          * {@link #EVS_ENCODED_BW_TYPE_WB_SWB_FB}
6736          *
6737          * If this key is not specified, then the behavior is same as
6738          * value {@link #EVS_ENCODED_BW_TYPE_NB_WB_SWB}
6739          *
6740          * <p>Reference: 3GPP 26.441 Table 1.
6741          */
6742         public static final String KEY_EVS_CODEC_ATTRIBUTE_BANDWIDTH_INT =
6743                 KEY_PREFIX + "evs_codec_attribute_bandwidth_int";
6744 
6745         /** @hide */
6746         @IntDef({
6747             EVS_PRIMARY_MODE_BITRATE_5_9_KBPS,
6748             EVS_PRIMARY_MODE_BITRATE_7_2_KBPS,
6749             EVS_PRIMARY_MODE_BITRATE_8_0_KBPS,
6750             EVS_PRIMARY_MODE_BITRATE_9_6_KBPS,
6751             EVS_PRIMARY_MODE_BITRATE_13_2_KBPS,
6752             EVS_PRIMARY_MODE_BITRATE_16_4_KBPS,
6753             EVS_PRIMARY_MODE_BITRATE_24_4_KBPS,
6754             EVS_PRIMARY_MODE_BITRATE_32_0_KBPS,
6755             EVS_PRIMARY_MODE_BITRATE_48_0_KBPS,
6756             EVS_PRIMARY_MODE_BITRATE_64_0_KBPS,
6757             EVS_PRIMARY_MODE_BITRATE_96_0_KBPS,
6758             EVS_PRIMARY_MODE_BITRATE_128_0_KBPS
6759         })
6760         public @interface EvsPrimaryModeBitRate {}
6761 
6762         /** EVS primary mode with bitrate 5.9 kbps */
6763         public static final int EVS_PRIMARY_MODE_BITRATE_5_9_KBPS = 0;
6764 
6765         /** EVS primary mode with bitrate 7.2 kbps */
6766         public static final int EVS_PRIMARY_MODE_BITRATE_7_2_KBPS = 1;
6767 
6768         /** EVS primary mode with bitrate 8.0 kbps */
6769         public static final int EVS_PRIMARY_MODE_BITRATE_8_0_KBPS = 2;
6770 
6771         /** EVS primary mode with bitrate 9.6 kbps */
6772         public static final int EVS_PRIMARY_MODE_BITRATE_9_6_KBPS = 3;
6773 
6774         /** EVS primary mode with bitrate 13.2 kbps */
6775         public static final int EVS_PRIMARY_MODE_BITRATE_13_2_KBPS = 4;
6776 
6777         /** EVS primary mode with bitrate 16.4 kbps */
6778         public static final int EVS_PRIMARY_MODE_BITRATE_16_4_KBPS = 5;
6779 
6780         /** EVS primary mode with bitrate 24.4 kbps */
6781         public static final int EVS_PRIMARY_MODE_BITRATE_24_4_KBPS = 6;
6782 
6783         /** EVS primary mode with bitrate 32.0 kbps */
6784         public static final int EVS_PRIMARY_MODE_BITRATE_32_0_KBPS = 7;
6785 
6786         /** EVS primary mode with bitrate 48.0 kbps */
6787         public static final int EVS_PRIMARY_MODE_BITRATE_48_0_KBPS = 8;
6788 
6789         /** EVS primary mode with bitrate 64.0 kbps */
6790         public static final int EVS_PRIMARY_MODE_BITRATE_64_0_KBPS = 9;
6791 
6792         /** EVS primary mode with bitrate 96.0 kbps */
6793         public static final int EVS_PRIMARY_MODE_BITRATE_96_0_KBPS = 10;
6794 
6795         /** EVS primary mode with bitrate 128.0 kbps */
6796         public static final int EVS_PRIMARY_MODE_BITRATE_128_0_KBPS = 11;
6797 
6798         /**
6799          * Specifies the range of source codec bit-rate for EVS Primary mode
6800          * in the session. This is expressed in kilobits per second and
6801          * applicable for both the send and the receive directions.
6802          *
6803          * <p>The range is specified as integer aray of size 2,
6804          * represented as [low, high], where low <= high
6805          *
6806          * <p>Possible values for low and high are,
6807          * {@link #EVS_PRIMARY_MODE_BITRATE_5_9_KBPS},
6808          * {@link #EVS_PRIMARY_MODE_BITRATE_7_2_KBPS},
6809          * {@link #EVS_PRIMARY_MODE_BITRATE_8_0_KBPS},
6810          * {@link #EVS_PRIMARY_MODE_BITRATE_9_6_KBPS},
6811          * {@link #EVS_PRIMARY_MODE_BITRATE_13_2_KBPS},
6812          * {@link #EVS_PRIMARY_MODE_BITRATE_16_4_KBPS},
6813          * {@link #EVS_PRIMARY_MODE_BITRATE_24_4_KBPS},
6814          * {@link #EVS_PRIMARY_MODE_BITRATE_32_0_KBPS},
6815          * {@link #EVS_PRIMARY_MODE_BITRATE_48_0_KBPS},
6816          * {@link #EVS_PRIMARY_MODE_BITRATE_64_0_KBPS},
6817          * {@link #EVS_PRIMARY_MODE_BITRATE_96_0_KBPS},
6818          * {@link #EVS_PRIMARY_MODE_BITRATE_128_0_KBPS}
6819          *
6820          * If this key is not specified, then the behavior is same as
6821          * value {@link #EVS_PRIMARY_MODE_BITRATE_24_4_KBPS}
6822          *
6823          * <p>Reference: 3GPP 26.445 Section A.3.1
6824          */
6825         public static final String KEY_EVS_CODEC_ATTRIBUTE_BITRATE_INT_ARRAY =
6826                 KEY_PREFIX + "evs_codec_attribute_bitrate_int_array";
6827 
6828         /**
6829          * Specifies the Channel aware mode (ch-aw-recv) for the receive direction.
6830          * This is applicable for EVS codec.
6831          *
6832          * <p> Permissible values are -1, 0, 2, 3, 5, and 7.
6833          * If this key is not specified, then the behavior is same as value 0
6834          * (channel aware mode disabled).
6835          * <p> If this key is configured, then device is expected to send
6836          * this parameter in the SDP offer.
6837          *
6838          * <p>Reference: 3GPP TS 26.445 section 4.4.5, 3GPP 26.445 Section A.3.1
6839          */
6840         public static final String KEY_EVS_CODEC_ATTRIBUTE_CH_AW_RECV_INT =
6841                 KEY_PREFIX + "evs_codec_attribute_ch_aw_recv_int";
6842 
6843         /**
6844          * Specifies whether to limit the session to header-full format.
6845          * This applies to both directions in the session. This attribute
6846          * is applicable for EVS codec.
6847          *
6848          * <p>Permissible values are 0, 1
6849          * If hf-only is 1, only Header-Full format is used and hf-only is
6850          * included in the SDP.
6851          * <p>If hf-only is 0, both Compact and Header-Full formats are used
6852          * and hf-only is included in the SDP.
6853          * <p>If this key is not present, then both Compact
6854          * and Header-Full formats are used and hf-only is not included in
6855          * the SDP.
6856          * <p> If this key is configured, then device is expected to send
6857          * this parameter in the SDP offer if operator required it.
6858          *
6859          * <p>Reference: 3GPP 26.445 Section A.3.1.
6860          */
6861         public static final String KEY_EVS_CODEC_ATTRIBUTE_HF_ONLY_INT =
6862                 KEY_PREFIX + "evs_codec_attribute_hf_only_int";
6863 
6864         /**
6865          * Specifies whether DTX (Discontinuous transmission) is enabled
6866          * or not. This applies to both directions in the session.
6867          * This attribute is applicable for EVS codec and can be used
6868          * in both EVS Primary mode and EVS AMR-WB IO mode.
6869          *
6870          * <p>If {@code true}: Indicates DTX is enabled.
6871          * If {@code false}: Indicates DTX is disabled.
6872          *
6873          * <p>If this is not present, then default value of {@code true}
6874          * will apply.
6875          * <p>Reference: 3GPP TS 26.445 Section A.3.1.
6876          */
6877         public static final String KEY_EVS_CODEC_ATTRIBUTE_DTX_BOOL =
6878                 KEY_PREFIX + "evs_codec_attribute_dtx_bool";
6879 
6880         /**
6881          * This is used if further restriction is required on DTX in the
6882          * receive direction. This attribute is applicable for EVS codec
6883          * and can be used in both EVS Primary mode and EVS AMR-WB IO mode.
6884          *
6885          * <p> If this value is true or not present, then DTX setting is
6886          * dependent on {@link #KEY_EVS_CODEC_ATTRIBUTE_DTX_BOOL}.
6887          *
6888          * <p> If this is not present, then default value of {@code true}
6889          * will apply.
6890          *
6891          * <p>Reference: 3GPP TS 26.445 Section A.3.1.
6892          */
6893         public static final String KEY_EVS_CODEC_ATTRIBUTE_DTX_RECV_BOOL =
6894                 KEY_PREFIX + "evs_codec_attribute_dtx_recv_bool";
6895 
6896         /**
6897          * Specifies the number of audio channels.
6898          * If this is not present, then default value of 1 will apply.
6899          *
6900          * <p>Reference: RFC 3551
6901          */
6902         public static final String KEY_EVS_CODEC_ATTRIBUTE_CHANNELS_INT =
6903                 KEY_PREFIX + "evs_codec_attribute_channels_int";
6904 
6905         /**
6906          * Indicates whether the Codec Mode Request (CMR) is supported
6907          * for the session.
6908          * This attribute is applicable for EVS codec in Primary Mode only.
6909          *
6910          * <p>Possible values are -1, 0, 1. If this key is not present,
6911          * then behavior as per value 0 is applicable.
6912          *
6913          * <p>Reference: 3GPP 26.445 Section A.3.1, 3GPP 26.114 Table 6.2a
6914          */
6915         public static final String KEY_EVS_CODEC_ATTRIBUTE_CMR_INT =
6916                 KEY_PREFIX + "codec_attribute_cmr_int";
6917 
6918         /**
6919          * Specifies the number of frame-blocks. This indicates the frame-block period
6920          * at which codec mode changes are allowed for the sender. This attribute is
6921          * applicable for EVS codec in AMR-WB IO mode and AMR-WB.
6922          *
6923          * <p>Possible values are 1, 2.
6924          * If the key is not present, behavior as per value 1 is applicable and this
6925          * parameter is not included in SDP.
6926          *
6927          * <p>Reference: RFC 4867 Section 8.1.
6928          */
6929         public static final String KEY_CODEC_ATTRIBUTE_MODE_CHANGE_PERIOD_INT =
6930                 KEY_PREFIX + "codec_attribute_mode_change_period_int";
6931 
6932         /**
6933          * Specifies if the client is capable to transmit with a restricted mode
6934          * change period. This attribute is applicable for EVS codec in
6935          * AMR-WB IO mode and AMR-WB.
6936          *
6937          * <p>Possible values are 1, 2. If this key is not present,
6938          * then behavior as per value 1 is applicable and this
6939          * parameter is not included in SDP.
6940          *
6941          * <p>Reference: RFC 4867 Section 8.1.
6942          */
6943         public static final String KEY_CODEC_ATTRIBUTE_MODE_CHANGE_CAPABILITY_INT =
6944                 KEY_PREFIX + "codec_attribute_mode_change_capability_int";
6945 
6946         /**
6947          * Specifies the allowed mode changes for the sender in the active mode set.
6948          * This attribute is applicable for EVS codec in AMR-WB IO mode
6949          * and AMR-WB.
6950          *
6951          * <p>Possible values are 0, 1. If value is 1, then the sender should only
6952          * perform mode changes to the neighboring modes in the active codec mode set.
6953          * If value is 0, then mode changes between any two modes
6954          * in the active codec mode set is allowed.
6955          * If the key is not present, behavior as per value 0 is applicable and this
6956          * parameter is not included in SDP.
6957          *
6958          * <p>Reference: RFC 4867 Section 8.1.
6959          */
6960         public static final String KEY_CODEC_ATTRIBUTE_MODE_CHANGE_NEIGHBOR_INT =
6961                 KEY_PREFIX + "codec_attribute_mode_change_neighbor_int";
6962 
6963         /**
6964          * Specifies the codec attributes of different payload types in
6965          * the EVS codec.
6966          *
6967          * <p> The keys in this bundle are payload types specified
6968          * in {@link #KEY_EVS_PAYLOAD_TYPE_INT_ARRAY}.
6969          *
6970          * <p>Codec attributes allowed as part of EVS codec are,
6971          * <UL>
6972          *     <LI>{@link #KEY_EVS_CODEC_ATTRIBUTE_BANDWIDTH_INT}</LI>
6973          *     <LI>{@link #KEY_EVS_CODEC_ATTRIBUTE_BITRATE_INT_ARRAY}</LI>
6974          *     <LI>{@link #KEY_EVS_CODEC_ATTRIBUTE_CH_AW_RECV_INT}</LI>
6975          *     <LI>{@link #KEY_EVS_CODEC_ATTRIBUTE_HF_ONLY_INT}</LI>
6976          *     <LI>{@link #KEY_EVS_CODEC_ATTRIBUTE_DTX_BOOL}</LI>
6977          *     <LI>{@link #KEY_EVS_CODEC_ATTRIBUTE_DTX_RECV_BOOL}</LI>
6978          *     <LI>{@link #KEY_EVS_CODEC_ATTRIBUTE_MODE_SWITCH_INT}</LI>
6979          *     <LI>{@link #KEY_EVS_CODEC_ATTRIBUTE_CMR_INT}</LI>
6980          *     <LI>{@link #KEY_EVS_CODEC_ATTRIBUTE_CHANNELS_INT}</LI>
6981          *     <LI>{@link #KEY_CODEC_ATTRIBUTE_MODE_CHANGE_PERIOD_INT}</LI>
6982          *     <LI>{@link #KEY_CODEC_ATTRIBUTE_MODE_CHANGE_CAPABILITY_INT}</LI>
6983          *     <LI>{@link #KEY_CODEC_ATTRIBUTE_MODE_CHANGE_NEIGHBOR_INT}</LI>
6984          * </UL>
6985          */
6986         public static final String KEY_EVS_PAYLOAD_DESCRIPTION_BUNDLE =
6987                 KEY_PREFIX + "evs_payload_description_bundle";
6988 
getDefaults()6989         private static PersistableBundle getDefaults() {
6990             PersistableBundle defaults = new PersistableBundle();
6991             defaults.putBoolean(KEY_CARRIER_VOLTE_ROAMING_AVAILABLE_BOOL, true);
6992             defaults.putBoolean(KEY_INCLUDE_CALLER_ID_SERVICE_CODES_IN_SIP_INVITE_BOOL, false);
6993             defaults.putBoolean(KEY_MULTIENDPOINT_SUPPORTED_BOOL, false);
6994             defaults.putBoolean(KEY_SESSION_TIMER_SUPPORTED_BOOL, true);
6995             defaults.putBoolean(KEY_OIP_SOURCE_FROM_HEADER_BOOL, false);
6996             defaults.putBoolean(KEY_PRACK_SUPPORTED_FOR_18X_BOOL, false);
6997             defaults.putBoolean(KEY_VOICE_QOS_PRECONDITION_SUPPORTED_BOOL, true);
6998             defaults.putBoolean(KEY_VOICE_ON_DEFAULT_BEARER_SUPPORTED_BOOL, false);
6999 
7000             defaults.putInt(KEY_SESSION_REFRESHER_TYPE_INT, SESSION_REFRESHER_TYPE_UAC);
7001             defaults.putInt(KEY_SESSION_PRIVACY_TYPE_INT, SESSION_PRIVACY_TYPE_HEADER);
7002             defaults.putInt(KEY_SESSION_REFRESH_METHOD_INT,
7003                             SESSION_REFRESH_METHOD_UPDATE_PREFERRED);
7004             defaults.putInt(KEY_CONFERENCE_SUBSCRIBE_TYPE_INT,
7005                             CONFERENCE_SUBSCRIBE_TYPE_OUT_OF_DIALOG);
7006             defaults.putInt(KEY_AUDIO_RTP_INACTIVITY_TIMER_MILLIS_INT, 20000);
7007             defaults.putInt(KEY_AUDIO_RTCP_INACTIVITY_TIMER_MILLIS_INT, 20000);
7008             defaults.putInt(KEY_DEDICATED_BEARER_WAIT_TIMER_MILLIS_INT, 8000);
7009             defaults.putInt(KEY_RINGING_TIMER_MILLIS_INT, 90000);
7010             defaults.putInt(KEY_RINGBACK_TIMER_MILLIS_INT, 90000);
7011             defaults.putInt(KEY_MO_CALL_REQUEST_TIMEOUT_MILLIS_INT, 5000);
7012             defaults.putInt(KEY_SESSION_EXPIRES_TIMER_SEC_INT, 1800);
7013             defaults.putInt(KEY_MINIMUM_SESSION_EXPIRES_TIMER_SEC_INT, 90);
7014             defaults.putInt(KEY_AUDIO_AS_BANDWIDTH_KBPS_INT, 41);
7015             defaults.putInt(KEY_AUDIO_RS_BANDWIDTH_BPS_INT, 600);
7016             defaults.putInt(KEY_AUDIO_RR_BANDWIDTH_BPS_INT, 2000);
7017             defaults.putInt(KEY_VOICE_RTP_PACKET_LOSS_RATE_THRESHOLD_INT, 40);
7018             defaults.putInt(KEY_VOICE_RTP_JITTER_THRESHOLD_MILLIS_INT, 120);
7019             defaults.putLong(KEY_VOICE_RTP_INACTIVITY_TIME_THRESHOLD_MILLIS_LONG, 5000);
7020 
7021             defaults.putIntArray(
7022                     KEY_AUDIO_INACTIVITY_CALL_END_REASONS_INT_ARRAY,
7023                     new int[] {
7024                         Ims.RTCP_INACTIVITY_ON_CONNECTED,
7025                         Ims.RTP_INACTIVITY_ON_CONNECTED,
7026                         Ims.E911_RTCP_INACTIVITY_ON_CONNECTED,
7027                         Ims.RTCP_INACTIVITY_ON_HOLD
7028                     });
7029 
7030             defaults.putIntArray(
7031                     KEY_SRVCC_TYPE_INT_ARRAY,
7032                     new int[] {
7033                         BASIC_SRVCC_SUPPORT,
7034                         ALERTING_SRVCC_SUPPORT,
7035                         PREALERTING_SRVCC_SUPPORT,
7036                         MIDCALL_SRVCC_SUPPORT
7037                     });
7038 
7039             defaults.putString(KEY_CONFERENCE_FACTORY_URI_STRING, "");
7040 
7041             PersistableBundle audio_codec_capability_payload_types = new PersistableBundle();
7042 
7043             audio_codec_capability_payload_types.putIntArray(
7044                     KEY_AMRWB_PAYLOAD_TYPE_INT_ARRAY,
7045                     new int[] { 97, 98 });
7046 
7047             audio_codec_capability_payload_types.putIntArray(
7048                     KEY_AMRNB_PAYLOAD_TYPE_INT_ARRAY,
7049                     new int[] { 99, 100 });
7050 
7051             audio_codec_capability_payload_types.putIntArray(
7052                     KEY_DTMFWB_PAYLOAD_TYPE_INT_ARRAY,
7053                     new int[] { 101 });
7054 
7055             audio_codec_capability_payload_types.putIntArray(
7056                     KEY_DTMFNB_PAYLOAD_TYPE_INT_ARRAY,
7057                     new int[] { 102 });
7058 
7059             defaults.putPersistableBundle(
7060                     KEY_AUDIO_CODEC_CAPABILITY_PAYLOAD_TYPES_BUNDLE,
7061                     audio_codec_capability_payload_types);
7062 
7063             /* Setting defaults for AMRWB */
7064             PersistableBundle all_amrwb_payload_bundles = new PersistableBundle();
7065             PersistableBundle amrwb_bundle_instance1 = new PersistableBundle();
7066 
7067             all_amrwb_payload_bundles.putPersistableBundle(
7068                     "97", /* Same value of payload type as in KEY_AMRWB_PAYLOAD_TYPE_INT_ARRAY */
7069                     amrwb_bundle_instance1);
7070 
7071             PersistableBundle amrwb_bundle_instance2 = new PersistableBundle();
7072 
7073             amrwb_bundle_instance2.putInt(KEY_AMR_CODEC_ATTRIBUTE_PAYLOAD_FORMAT_INT,
7074                                           OCTET_ALIGNED);
7075 
7076             all_amrwb_payload_bundles.putPersistableBundle(
7077                     "98", /* Same value of payload type as in KEY_AMRWB_PAYLOAD_TYPE_INT_ARRAY */
7078                     amrwb_bundle_instance2);
7079 
7080             defaults.putPersistableBundle(
7081                     KEY_AMRWB_PAYLOAD_DESCRIPTION_BUNDLE,
7082                     all_amrwb_payload_bundles);
7083 
7084             /* Setting defaults for AMRNB */
7085             PersistableBundle all_amrnb_payload_bundles = new PersistableBundle();
7086             PersistableBundle amrnb_bundle_instance1 = new PersistableBundle();
7087 
7088             all_amrnb_payload_bundles.putPersistableBundle(
7089                     "99", /* Same value of payload type as in KEY_AMRNB_PAYLOAD_TYPE_INT_ARRAY */
7090                     amrnb_bundle_instance1);
7091 
7092             PersistableBundle amrnb_bundle_instance2 = new PersistableBundle();
7093 
7094             amrnb_bundle_instance2.putInt(KEY_AMR_CODEC_ATTRIBUTE_PAYLOAD_FORMAT_INT,
7095                                           OCTET_ALIGNED);
7096 
7097             all_amrnb_payload_bundles.putPersistableBundle(
7098                     "100", /* Same value of payload type as in KEY_AMRNB_PAYLOAD_TYPE_INT_ARRAY */
7099                     amrnb_bundle_instance2);
7100 
7101             defaults.putPersistableBundle(
7102                     KEY_AMRNB_PAYLOAD_DESCRIPTION_BUNDLE,
7103                     all_amrnb_payload_bundles);
7104 
7105             return defaults;
7106         }
7107     }
7108 
7109     /**
7110      * IMS SMS configs. This groups the configs specific for SMS over IMS
7111      */
7112     public static final class ImsSms {
ImsSms()7113         private ImsSms() {}
7114 
7115         /** Prefix of all imssms.KEY_* constants. */
7116         public static final String KEY_PREFIX = "imssms.";
7117 
7118         /**
7119          * Flag specifying if SMS over IMS support is available or not.
7120          *
7121          * <p>If {@code true}: SMS over IMS support available.
7122          * {@code false}: otherwise.
7123          */
7124         public static final String KEY_SMS_OVER_IMS_SUPPORTED_BOOL =
7125                 KEY_PREFIX + "sms_over_ims_supported_bool";
7126 
7127         /**
7128          * Flag specifying whether to allow SMS CSFB in case of
7129          * SMS over PS failure.
7130          *
7131          * <p>If {@code true}: allow SMS CSFB in case of SMS over PS failure.
7132          * {@code false} otherwise.
7133          */
7134         public static final String KEY_SMS_CSFB_RETRY_ON_FAILURE_BOOL =
7135                 KEY_PREFIX + "sms_csfb_retry_on_failure_bool";
7136 
7137         /** @hide */
7138         @IntDef({
7139             SMS_FORMAT_3GPP,
7140             SMS_FORMAT_3GPP2
7141         })
7142         public @interface SmsFormat {}
7143 
7144         /** SMS format is 3GPP. */
7145         public static final int SMS_FORMAT_3GPP = 0;
7146 
7147         /** SMS format is 3GPP2. */
7148         public static final int SMS_FORMAT_3GPP2 = 1;
7149 
7150         /**
7151          * Specifies the SMS over IMS format.
7152          *
7153          * <p>Possible values are,
7154          * {@link #SMS_FORMAT_3GPP},
7155          * {@link #SMS_FORMAT_3GPP2}
7156          */
7157         public static final String KEY_SMS_OVER_IMS_FORMAT_INT =
7158                 KEY_PREFIX + "sms_over_ims_format_int";
7159 
7160         /**
7161          * List of different RAT technologies on which SMS over IMS
7162          * is supported.
7163          *
7164          * <p>Possible values are,
7165          * {@link AccessNetworkConstants.AccessNetworkType#NGRAN}
7166          * {@link AccessNetworkConstants.AccessNetworkType#EUTRAN}
7167          * {@link AccessNetworkConstants.AccessNetworkType#IWLAN}
7168          * {@link AccessNetworkConstants.AccessNetworkType#UTRAN}
7169          * {@link AccessNetworkConstants.AccessNetworkType#GERAN}
7170          */
7171         public static final String KEY_SMS_OVER_IMS_SUPPORTED_RATS_INT_ARRAY =
7172                 KEY_PREFIX + "sms_over_ims_supported_rats_int_array";
7173 
7174         /**
7175          * Maximum Retry Count for Failure, If the Retry Count exceeds this value,
7176          * it must display to User Interface as sending failed
7177          */
7178         public static final String KEY_SMS_MAX_RETRY_COUNT_INT =
7179                 KEY_PREFIX + "sms_max_retry_count_int";
7180 
7181         /**
7182          * Maximum Retry Count for SMS over IMS on Failure, If the Retry Count exceeds this value,
7183          * and if the retry count is less than {@link #KEY_SMS_MAX_RETRY_COUNT_INT}
7184          * sending SMS should fallback to CS
7185          */
7186         public static final String KEY_SMS_MAX_RETRY_OVER_IMS_COUNT_INT =
7187                 KEY_PREFIX + "sms_max_retry_over_ims_count_int";
7188 
7189         /**
7190          * Delay Timer Value in milliseconds
7191          * Retry SMS over IMS after this Timer expires
7192          */
7193         public static final String KEY_SMS_OVER_IMS_SEND_RETRY_DELAY_MILLIS_INT =
7194                 KEY_PREFIX + "sms_over_ims_send_retry_delay_millis_int";
7195 
7196         /**
7197          * TR1 Timer Value in milliseconds,
7198          * Waits for RP-Ack from network for MO SMS.
7199          */
7200         public static final String KEY_SMS_TR1_TIMER_MILLIS_INT =
7201                 KEY_PREFIX + "sms_tr1_timer_millis_int";
7202 
7203         /**
7204          * TR2 Timer Value in milliseconds,
7205          * Waits for RP-Ack from Transfer Layer for MT SMS.
7206          */
7207         public static final String KEY_SMS_TR2_TIMER_MILLIS_INT =
7208                 KEY_PREFIX + "sms_tr2_timer_millis_int";
7209 
7210         /**
7211          * SMS RP-Cause Values for which SMS should be retried over IMS
7212          *
7213          * <p>Possible values are,
7214          * {@link SmsManager#SMS_RP_CAUSE_UNALLOCATED_NUMBER}
7215          * {@link SmsManager#SMS_RP_CAUSE_OPERATOR_DETERMINED_BARRING}
7216          * {@link SmsManager#SMS_RP_CAUSE_CALL_BARRING}
7217          * {@link SmsManager#SMS_RP_CAUSE_RESERVED}
7218          * {@link SmsManager#SMS_RP_CAUSE_SHORT_MESSAGE_TRANSFER_REJECTED}
7219          * {@link SmsManager#SMS_RP_CAUSE_DESTINATION_OUT_OF_ORDER}
7220          * {@link SmsManager#SMS_RP_CAUSE_UNIDENTIFIED_SUBSCRIBER}
7221          * {@link SmsManager#SMS_RP_CAUSE_FACILITY_REJECTED}
7222          * {@link SmsManager#SMS_RP_CAUSE_UNKNOWN_SUBSCRIBER}
7223          * {@link SmsManager#SMS_RP_CAUSE_NETWORK_OUT_OF_ORDER}
7224          * {@link SmsManager#SMS_RP_CAUSE_TEMPORARY_FAILURE}
7225          * {@link SmsManager#SMS_RP_CAUSE_CONGESTION}
7226          * {@link SmsManager#SMS_RP_CAUSE_RESOURCES_UNAVAILABLE}
7227          * {@link SmsManager#SMS_RP_CAUSE_FACILITY_NOT_SUBSCRIBED}
7228          * {@link SmsManager#SMS_RP_CAUSE_FACILITY_NOT_IMPLEMENTED}
7229          * {@link SmsManager#SMS_RP_CAUSE_INVALID_MESSAGE_REFERENCE_VALUE}
7230          * {@link SmsManager#SMS_RP_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE}
7231          * {@link SmsManager#SMS_RP_CAUSE_INVALID_MANDATORY_INFORMATION}
7232          * {@link SmsManager#SMS_RP_CAUSE_MESSAGE_TYPE_NON_EXISTENT}
7233          * {@link SmsManager#SMS_RP_CAUSE_MESSAGE_INCOMPATIBLE_WITH_PROTOCOL_STATE}
7234          * {@link SmsManager#SMS_RP_CAUSE_INFORMATION_ELEMENT_NON_EXISTENT}
7235          * {@link SmsManager#SMS_RP_CAUSE_PROTOCOL_ERROR}
7236          * {@link SmsManager#SMS_RP_CAUSE_INTERWORKING_UNSPECIFIED
7237          */
7238         public static final String KEY_SMS_RP_CAUSE_VALUES_TO_RETRY_OVER_IMS_INT_ARRAY =
7239                 KEY_PREFIX + "sms_rp_cause_values_to_retry_over_ims_int_array";
7240 
7241         /**
7242          * SMS RP-Cause Values for which Sending SMS should fallback
7243          */
7244         public static final String KEY_SMS_RP_CAUSE_VALUES_TO_FALLBACK_INT_ARRAY =
7245                 KEY_PREFIX + "sms_rp_cause_values_to_fallback_int_array";
7246 
getDefaults()7247         private static PersistableBundle getDefaults() {
7248             PersistableBundle defaults = new PersistableBundle();
7249             defaults.putBoolean(KEY_SMS_OVER_IMS_SUPPORTED_BOOL, true);
7250             defaults.putBoolean(KEY_SMS_CSFB_RETRY_ON_FAILURE_BOOL, true);
7251 
7252             defaults.putInt(KEY_SMS_OVER_IMS_FORMAT_INT, SMS_FORMAT_3GPP);
7253 
7254             defaults.putInt(KEY_SMS_MAX_RETRY_COUNT_INT, 3);
7255             defaults.putInt(KEY_SMS_MAX_RETRY_OVER_IMS_COUNT_INT, 3);
7256             defaults.putInt(KEY_SMS_OVER_IMS_SEND_RETRY_DELAY_MILLIS_INT,
7257                     2000);
7258             defaults.putInt(KEY_SMS_TR1_TIMER_MILLIS_INT, 130000);
7259             defaults.putInt(KEY_SMS_TR2_TIMER_MILLIS_INT, 15000);
7260 
7261             defaults.putIntArray(
7262                     KEY_SMS_RP_CAUSE_VALUES_TO_RETRY_OVER_IMS_INT_ARRAY,
7263                     new int[] {
7264                         SmsManager.SMS_RP_CAUSE_TEMPORARY_FAILURE
7265                     });
7266             defaults.putIntArray(
7267                     KEY_SMS_RP_CAUSE_VALUES_TO_FALLBACK_INT_ARRAY,
7268                     new int[] {
7269                         SmsManager.SMS_RP_CAUSE_UNALLOCATED_NUMBER,
7270                         SmsManager.SMS_RP_CAUSE_OPERATOR_DETERMINED_BARRING,
7271                         SmsManager.SMS_RP_CAUSE_CALL_BARRING,
7272                         SmsManager.SMS_RP_CAUSE_RESERVED,
7273                         SmsManager.SMS_RP_CAUSE_SHORT_MESSAGE_TRANSFER_REJECTED,
7274                         SmsManager.SMS_RP_CAUSE_DESTINATION_OUT_OF_ORDER,
7275                         SmsManager.SMS_RP_CAUSE_UNIDENTIFIED_SUBSCRIBER,
7276                         SmsManager.SMS_RP_CAUSE_FACILITY_REJECTED,
7277                         SmsManager.SMS_RP_CAUSE_UNKNOWN_SUBSCRIBER,
7278                         SmsManager.SMS_RP_CAUSE_NETWORK_OUT_OF_ORDER,
7279                         SmsManager.SMS_RP_CAUSE_CONGESTION,
7280                         SmsManager.SMS_RP_CAUSE_RESOURCES_UNAVAILABLE,
7281                         SmsManager.SMS_RP_CAUSE_FACILITY_NOT_SUBSCRIBED,
7282                         SmsManager.SMS_RP_CAUSE_FACILITY_NOT_IMPLEMENTED,
7283                         SmsManager.SMS_RP_CAUSE_INVALID_MESSAGE_REFERENCE_VALUE,
7284                         SmsManager.SMS_RP_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE,
7285                         SmsManager.SMS_RP_CAUSE_INVALID_MANDATORY_INFORMATION,
7286                         SmsManager.SMS_RP_CAUSE_MESSAGE_TYPE_NON_EXISTENT,
7287                         SmsManager.SMS_RP_CAUSE_MESSAGE_INCOMPATIBLE_WITH_PROTOCOL_STATE,
7288                         SmsManager.SMS_RP_CAUSE_INFORMATION_ELEMENT_NON_EXISTENT,
7289                         SmsManager.SMS_RP_CAUSE_PROTOCOL_ERROR,
7290                         SmsManager.SMS_RP_CAUSE_INTERWORKING_UNSPECIFIED
7291                     });
7292 
7293             defaults.putIntArray(
7294                     KEY_SMS_OVER_IMS_SUPPORTED_RATS_INT_ARRAY,
7295                     new int[] {
7296                         AccessNetworkType.EUTRAN,
7297                         AccessNetworkType.IWLAN
7298                     });
7299 
7300             return defaults;
7301         }
7302     }
7303 
7304     /**
7305      * IMS RTT configs. This groups the configs specific for text media,
7306      * RTT (Real Time Text).
7307      */
7308     public static final class ImsRtt {
ImsRtt()7309         private ImsRtt() {}
7310 
7311         /** Prefix of all imsrtt.KEY_* constants. */
7312         public static final String KEY_PREFIX = "imsrtt.";
7313 
7314         /**
7315          * Flag specifying whether text media is allowed on default bearer.
7316          *
7317          * <p>If {@code true}: text media can be sent on default bearer.
7318          * {@code false} otherwise.
7319          */
7320         public static final String KEY_TEXT_ON_DEFAULT_BEARER_SUPPORTED_BOOL =
7321                 KEY_PREFIX + "text_on_default_bearer_supported_bool";
7322 
7323         /**
7324          * Flag specifying whether QoS preconditions are supported for text.
7325          *
7326          * <p>If {@code true}: QoS Preconditions are supported.
7327          * {@code false} otherwise.
7328          * <p>Reference: 3GPP TS 24.229
7329          */
7330         public static final String KEY_TEXT_QOS_PRECONDITION_SUPPORTED_BOOL =
7331                 KEY_PREFIX + "text_qos_precondition_supported_bool";
7332 
7333         /**
7334          * Specifies the AS (Application Specific) SDP modifier for text media.
7335          *
7336          * <p>Expressed in kilobits per second as per RFC 3556 Section 2.
7337          */
7338         public static final String KEY_TEXT_AS_BANDWIDTH_KBPS_INT =
7339                 KEY_PREFIX + "text_as_bandwidth_kbps_int";
7340 
7341         /**
7342          * Specifies the RS (RTCP bandwidth-Sender) SDP modifier for text media.
7343          *
7344          * <p>This indicates the RTCP bandwidth allocated to active data senders
7345          * for text media.
7346          *
7347          * <p>Expressed in bits per second as per RFC 3556 Section 2.
7348          */
7349         public static final String KEY_TEXT_RS_BANDWIDTH_BPS_INT =
7350                 KEY_PREFIX + "text_rs_bandwidth_bps_int";
7351 
7352         /**
7353          * Specifies the RR (RTCP bandwidth-Receiver) SDP modifier for
7354          * text media.
7355          *
7356          * <p>This indicates the RTCP bandwidth allocated to receivers
7357          * for text media.
7358          *
7359          * <p>Expressed in bits per second as per RFC 3556 Section 2.
7360          */
7361         public static final String KEY_TEXT_RR_BANDWIDTH_BPS_INT =
7362                 KEY_PREFIX + "text_rr_bandwidth_bps_int";
7363 
7364         /**
7365          * Specifies the Text Codec capability.
7366          *
7367          * <p>Possible keys in this bundle are,
7368          * <UL>
7369          *     <LI>{@link #KEY_T140_PAYLOAD_TYPE_INT}</LI>
7370          *     <LI>{@link #KEY_RED_PAYLOAD_TYPE_INT}</LI>
7371          * </UL>
7372          */
7373         public static final String KEY_TEXT_CODEC_CAPABILITY_PAYLOAD_TYPES_BUNDLE =
7374                 KEY_PREFIX + "text_codec_capability_payload_types_bundle";
7375 
7376         /** Integer representing payload type for T140 codec.
7377          * <p>Payload type is an integer in dynamic payload type range 96-127
7378          * as per RFC RFC 3551 Section 6.
7379          */
7380         public static final String KEY_T140_PAYLOAD_TYPE_INT =
7381                 KEY_PREFIX + "t140_payload_type_int";
7382 
7383         /** Integer representing payload type for RED/redundancy codec.
7384          * <p>Payload type is an integer in dynamic payload type range 96-127
7385          * as per RFC RFC 3551 Section 6.
7386          */
7387         public static final String KEY_RED_PAYLOAD_TYPE_INT =
7388                 KEY_PREFIX + "red_payload_type_int";
7389 
getDefaults()7390         private static PersistableBundle getDefaults() {
7391             PersistableBundle defaults = new PersistableBundle();
7392             defaults.putBoolean(KEY_TEXT_ON_DEFAULT_BEARER_SUPPORTED_BOOL, false);
7393             defaults.putBoolean(KEY_TEXT_QOS_PRECONDITION_SUPPORTED_BOOL, true);
7394 
7395             defaults.putInt(KEY_TEXT_AS_BANDWIDTH_KBPS_INT, 4);
7396             defaults.putInt(KEY_TEXT_RS_BANDWIDTH_BPS_INT, 100);
7397             defaults.putInt(KEY_TEXT_RR_BANDWIDTH_BPS_INT, 300);
7398 
7399             PersistableBundle text_codec_capability_payload_types = new PersistableBundle();
7400 
7401             text_codec_capability_payload_types.putInt(
7402                     KEY_RED_PAYLOAD_TYPE_INT,
7403                     112);
7404 
7405             text_codec_capability_payload_types.putInt(
7406                     KEY_T140_PAYLOAD_TYPE_INT,
7407                     111);
7408 
7409             defaults.putPersistableBundle(
7410                     KEY_TEXT_CODEC_CAPABILITY_PAYLOAD_TYPES_BUNDLE,
7411                     text_codec_capability_payload_types);
7412 
7413             return defaults;
7414         }
7415     }
7416 
7417     /**
7418      * Emergency Call/E911. This groups the configs specific for emergency call
7419      * over IMS.
7420      *
7421      * <p> Reference: 3GPP 24.229, 3GPP 23.167 Annex H, 3GPP 24.301.
7422      */
7423     public static final class ImsEmergency {
ImsEmergency()7424         private ImsEmergency() {}
7425 
7426         /** Prefix of all imsemergency.KEY_* constants. */
7427         public static final String KEY_PREFIX = "imsemergency.";
7428 
7429         /**
7430          * Flag specifying whether UE would retry E911 call on
7431          * IMS PDN if emergency PDN setup failed.
7432          *
7433          * <p>If {@code true}: Allow UE to retry emergency call on
7434          * IMS PDN if emergency PDN setup failed.{@code false} otherwise.
7435          */
7436         public static final String KEY_RETRY_EMERGENCY_ON_IMS_PDN_BOOL =
7437                 KEY_PREFIX + "retry_emergency_on_ims_pdn_bool";
7438 
7439         /**
7440          * Flag specifying whether UE should enter Emergency CallBack Mode(ECBM)
7441          * after E911 call is ended.
7442          *
7443          * <p>If {@code true}: Enter ECBM mode after E911 call is ended.
7444          * {@code false} otherwise.
7445          */
7446         public static final String KEY_EMERGENCY_CALLBACK_MODE_SUPPORTED_BOOL =
7447                 KEY_PREFIX + "emergency_callback_mode_supported_bool";
7448 
7449         /**
7450          * Flag specifying whether QoS preconditions are supported for emergency
7451          * call setup.
7452          *
7453          * <p>If {@code true}: QoS Preconditions are supported.
7454          * {@code false} otherwise.
7455          *
7456          * <p>Reference: 3GPP TS 24.229
7457          */
7458         public static final String KEY_EMERGENCY_QOS_PRECONDITION_SUPPORTED_BOOL =
7459                 KEY_PREFIX + "emergency_qos_precondition_supported_bool";
7460 
7461         /**
7462          * List of different RAT technologies on which emergency call using IMS
7463          * is supported.
7464          *
7465          * <p>Possible values are,
7466          * {@link AccessNetworkConstants.AccessNetworkType#NGRAN}
7467          * {@link AccessNetworkConstants.AccessNetworkType#EUTRAN}
7468          * {@link AccessNetworkConstants.AccessNetworkType#IWLAN}
7469          */
7470         public static final String KEY_EMERGENCY_OVER_IMS_SUPPORTED_RATS_INT_ARRAY =
7471                 KEY_PREFIX + "emergency_over_ims_supported_rats_int_array";
7472 
7473         /**
7474          * Specifies the maximum time from deciding that an emergency service is to
7475          * be established until completion of the emergency registration procedure.
7476          * Upon timer expiry, the UE considers the emergency REGISTER request or
7477          * the emergency call attempt as failed.
7478          */
7479         public static final String KEY_EMERGENCY_REGISTRATION_TIMER_MILLIS_INT =
7480                 KEY_PREFIX + "emergency_registration_timer_millis_int";
7481 
7482         /**
7483          * This setting will be specify the wait time for refreshing
7484          * geolocation information before dialing emergency call.
7485          */
7486         public static final String KEY_REFRESH_GEOLOCATION_TIMEOUT_MILLIS_INT =
7487                 KEY_PREFIX + "refresh_geolocation_timeout_millis_int";
7488 
7489         /**
7490          * List of 3GPP access network technologies where e911 over IMS is supported
7491          * in the home network and domestic 3rd-party networks. The order in the list represents
7492          * the preference. The domain selection service shall scan the network type in the order
7493          * of the preference.
7494          *
7495          * <p>Possible values are,
7496          * {@link AccessNetworkConstants.AccessNetworkType#NGRAN}
7497          * {@link AccessNetworkConstants.AccessNetworkType#EUTRAN}
7498          *
7499          * The default value for this key is
7500          * {{@link AccessNetworkConstants.AccessNetworkType#EUTRAN},
7501          * @hide
7502          */
7503         public static final String
7504                 KEY_EMERGENCY_OVER_IMS_SUPPORTED_3GPP_NETWORK_TYPES_INT_ARRAY = KEY_PREFIX
7505                         + "emergency_over_ims_supported_3gpp_network_types_int_array";
7506 
7507         /**
7508          * List of 3GPP access network technologies where e911 over IMS is supported
7509          * in the roaming network and non-domestic 3rd-party networks. The order in the list
7510          * represents the preference. The domain selection service shall scan the network type
7511          * in the order of the preference.
7512          *
7513          * <p>Possible values are,
7514          * {@link AccessNetworkConstants.AccessNetworkType#NGRAN}
7515          * {@link AccessNetworkConstants.AccessNetworkType#EUTRAN}
7516          *
7517          * The default value for this key is
7518          * {{@link AccessNetworkConstants.AccessNetworkType#EUTRAN},
7519          * @hide
7520          */
7521         public static final String
7522                 KEY_EMERGENCY_OVER_IMS_ROAMING_SUPPORTED_3GPP_NETWORK_TYPES_INT_ARRAY = KEY_PREFIX
7523                         + "emergency_over_ims_roaming_supported_3gpp_network_types_int_array";
7524 
7525         /**
7526          * List of CS access network technologies where circuit-switched emergency calls are
7527          * supported in the home network and domestic 3rd-party networks. The order in the list
7528          * represents the preference. The domain selection service shall scan the network type
7529          * in the order of the preference.
7530          *
7531          * <p>Possible values are,
7532          * {@link AccessNetworkConstants.AccessNetworkType#GERAN}
7533          * {@link AccessNetworkConstants.AccessNetworkType#UTRAN}
7534          * {@link AccessNetworkConstants.AccessNetworkType#CDMA2000}
7535          *
7536          * The default value for this key is
7537          * {{@link AccessNetworkConstants.AccessNetworkType#UTRAN},
7538          * {@link AccessNetworkConstants.AccessNetworkType#GERAN}}.
7539          * @hide
7540          */
7541         public static final String KEY_EMERGENCY_OVER_CS_SUPPORTED_ACCESS_NETWORK_TYPES_INT_ARRAY =
7542                 KEY_PREFIX + "emergency_over_cs_supported_access_network_types_int_array";
7543 
7544         /**
7545          * List of CS access network technologies where circuit-switched emergency calls are
7546          * supported in the roaming network and non-domestic 3rd-party networks. The order
7547          * in the list represents the preference. The domain selection service shall scan
7548          * the network type in the order of the preference.
7549          *
7550          * <p>Possible values are,
7551          * {@link AccessNetworkConstants.AccessNetworkType#GERAN}
7552          * {@link AccessNetworkConstants.AccessNetworkType#UTRAN}
7553          * {@link AccessNetworkConstants.AccessNetworkType#CDMA2000}
7554          *
7555          * The default value for this key is
7556          * {{@link AccessNetworkConstants.AccessNetworkType#UTRAN},
7557          * {@link AccessNetworkConstants.AccessNetworkType#GERAN}}.
7558          * @hide
7559          */
7560         public static final String
7561                 KEY_EMERGENCY_OVER_CS_ROAMING_SUPPORTED_ACCESS_NETWORK_TYPES_INT_ARRAY = KEY_PREFIX
7562                         + "emergency_over_cs_roaming_supported_access_network_types_int_array";
7563 
7564         /** @hide */
7565         @IntDef({
7566             DOMAIN_CS,
7567             DOMAIN_PS_3GPP,
7568             DOMAIN_PS_NON_3GPP
7569         })
7570         public @interface EmergencyDomain {}
7571 
7572         /**
7573          * Circuit switched domain.
7574          * @hide
7575          */
7576         public static final int DOMAIN_CS = 1;
7577 
7578         /**
7579          * Packet switched domain over 3GPP networks.
7580          * @hide
7581          */
7582         public static final int DOMAIN_PS_3GPP = 2;
7583 
7584         /**
7585          * Packet switched domain over non-3GPP networks such as Wi-Fi.
7586          * @hide
7587          */
7588         public static final int DOMAIN_PS_NON_3GPP = 3;
7589 
7590         /**
7591          * Specifies the emergency call domain preference for the home network.
7592          * The domain selection service shall choose the domain in the order
7593          * for attempting the emergency call
7594          *
7595          * <p>Possible values are,
7596          * {@link #DOMAIN_CS}
7597          * {@link #DOMAIN_PS_3GPP}
7598          * {@link #DOMAIN_PS_NON_3GPP}.
7599          *
7600          * The default value for this key is
7601          * {{@link #DOMAIN_PS_3GPP},
7602          * {@link #DOMAIN_CS},
7603          * {@link #DOMAIN_PS_NON_3GPP}}.
7604          * @hide
7605          */
7606         public static final String KEY_EMERGENCY_DOMAIN_PREFERENCE_INT_ARRAY =
7607                 KEY_PREFIX + "emergency_domain_preference_int_array";
7608 
7609         /**
7610          * Specifies the emergency call domain preference for the roaming network.
7611          * The domain selection service shall choose the domain in the order
7612          * for attempting the emergency call.
7613          *
7614          * <p>Possible values are,
7615          * {@link #DOMAIN_CS}
7616          * {@link #DOMAIN_PS_3GPP}
7617          * {@link #DOMAIN_PS_NON_3GPP}.
7618          *
7619          * The default value for this key is
7620          * {{@link #DOMAIN_PS_3GPP},
7621          * {@link #DOMAIN_CS},
7622          * {@link #DOMAIN_PS_NON_3GPP}}.
7623          * @hide
7624          */
7625         public static final String KEY_EMERGENCY_DOMAIN_PREFERENCE_ROAMING_INT_ARRAY =
7626                 KEY_PREFIX + "emergency_domain_preference_roaming_int_array";
7627 
7628         /**
7629          * Specifies if emergency call shall be attempted on IMS, if PS is attached even though IMS
7630          * is not registered and normal calls fallback to the CS networks.
7631          *
7632          * The default value for this key is {@code false}.
7633          * @hide
7634          */
7635         public static final String KEY_PREFER_IMS_EMERGENCY_WHEN_VOICE_CALLS_ON_CS_BOOL =
7636                 KEY_PREFIX + "prefer_ims_emergency_when_voice_calls_on_cs_bool";
7637 
7638         /** @hide */
7639         @IntDef({
7640             VOWIFI_REQUIRES_NONE,
7641             VOWIFI_REQUIRES_SETTING_ENABLED,
7642             VOWIFI_REQUIRES_VALID_EID,
7643         })
7644         public @interface VoWiFiRequires {}
7645 
7646         /**
7647          * Default value.
7648          * If {@link ImsWfc#KEY_EMERGENCY_CALL_OVER_EMERGENCY_PDN_BOOL} is {@code true},
7649          * VoWi-Fi emergency call shall be attempted if Wi-Fi network is connected.
7650          * Otherwise, it shall be attempted if IMS is registered over Wi-Fi.
7651          * @hide
7652          */
7653         public static final int VOWIFI_REQUIRES_NONE = 0;
7654 
7655         /**
7656          * VoWi-Fi emergency call shall be attempted on IMS over Wi-Fi if Wi-Fi network is connected
7657          * and Wi-Fi calling setting is enabled. This value is applicable if the value of
7658          * {@link ImsWfc#KEY_EMERGENCY_CALL_OVER_EMERGENCY_PDN_BOOL} is {@code true}.
7659          * @hide
7660          */
7661         public static final int VOWIFI_REQUIRES_SETTING_ENABLED = 1;
7662 
7663         /**
7664          * VoWi-Fi emergency call shall be attempted on IMS over Wi-Fi if Wi-Fi network is connected
7665          * and Wi-Fi calling is activated successfully. This value is applicable if the value of
7666          * {@link ImsWfc#KEY_EMERGENCY_CALL_OVER_EMERGENCY_PDN_BOOL} is {@code true}.
7667          * @hide
7668          */
7669         public static final int VOWIFI_REQUIRES_VALID_EID = 2;
7670 
7671         /**
7672          * Specifies the condition when emergency call shall be attempted on IMS over Wi-Fi.
7673          *
7674          * The default value for this key is {@code #VOWIFI_REQUIRES_NONE}.
7675          * @hide
7676          */
7677         public static final String KEY_EMERGENCY_VOWIFI_REQUIRES_CONDITION_INT =
7678                 KEY_PREFIX + "emergency_vowifi_requires_condition_int";
7679 
7680         /**
7681          * Specifies maximum number of emergency call retries over Wi-Fi.
7682          * This is valid only when {@link #DOMAIN_PS_NON_3GPP} is included in
7683          * {@link #KEY_EMERGENCY_DOMAIN_PREFERENCE_INT_ARRAY} or
7684          * {@link #KEY_EMERGENCY_DOMAIN_PREFERENCE_ROAMING_INT_ARRAY}.
7685          *
7686          * The default value for this key is 1.
7687          * @hide
7688          */
7689         public static final String KEY_MAXIMUM_NUMBER_OF_EMERGENCY_TRIES_OVER_VOWIFI_INT =
7690                 KEY_PREFIX + "maximum_number_of_emergency_tries_over_vowifi_int";
7691 
7692         /**
7693          * Emergency scan timer to wait for scan results from radio before attempting the call
7694          * over Wi-Fi. On timer expiry, if emergency call on Wi-Fi is allowed and possible,
7695          * telephony shall cancel the scan and place the call on Wi-Fi. If emergency call on Wi-Fi
7696          * is not possible, then domain seleciton continues to wait for the scan result from the
7697          * radio. If an emergency scan result is received before the timer expires, the timer shall
7698          * be stopped and no dialing over Wi-Fi will be tried. If this value is set to 0, then
7699          * the timer is never started and domain selection waits for the scan result from the radio.
7700          *
7701          * The default value for the timer is 10 seconds.
7702          * @hide
7703          */
7704         public static final String KEY_EMERGENCY_SCAN_TIMER_SEC_INT =
7705                 KEY_PREFIX + "emergency_scan_timer_sec_int";
7706 
7707         /**
7708          * The timer to wait for the call completion on the cellular network before attempting the
7709          * call over Wi-Fi. On timer expiry, if emergency call on Wi-Fi is allowed and possible,
7710          * telephony shall cancel the scan on the cellular network and place the call on Wi-Fi.
7711          * If dialing over cellular network is ongoing when timer expires, dialing over Wi-Fi
7712          * will be requested only when the ongoing dialing fails. If emergency call on Wi-Fi is not
7713          * possible, then domain selection continues to try dialing from the radio and the timer
7714          * remains expired. Later when calling over Wi-Fi is possible and dialing over cellular
7715          * networks fails, calling over Wi-Fi will be requested. The timer shall be restarted from
7716          * initial state if calling over Wi-Fi fails.
7717          * If this value is set to {@link #REDIAL_TIMER_DISABLED}, then the timer will never be
7718          * started.
7719          *
7720          * The default value for the timer is {@link #REDIAL_TIMER_DISABLED}.
7721          * @hide
7722          */
7723         public static final String KEY_MAXIMUM_CELLULAR_SEARCH_TIMER_SEC_INT =
7724                 KEY_PREFIX + "maximum_cellular_search_timer_sec_int";
7725 
7726         /** @hide */
7727         @IntDef(prefix = "SCAN_TYPE_",
7728             value = {
7729                 SCAN_TYPE_NO_PREFERENCE,
7730                 SCAN_TYPE_FULL_SERVICE,
7731                 SCAN_TYPE_FULL_SERVICE_FOLLOWED_BY_LIMITED_SERVICE})
7732         public @interface EmergencyScanType {}
7733 
7734         /**
7735          * No specific preference given to the modem. Modem can return an emergency
7736          * capable network either with limited service or full service.
7737          * @hide
7738          */
7739         public static final int SCAN_TYPE_NO_PREFERENCE = 0;
7740 
7741         /**
7742          * Modem will attempt to camp on a network with full service only.
7743          * @hide
7744          */
7745         public static final int SCAN_TYPE_FULL_SERVICE = 1;
7746 
7747         /**
7748          * Telephony shall attempt full service scan first.
7749          * If a full service network is not found, telephony shall attempt a limited service scan.
7750          * @hide
7751          */
7752         public static final int SCAN_TYPE_FULL_SERVICE_FOLLOWED_BY_LIMITED_SERVICE = 2;
7753 
7754         /**
7755          * Specifies the preferred emergency network scanning type.
7756          *
7757          * <p>Possible values are,
7758          * {@link #SCAN_TYPE_NO_PREFERENCE}
7759          * {@link #SCAN_TYPE_FULL_SERVICE}
7760          * {@link #SCAN_TYPE_FULL_SERVICE_FOLLOWED_BY_LIMITED_SERVICE}
7761          *
7762          * The default value for this key is {@link #SCAN_TYPE_NO_PREFERENCE}.
7763          * @hide
7764          */
7765         public static final String KEY_EMERGENCY_NETWORK_SCAN_TYPE_INT =
7766                 KEY_PREFIX + "emergency_network_scan_type_int";
7767 
7768         /**
7769          * Specifies the time by which a call should be set up on the current network
7770          * once the call is routed on the network. If the call cannot be set up by timer expiry,
7771          * call shall be re-dialed on the next available network.
7772          * If this value is set to 0, the timer shall be disabled.
7773          *
7774          * The default value for this key is 0.
7775          * @hide
7776          */
7777         public static final String KEY_EMERGENCY_CALL_SETUP_TIMER_ON_CURRENT_NETWORK_SEC_INT =
7778                 KEY_PREFIX + "emergency_call_setup_timer_on_current_network_sec_int";
7779 
7780         /**
7781          * Specifies if emergency call shall be attempted on IMS only when IMS is registered.
7782          * This is applicable only for the case PS is in service.
7783          *
7784          * The default value for this key is {@code false}.
7785          * @hide
7786          */
7787         public static final String KEY_EMERGENCY_REQUIRES_IMS_REGISTRATION_BOOL =
7788                 KEY_PREFIX + "emergency_requires_ims_registration_bool";
7789 
7790         /**
7791          * Specifies if LTE is preferred when re-scanning networks after the failure of dialing
7792          * over NR. If not, CS will be preferred.
7793          *
7794          * The default value for this key is {@code false}.
7795          * @hide
7796          */
7797         public static final String KEY_EMERGENCY_LTE_PREFERRED_AFTER_NR_FAILED_BOOL =
7798                 KEY_PREFIX + "emergency_lte_preferred_after_nr_failed_bool";
7799 
7800         /**
7801          * Specifies the numbers to be dialed over CDMA network in case of dialing over CS network.
7802          *
7803          * The default value for this key is an empty string array.
7804          * @hide
7805          */
7806         public static final String KEY_EMERGENCY_CDMA_PREFERRED_NUMBERS_STRING_ARRAY =
7807                 KEY_PREFIX + "emergency_cdma_preferred_numbers_string_array";
7808 
7809         /**
7810          * Specifies if emergency call shall be attempted on IMS over cellular network
7811          * only when VoLTE is enabled.
7812          *
7813          * The default value for this key is {@code false}.
7814          * @hide
7815          */
7816         public static final String KEY_EMERGENCY_REQUIRES_VOLTE_ENABLED_BOOL =
7817                 KEY_PREFIX + "emergency_requires_volte_enabled_bool";
7818 
7819         /**
7820          * This values indicates that the cross SIM redialing timer and maximum celluar search
7821          * timer shall be disabled.
7822          *
7823          * @see #KEY_CROSS_STACK_REDIAL_TIMER_SEC_INT
7824          * @see #KEY_QUICK_CROSS_STACK_REDIAL_TIMER_SEC_INT
7825          * @see #KEY_MAXIMUM_CELLULAR_SEARCH_TIMER_SEC_INT
7826          * @hide
7827          */
7828         public static final int REDIAL_TIMER_DISABLED = 0;
7829 
7830         /**
7831          * A timer to guard the max attempting time on current SIM slot so that modem will not
7832          * stuck in current SIM slot for long time. On timer expiry, if emergency call on the
7833          * other SIM slot is preferable, telephony shall cancel the emergency call and place the
7834          * call on the other SIM slot. If this value is set to {@link #REDIAL_TIMER_DISABLED}, then
7835          * the timer will never be started and domain selection continues on the current SIM slot.
7836          * This value should be greater than the value of {@link #KEY_EMERGENCY_SCAN_TIMER_SEC_INT}.
7837          *
7838          * The default value for the timer is 120 seconds.
7839          * @hide
7840          */
7841         public static final String KEY_CROSS_STACK_REDIAL_TIMER_SEC_INT =
7842                 KEY_PREFIX + "cross_stack_redial_timer_sec_int";
7843 
7844         /**
7845          * If emergency calls are only allowed with normal-registered service and UE should get
7846          * normal service in a short time with acquired band information, telephony
7847          * expects dialing emergency call will be completed in a short time.
7848          * If dialing is not completed with in a certain timeout, telephony shall place on
7849          * another SIM slot. If this value is set to {@link #REDIAL_TIMER_DISABLED}, then the timer
7850          * will never be started and domain selection continues on the current SIM slot.
7851          * The timer shall be started for the first trial of each subscription and shall be ignored
7852          * in the roaming networks and non-domestic networks.
7853          *
7854          * The default value for the timer is {@link #REDIAL_TIMER_DISABLED}.
7855          * @hide
7856          */
7857         public static final String KEY_QUICK_CROSS_STACK_REDIAL_TIMER_SEC_INT =
7858                 KEY_PREFIX + "quick_cross_stack_redial_timer_sec_int";
7859 
7860         /**
7861          * Indicates whether the quick cross stack redial timer will be triggered only when
7862          * the device is registered to the network.
7863          *
7864          * The default value is {@code true}.
7865          * @hide
7866          */
7867         public static final String KEY_START_QUICK_CROSS_STACK_REDIAL_TIMER_WHEN_REGISTERED_BOOL =
7868                 KEY_PREFIX + "start_quick_cross_stack_redial_timer_when_registered_bool";
7869 
getDefaults()7870         private static PersistableBundle getDefaults() {
7871             PersistableBundle defaults = new PersistableBundle();
7872             defaults.putBoolean(KEY_RETRY_EMERGENCY_ON_IMS_PDN_BOOL, false);
7873             defaults.putBoolean(KEY_EMERGENCY_CALLBACK_MODE_SUPPORTED_BOOL, false);
7874             defaults.putBoolean(KEY_EMERGENCY_QOS_PRECONDITION_SUPPORTED_BOOL, true);
7875 
7876             defaults.putIntArray(
7877                     KEY_EMERGENCY_OVER_IMS_SUPPORTED_RATS_INT_ARRAY,
7878                     new int[] {
7879                         AccessNetworkType.EUTRAN,
7880                         AccessNetworkType.IWLAN
7881                     });
7882 
7883             defaults.putInt(KEY_EMERGENCY_REGISTRATION_TIMER_MILLIS_INT, 10000);
7884             defaults.putInt(KEY_REFRESH_GEOLOCATION_TIMEOUT_MILLIS_INT, 5000);
7885 
7886             defaults.putIntArray(
7887                     KEY_EMERGENCY_OVER_IMS_SUPPORTED_3GPP_NETWORK_TYPES_INT_ARRAY,
7888                     new int[] {
7889                         AccessNetworkType.EUTRAN,
7890                     });
7891 
7892             defaults.putIntArray(
7893                     KEY_EMERGENCY_OVER_IMS_ROAMING_SUPPORTED_3GPP_NETWORK_TYPES_INT_ARRAY,
7894                     new int[] {
7895                         AccessNetworkType.EUTRAN,
7896                     });
7897 
7898             defaults.putIntArray(
7899                     KEY_EMERGENCY_OVER_CS_SUPPORTED_ACCESS_NETWORK_TYPES_INT_ARRAY,
7900                     new int[] {
7901                         AccessNetworkType.UTRAN,
7902                         AccessNetworkType.GERAN,
7903                     });
7904 
7905             defaults.putIntArray(
7906                     KEY_EMERGENCY_OVER_CS_ROAMING_SUPPORTED_ACCESS_NETWORK_TYPES_INT_ARRAY,
7907                     new int[] {
7908                         AccessNetworkType.UTRAN,
7909                         AccessNetworkType.GERAN,
7910                     });
7911 
7912             defaults.putIntArray(KEY_EMERGENCY_DOMAIN_PREFERENCE_INT_ARRAY,
7913                     new int[] {
7914                         DOMAIN_PS_3GPP,
7915                         DOMAIN_CS,
7916                         DOMAIN_PS_NON_3GPP
7917                     });
7918             defaults.putIntArray(KEY_EMERGENCY_DOMAIN_PREFERENCE_ROAMING_INT_ARRAY,
7919                     new int[] {
7920                         DOMAIN_PS_3GPP,
7921                         DOMAIN_CS,
7922                         DOMAIN_PS_NON_3GPP
7923                     });
7924 
7925             defaults.putBoolean(KEY_PREFER_IMS_EMERGENCY_WHEN_VOICE_CALLS_ON_CS_BOOL, false);
7926             defaults.putInt(KEY_EMERGENCY_VOWIFI_REQUIRES_CONDITION_INT, VOWIFI_REQUIRES_NONE);
7927             defaults.putInt(KEY_MAXIMUM_NUMBER_OF_EMERGENCY_TRIES_OVER_VOWIFI_INT, 1);
7928             defaults.putInt(KEY_EMERGENCY_SCAN_TIMER_SEC_INT, 10);
7929             defaults.putInt(KEY_MAXIMUM_CELLULAR_SEARCH_TIMER_SEC_INT, REDIAL_TIMER_DISABLED);
7930             defaults.putInt(KEY_EMERGENCY_NETWORK_SCAN_TYPE_INT, SCAN_TYPE_NO_PREFERENCE);
7931             defaults.putInt(KEY_EMERGENCY_CALL_SETUP_TIMER_ON_CURRENT_NETWORK_SEC_INT, 0);
7932             defaults.putBoolean(KEY_EMERGENCY_REQUIRES_IMS_REGISTRATION_BOOL, false);
7933             defaults.putBoolean(KEY_EMERGENCY_LTE_PREFERRED_AFTER_NR_FAILED_BOOL, false);
7934             defaults.putBoolean(KEY_EMERGENCY_REQUIRES_VOLTE_ENABLED_BOOL, false);
7935             defaults.putStringArray(KEY_EMERGENCY_CDMA_PREFERRED_NUMBERS_STRING_ARRAY,
7936                     new String[0]);
7937             defaults.putInt(KEY_CROSS_STACK_REDIAL_TIMER_SEC_INT, 120);
7938             defaults.putInt(KEY_QUICK_CROSS_STACK_REDIAL_TIMER_SEC_INT, REDIAL_TIMER_DISABLED);
7939             defaults.putBoolean(KEY_START_QUICK_CROSS_STACK_REDIAL_TIMER_WHEN_REGISTERED_BOOL,
7940                     true);
7941 
7942             return defaults;
7943         }
7944     }
7945 
7946     /**
7947      * IMS Video Telephony configs. This groups the configs that are specific for video call.
7948      */
7949     public static final class ImsVt {
ImsVt()7950         private ImsVt() {}
7951 
7952         /** Prefix of all imsvt.KEY_* constants. */
7953         public static final String KEY_PREFIX = "imsvt.";
7954 
7955         /**
7956          * Flag specifying whether video media is allowed on default bearer.
7957          *
7958          * <p>If {@code true}: video media can be sent on default bearer.
7959          * {@code false} otherwise.
7960          */
7961         public static final String KEY_VIDEO_ON_DEFAULT_BEARER_SUPPORTED_BOOL =
7962                 KEY_PREFIX + "video_on_default_bearer_supported_bool";
7963 
7964         /**
7965          * Specifies the timeout value for no video RTP packets received.
7966          * <p>On timer expiry, VT call can downgrade to voice call or end
7967          * or continue depending on the operator requirement.
7968          */
7969         public static final String KEY_VIDEO_RTP_INACTIVITY_TIMER_MILLIS_INT =
7970                 KEY_PREFIX + "video_rtp_inactivity_timer_millis_int";
7971 
7972         /**
7973          * Specifies the timeout value for no video RTCP packets received.
7974          * <p>On timer expiry, VT call can downgrade to voice call or end
7975          * or continue depending on the operator requirement.
7976          */
7977         public static final String KEY_VIDEO_RTCP_INACTIVITY_TIMER_MILLIS_INT =
7978                 KEY_PREFIX + "video_rtcp_inactivity_timer_millis_int";
7979 
7980         /**
7981          * Specifies the AS (Application Specific) SDP modifier for video media.
7982          *
7983          * <p>Expressed in kilobits per second as per RFC 3556 Section 2.
7984          */
7985         public static final String KEY_VIDEO_AS_BANDWIDTH_KBPS_INT =
7986                 KEY_PREFIX + "video_as_bandwidth_kbps_int";
7987 
7988         /**
7989          * Specifies the RS (RTCP bandwidth-Sender) SDP modifier for video media.
7990          *
7991          * <p>This indicates the RTCP bandwidth allocated to active data senders
7992          * for video media.
7993          *
7994          * <p>Expressed in bits per second as per RFC 3556 Section 2.
7995          */
7996         public static final String KEY_VIDEO_RS_BANDWIDTH_BPS_INT =
7997                 KEY_PREFIX + "video_rs_bandwidth_bps_int";
7998 
7999         /**
8000          * Specifies the RR (RTCP bandwidth-Receiver) SDP modifier
8001          * for video media.
8002          *
8003          * <p>This indicates the RTCP bandwidth allocated to receivers
8004          * for video media.
8005          *
8006          * <p>Expressed in bits per second as per RFC 3556 Section 2.
8007          */
8008         public static final String KEY_VIDEO_RR_BANDWIDTH_BPS_INT =
8009                 KEY_PREFIX + "video_rr_bandwidth_bps_int";
8010 
8011         /**
8012          * Specifies the differentiated services code point (DSCP) value
8013          * for Video RTP.
8014          *
8015          * <p>Reference: RFC 4594 Section 1.4.4
8016          */
8017         public static final String KEY_VIDEO_RTP_DSCP_INT =
8018                 KEY_PREFIX + "video_rtp_dscp_int";
8019 
8020         /**
8021          * Flag specifying whether QoS preconditions are supported for Video.
8022          *
8023          * <p>If {@code true}: QoS Preconditions are supported.
8024          * {@code false} otherwise.
8025          * <p>Reference: 3GPP TS 24.229
8026          */
8027         public static final String KEY_VIDEO_QOS_PRECONDITION_SUPPORTED_BOOL =
8028                 KEY_PREFIX + "video_qos_precondition_supported_bool";
8029 
8030         /**
8031          * Specifies the Video Codec capability. This contains a list of
8032          * payload types representing different Video codec instances.
8033 
8034          * <p>Possible key(s) in this bundle are,
8035          * <UL>
8036          *     <LI>{@link #KEY_H264_PAYLOAD_TYPE_INT_ARRAY}</LI>
8037          * </UL>
8038          * <p>To specify payload descriptions for each of the payload types, see
8039          * <UL>
8040          *     <LI>{@link #KEY_H264_PAYLOAD_DESCRIPTION_BUNDLE}</LI>
8041          * </UL>
8042          */
8043         public static final String KEY_VIDEO_CODEC_CAPABILITY_PAYLOAD_TYPES_BUNDLE =
8044                 KEY_PREFIX + "video_codec_capability_payload_types_bundle";
8045 
8046         /**
8047          * A list of integers representing the different payload types
8048          * in H264 video codec in priority order from highest to lowest.
8049          * <p>Payload type is an integer in dynamic payload type range 96-127
8050          * as per RFC RFC 3551 Section 6.
8051          */
8052         public static final String KEY_H264_PAYLOAD_TYPE_INT_ARRAY =
8053                 KEY_PREFIX + "h264_payload_type_int_array";
8054 
8055         /**
8056          * Specifies the codec attributes of different payload types
8057          * representing H264 video codec instances.
8058          *
8059          * <p> The allowed payload types of the video codecs are specified in,
8060          * {@link #KEY_H264_PAYLOAD_TYPE_INT_ARRAY}.
8061          *
8062          * <p>Codec attributes allowed as part of H264 codec bundle are,
8063          * <UL>
8064          *     <LI>{@link #KEY_H264_VIDEO_CODEC_ATTRIBUTE_PROFILE_LEVEL_ID_STRING}</LI>
8065          *     <LI>{@link #KEY_VIDEO_CODEC_ATTRIBUTE_PACKETIZATION_MODE_INT}</LI>
8066          *     <LI>{@link #KEY_VIDEO_CODEC_ATTRIBUTE_FRAME_RATE_INT}</LI>
8067          *     <LI>{@link #KEY_VIDEO_CODEC_ATTRIBUTE_RESOLUTION_INT_ARRAY}</LI>
8068          * </UL>
8069          *
8070          * <p>If this bundle is not configured and
8071          * {@link #KEY_H264_PAYLOAD_TYPE_INT_ARRAY} is not empty,
8072          * then default values as in the individual codec attributes to
8073          * be used for that payload type.
8074          * <p>If the codec attributes in a particular codec instance bundle
8075          * is not valid together, then that codec instance should not be used.
8076          */
8077         public static final String KEY_H264_PAYLOAD_DESCRIPTION_BUNDLE =
8078                 KEY_PREFIX + "h264_payload_description_bundle";
8079 
8080         /**
8081          * Specifies the packetization mode of the video codec.
8082          *
8083          * <p>Permissible values are 0 (Single NAL unit mode),
8084          * 1(Non-interleaved mode).
8085          *
8086          * <p>If this key is not specified or invalid, then the following
8087          * default value to be used.
8088          * <UL>
8089          *   <LI>For H264: 1(Non-interleaved mode)</LI>
8090          * <UL>
8091          *
8092          * <p>Reference: RFC 6184 Section 5.4
8093          */
8094         public static final String KEY_VIDEO_CODEC_ATTRIBUTE_PACKETIZATION_MODE_INT =
8095                 KEY_PREFIX + "video_codec_attribute_packetization_mode_int";
8096 
8097         /**
8098          * Specifies the maximum frame rate the offerer wishes to receive.
8099          * This gives the maximum video frame rate in frames/sec.
8100          *
8101          * <p>If this key is not specified or invalid, then the following
8102          * default value to be used.
8103          * <UL>
8104          *   <LI>For H264: 15 </LI>
8105          * <UL>
8106          * <p>Reference: RFC 4566 Section 6, 3GPP 26.114 Section 6.2.3.2
8107          */
8108         public static final String KEY_VIDEO_CODEC_ATTRIBUTE_FRAME_RATE_INT =
8109                 KEY_PREFIX + "video_codec_attribute_frame_rate_int";
8110 
8111         /**
8112          * Specifies the maximum resolution allowed for the video codec
8113          * instance.
8114          *
8115          * <p>This is specified as an array of two integers, with
8116          * index 0 : Width,
8117          * index 1 : Height
8118          *
8119          * <p>If this key is not specified or invalid as per the video codec,
8120          * then the following default value to be used.
8121          * <UL>
8122          *   <LI>For H264: 240 (WIDTH) x 320 (HEIGHT) </LI>
8123          * <UL>
8124          * <p>Reference: RFC 4566 Section 6, 3GPP 26.114 Section 6.2.3.2
8125          *
8126          */
8127         public static final String KEY_VIDEO_CODEC_ATTRIBUTE_RESOLUTION_INT_ARRAY =
8128                 KEY_PREFIX + "video_codec_attribute_resolution_int_array";
8129 
8130         /**
8131          * Specifies the profile level id of the H264 video codec.
8132          * This value is represented as "profile-level-id" in the SDP offer
8133          * as per RFC 6184 Section 8.1.
8134          *
8135          * <p>If this key is not specified or invalid as per the video codec,
8136          * then default value of 42C00C to be used.
8137          *
8138          * <p>Reference: RFC 6184 Section 8.1, ITU-T Recommendation H.264
8139          */
8140         public static final String KEY_H264_VIDEO_CODEC_ATTRIBUTE_PROFILE_LEVEL_ID_STRING =
8141                 KEY_PREFIX + "h264_video_codec_attribute_profile_level_id_string";
8142 
getDefaults()8143         private static PersistableBundle getDefaults() {
8144             PersistableBundle defaults = new PersistableBundle();
8145             defaults.putBoolean(KEY_VIDEO_ON_DEFAULT_BEARER_SUPPORTED_BOOL, false);
8146             defaults.putBoolean(KEY_VIDEO_QOS_PRECONDITION_SUPPORTED_BOOL, true);
8147 
8148             defaults.putInt(KEY_VIDEO_RTP_INACTIVITY_TIMER_MILLIS_INT, 0);
8149             defaults.putInt(KEY_VIDEO_RTCP_INACTIVITY_TIMER_MILLIS_INT, 0);
8150 
8151             defaults.putInt(KEY_VIDEO_AS_BANDWIDTH_KBPS_INT, 960);
8152             defaults.putInt(KEY_VIDEO_RS_BANDWIDTH_BPS_INT, 8000);
8153             defaults.putInt(KEY_VIDEO_RR_BANDWIDTH_BPS_INT, 6000);
8154             defaults.putInt(KEY_VIDEO_RTP_DSCP_INT, 40);
8155 
8156             PersistableBundle video_codec_capability_payload_types = new PersistableBundle();
8157 
8158             video_codec_capability_payload_types.putIntArray(
8159                     KEY_H264_PAYLOAD_TYPE_INT_ARRAY,
8160                     new int[] { 99, 100 });
8161 
8162             defaults.putPersistableBundle(
8163                     KEY_VIDEO_CODEC_CAPABILITY_PAYLOAD_TYPES_BUNDLE,
8164                     video_codec_capability_payload_types);
8165 
8166             PersistableBundle all_h264_payload_bundles = new PersistableBundle();
8167 
8168             /* Setting default codec attributes for individual H264 profiles*/
8169 
8170             /* For H264 profile-level-id: 42C00C, frame rate:15, Resolution: 240x320 */
8171             PersistableBundle h264_bundle_instance1 = new PersistableBundle();
8172             all_h264_payload_bundles.putPersistableBundle(
8173                     "99", /* Same value of payload type as in KEY_H264_PAYLOAD_TYPE_INT_ARRAY */
8174                     h264_bundle_instance1);
8175 
8176             /* For H264 profile-level-id: 42C00C, packetisation mode:0, frame rate:15,
8177              * Resolution: 240x320 */
8178             PersistableBundle h264_bundle_instance2 = new PersistableBundle();
8179             h264_bundle_instance2.putInt(
8180                     KEY_VIDEO_CODEC_ATTRIBUTE_PACKETIZATION_MODE_INT,
8181                     0);
8182 
8183             all_h264_payload_bundles.putPersistableBundle(
8184                     "100", /* Same value of payload type as in KEY_H264_PAYLOAD_TYPE_INT_ARRAY */
8185                     h264_bundle_instance2);
8186 
8187             defaults.putPersistableBundle(
8188                     KEY_H264_PAYLOAD_DESCRIPTION_BUNDLE,
8189                     all_h264_payload_bundles);
8190 
8191             return defaults;
8192         }
8193     }
8194 
8195     /**
8196      * WiFi Calling. This groups the configs specific for Voice over WiFi/WFC call.
8197      */
8198     public static final class ImsWfc {
ImsWfc()8199         private ImsWfc() {}
8200 
8201         /** Prefix of all imswfc.KEY_* constants. */
8202         public static final String KEY_PREFIX = "imswfc.";
8203 
8204         /**
8205          *  List of MDNs for which Geo-location PIDF XML with country info
8206          *  needs to included for normal calls involving short code.
8207          */
8208         public static final String KEY_PIDF_SHORT_CODE_STRING_ARRAY =
8209                 KEY_PREFIX + "pidf_short_code_string_array";
8210 
8211         /**
8212          * Flag specifying whether emergency call over VoWiFi is requested over
8213          * emergency PDN or IMS PDN.
8214          *
8215          * <p>If {@code false}: E911 call uses IMS PDN for E911 call over VoWiFi.
8216          * If {@code true}: E911 call uses Emergency PDN for E911 call over VoWiFi.
8217          */
8218         public static final String KEY_EMERGENCY_CALL_OVER_EMERGENCY_PDN_BOOL =
8219                 KEY_PREFIX + "emergency_call_over_emergency_pdn_bool";
8220 
getDefaults()8221         private static PersistableBundle getDefaults() {
8222             PersistableBundle defaults = new PersistableBundle();
8223 
8224             defaults.putBoolean(KEY_EMERGENCY_CALL_OVER_EMERGENCY_PDN_BOOL, false);
8225             defaults.putStringArray(KEY_PIDF_SHORT_CODE_STRING_ARRAY, new String[0]);
8226 
8227             return defaults;
8228         }
8229     }
8230 
8231     /**
8232      *   IMS supplementary services configs. This groups the configs required for
8233      *   supplementary services (SS) like XCAP over UT,
8234      *   Unstructured Supplementary Service Data(USSD).
8235      */
8236     public static final class ImsSs {
ImsSs()8237         private ImsSs() {}
8238 
8239         /** Prefix of all imsss.KEY_* constants. */
8240         public static final String KEY_PREFIX = "imsss.";
8241 
8242         /**
8243          * Flag that controls whether XCAP over UT status need to be
8244          * dependent on IMS registration.
8245          *
8246          * <p>If {@code true}: XCAP over UT status need to be
8247          * dependent on IMS registration.
8248          * {@code false} otherwise.
8249          */
8250         public static final String KEY_UT_REQUIRES_IMS_REGISTRATION_BOOL =
8251                 KEY_PREFIX + "ut_requires_ims_registration_bool";
8252 
8253         /**
8254          * Flag that controls whether XCAP over UT is supported
8255          * when on roaming network.
8256          *
8257          * <p>If {@code true}: XCAP over UT is supported when on
8258          * roaming network.
8259          * {@code false} otherwise.
8260          */
8261         public static final String KEY_UT_SUPPORTED_WHEN_ROAMING_BOOL =
8262                 KEY_PREFIX + "ut_supported_when_roaming_bool";
8263 
8264         /**
8265          * Flag that controls whether Circuit Switched Fallback (CSFB)
8266          * option is available when XCAP over UT fails.
8267          *
8268          * <p>If {@code false}:  XCAP over UT only with no CSFB option.
8269          * If XCAP over UT fails, return error.
8270          * if {@code true}, Use CSFB if XCAP over UT fails.
8271          */
8272         public static final String KEY_USE_CSFB_ON_XCAP_OVER_UT_FAILURE_BOOL =
8273                 KEY_PREFIX + "use_csfb_on_xcap_over_ut_failure_bool";
8274 
8275         /**
8276          * Flag that controls whether XCAP over UT is enabled or not
8277          * when PS data is turned off.
8278          *
8279          * <p>If {@code true}: XCAP over UT is enabled when PS data is off.
8280          * {@code false}: Otherwise.
8281          *
8282          * Reference: IR.92 Section 5.5.1
8283          */
8284         public static final String KEY_UT_SUPPORTED_WHEN_PS_DATA_OFF_BOOL =
8285                 KEY_PREFIX + "ut_supported_when_ps_data_off_bool";
8286 
8287         /**
8288          * Flag that controls whether network initiated USSD over IMS is
8289          * supported by the UE.
8290          *
8291          * <p>If {@code true}:  Support Available.{@code false}: Otherwise.
8292          * Reference: 3GPP 24.390.
8293          */
8294         public static final String KEY_NETWORK_INITIATED_USSD_OVER_IMS_SUPPORTED_BOOL =
8295                 KEY_PREFIX + "network_initiated_ussd_over_ims_supported_bool";
8296 
8297         /**
8298          * Specifies the 'XCAP over UT' IP Type when device is
8299          * on Home Network.
8300          *
8301          * <p>Possible values are,
8302          * {@link ApnSetting#PROTOCOL_IPV4V6},
8303          * {@link ApnSetting#PROTOCOL_IP},
8304          * {@link ApnSetting#PROTOCOL_IPV6}
8305          *
8306          * If key is invalid or not configured, the default value
8307          * {@link ApnSetting#PROTOCOL_IPV4V6} will apply.
8308          */
8309         public static final String KEY_UT_IPTYPE_HOME_INT =
8310                 KEY_PREFIX + "ut_iptype_home_int";
8311 
8312         /**
8313          * Specifies the 'XCAP over UT' IP Type when device is roaming.
8314          *
8315          * <p>Possible values are,
8316          * {@link ApnSetting#PROTOCOL_IPV4V6},
8317          * {@link ApnSetting#PROTOCOL_IP},
8318          * {@link ApnSetting#PROTOCOL_IPV6}
8319 
8320          * If key is invalid or not configured, the default value
8321          * {@link ApnSetting#PROTOCOL_IPV4V6} will apply.
8322          */
8323         public static final String KEY_UT_IPTYPE_ROAMING_INT =
8324                 KEY_PREFIX + "ut_iptype_roaming_int";
8325 
8326         /**
8327          * Specifies the XCAP Application Server fully qualified domain name (FQDN).
8328          * <p> Reference: 24.623 Section 5.2.3.
8329          */
8330         public static final String KEY_UT_AS_SERVER_FQDN_STRING =
8331                 KEY_PREFIX + "ut_as_server_fqdn_string";
8332 
8333         /**
8334          * Specifies the XCAP Application Server Remote port.
8335          * As XCAP is a usage of HTTP, the default value is same as HTTP, i.e. 80.
8336          */
8337         public static final String KEY_UT_AS_SERVER_PORT_INT =
8338                 KEY_PREFIX + "ut_as_server_port_int";
8339 
8340         /**
8341          * Specifies the preferred transport to be used for XCAP over UT.
8342          *
8343          * <p>Possible values are,
8344          * {@link Ims#PREFERRED_TRANSPORT_TCP},
8345          * {@link Ims#PREFERRED_TRANSPORT_TLS}
8346          *
8347          * <p>If key is invalid or not configured, the default value
8348          * {@link Ims#PREFERRED_TRANSPORT_TCP} will apply.
8349          */
8350         public static final String KEY_UT_TRANSPORT_TYPE_INT =
8351                 KEY_PREFIX + "ut_transport_type_int";
8352 
8353         /** @hide */
8354         @IntDef({
8355             SUPPLEMENTARY_SERVICE_CW,
8356             SUPPLEMENTARY_SERVICE_CF_ALL,
8357             SUPPLEMENTARY_SERVICE_CF_CFU,
8358             SUPPLEMENTARY_SERVICE_CF_ALL_CONDITONAL_FORWARDING,
8359             SUPPLEMENTARY_SERVICE_CF_CFB,
8360             SUPPLEMENTARY_SERVICE_CF_CFNRY,
8361             SUPPLEMENTARY_SERVICE_CF_CFNRC,
8362             SUPPLEMENTARY_SERVICE_CF_CFNL,
8363             SUPPLEMENTARY_SERVICE_IDENTIFICATION_OIP,
8364             SUPPLEMENTARY_SERVICE_IDENTIFICATION_TIP,
8365             SUPPLEMENTARY_SERVICE_IDENTIFICATION_OIR,
8366             SUPPLEMENTARY_SERVICE_IDENTIFICATION_TIR,
8367             SUPPLEMENTARY_SERVICE_CB_ALL,
8368             SUPPLEMENTARY_SERVICE_CB_OBS,
8369             SUPPLEMENTARY_SERVICE_CB_BAOC,
8370             SUPPLEMENTARY_SERVICE_CB_BOIC,
8371             SUPPLEMENTARY_SERVICE_CB_BOIC_EXHC,
8372             SUPPLEMENTARY_SERVICE_CB_IBS,
8373             SUPPLEMENTARY_SERVICE_CB_BAIC,
8374             SUPPLEMENTARY_SERVICE_CB_BIC_ROAM,
8375             SUPPLEMENTARY_SERVICE_CB_ACR,
8376             SUPPLEMENTARY_SERVICE_CB_BIL
8377         })
8378         public @interface SsType {}
8379 
8380         /** Communication Waiting (CW) support as per 3GPP 24.615. */
8381         public static final int SUPPLEMENTARY_SERVICE_CW = 0;
8382 
8383         /**
8384          * Call Diversion - All call forwarding support as per 3GPP 24.604.
8385          *
8386          * <p>This value is associated with MMI support service code 002
8387          * as indicated in TS 22.030 Table B.1
8388          */
8389         public static final int SUPPLEMENTARY_SERVICE_CF_ALL = 1;
8390 
8391         /**
8392          * Call Diversion - All Unconditional call forwarding support (CFU) as
8393          * per 3GPP 24.604.
8394          *
8395          * <p>This value is associated with MMI support service code 21
8396          * as indicated in TS 22.030 Table B.1
8397          */
8398         public static final int SUPPLEMENTARY_SERVICE_CF_CFU = 2;
8399 
8400         /**
8401          * Call Diversion - All conditional call forwarding support as
8402          * per 3GPP 24.604.
8403          *
8404          * <p>This value is associated with MMI support service code 004
8405          * as indicated in TS 22.030 Table B.1
8406          */
8407         public static final int SUPPLEMENTARY_SERVICE_CF_ALL_CONDITONAL_FORWARDING = 3;
8408 
8409         /**
8410          * Call Diversion - Call forwarding on mobile subscriber busy (CFB)
8411          * support as per 3GPP 24.604.
8412          *
8413          * <p>This value is associated with MMI support service code 67
8414          * as indicated in TS 22.030 Table B.1
8415          */
8416         public static final int SUPPLEMENTARY_SERVICE_CF_CFB = 4;
8417 
8418         /**
8419          * Call Diversion - Call forwarding on no reply (CFNRY)
8420          * support as per 3GPP 24.604.
8421          *
8422          * <p>This value is associated with MMI support service code 61
8423          * as indicated in TS 22.030 Table B.1
8424          */
8425         public static final int SUPPLEMENTARY_SERVICE_CF_CFNRY = 5;
8426 
8427         /**
8428          * Call Diversion - Call forwarding on mobile subscriber not reachable
8429          * (CFNRC) support as per 3GPP 24.604.
8430          *
8431          * <p>This value is associated with MMI support service code 62
8432          * as indicated in TS 22.030 Table B.1
8433          */
8434         public static final int SUPPLEMENTARY_SERVICE_CF_CFNRC = 6;
8435 
8436         /**
8437          * Communication Forwarding on Not Logged-in (CFNL).
8438          * support as per 3GPP 24.604 Section 4.2.1.7
8439          *
8440          */
8441         public static final int SUPPLEMENTARY_SERVICE_CF_CFNL = 7;
8442 
8443         /**
8444          * Originating Identification Presentation (OIP) support
8445          * as per 3GPP 24.607.
8446          *
8447          */
8448         public static final int SUPPLEMENTARY_SERVICE_IDENTIFICATION_OIP = 8;
8449 
8450         /**
8451          * Terminating Identification Presentation (TIP) support
8452          * as per 3GPP 24.608.
8453          */
8454         public static final int SUPPLEMENTARY_SERVICE_IDENTIFICATION_TIP = 9;
8455 
8456         /**
8457          * Originating Identification Restriction (OIR) support
8458          * as per 3GPP 24.607.
8459          */
8460         public static final int SUPPLEMENTARY_SERVICE_IDENTIFICATION_OIR = 10;
8461 
8462         /**
8463          * Terminating Identification Restriction (TIR) support
8464          * as per 3GPP 24.608.
8465          */
8466         public static final int SUPPLEMENTARY_SERVICE_IDENTIFICATION_TIR = 11;
8467 
8468         /**
8469          * Call Barring - All barring services,
8470          * This value is associated with MMI support service code 330
8471          * as indicated TS 22.030 Table B.1
8472          */
8473         public static final int SUPPLEMENTARY_SERVICE_CB_ALL = 12;
8474 
8475         /**
8476          * Call Barring - Outgoing barring services,
8477          * This value is associated with MMI support service code 333
8478          * as indicated TS 22.030 Table B.1
8479          */
8480         public static final int SUPPLEMENTARY_SERVICE_CB_OBS = 13;
8481 
8482         /**
8483          * Call Barring - Barring of all outgoing calls (BAOC)
8484          * support as per 3GPP TS 24.611.
8485          *
8486          * <p>This value is associated with MMI support service code 33
8487          * as indicated TS 22.030 Table B.1
8488          */
8489         public static final int SUPPLEMENTARY_SERVICE_CB_BAOC = 14;
8490 
8491         /**
8492          * Call Barring - Barring of outgoing international calls
8493          * (BOIC) support as per 3GPP TS 24.611.
8494          *
8495          * <p>This value is associated with MMI support service code 331
8496          * as indicated TS 22.030 Table B.1
8497          */
8498         public static final int SUPPLEMENTARY_SERVICE_CB_BOIC = 15;
8499 
8500         /**
8501          * Call Barring - Barring of outgoing international calls
8502          * except those directed to the home PLMN country (BOIC-EXHC) support
8503          * as per 3GPP TS 24.611.
8504          *
8505          * <p>This value is associated with MMI support service code 332
8506          * as indicated TS 22.030 Table B.1
8507          */
8508         public static final int SUPPLEMENTARY_SERVICE_CB_BOIC_EXHC = 16;
8509 
8510         /**
8511          * Call Barring - Incoming barring services,
8512          * This value is associated with MMI support service code 353
8513          * as indicated TS 22.030 Table B.1
8514          */
8515         public static final int SUPPLEMENTARY_SERVICE_CB_IBS = 17;
8516 
8517         /**
8518          * Call Barring - Barring of all incoming calls (BAIC)
8519          * support as per 3GPP TS 24.611.
8520          *
8521          * <p>This value is associated with MMI support service code 35
8522          * as indicated TS 22.030 Table B.1
8523          */
8524         public static final int SUPPLEMENTARY_SERVICE_CB_BAIC = 18;
8525 
8526         /**
8527          * Call Barring - Barring of incoming calls when roaming outside
8528          * the home PLMN country (BIC-ROAM) support as per 3GPP TS 24.611.
8529          *
8530          * <p>This value is associated with MMI support service code 351
8531          * as indicated TS 22.030 Table B.1
8532          */
8533         public static final int SUPPLEMENTARY_SERVICE_CB_BIC_ROAM = 19;
8534 
8535         /**
8536          * Call Barring - Anonymous Call Rejection/Barring of all anonymous
8537          * incoming number support as per 3GPP TS 24.611.
8538          */
8539         public static final int SUPPLEMENTARY_SERVICE_CB_ACR = 20;
8540 
8541         /**
8542          * Call Barring - Barring list of incoming numbers support.
8543          */
8544         public static final int SUPPLEMENTARY_SERVICE_CB_BIL = 21;
8545 
8546         /**
8547          * List of UT services that are Server based.
8548          *
8549          * <p>Possible values are,
8550          * <UL>
8551          *     <LI>{@link #SUPPLEMENTARY_SERVICE_CW}</LI>
8552          *     <LI>{@link #SUPPLEMENTARY_SERVICE_CF_ALL}</LI>
8553          *     <LI>{@link #SUPPLEMENTARY_SERVICE_CF_CFU}</LI>
8554          *     <LI>{@link #SUPPLEMENTARY_SERVICE_CF_ALL_CONDITONAL_FORWARDING}</LI>
8555          *     <LI>{@link #SUPPLEMENTARY_SERVICE_CF_CFB}</LI>
8556          *     <LI>{@link #SUPPLEMENTARY_SERVICE_CF_CFNRY}</LI>
8557          *     <LI>{@link #SUPPLEMENTARY_SERVICE_CF_CFNRC}</LI>
8558          *     <LI>{@link #SUPPLEMENTARY_SERVICE_CF_CFNL}</LI>
8559          *     <LI>{@link #SUPPLEMENTARY_SERVICE_IDENTIFICATION_OIP}</LI>
8560          *     <LI>{@link #SUPPLEMENTARY_SERVICE_IDENTIFICATION_TIP}</LI>
8561          *     <LI>{@link #SUPPLEMENTARY_SERVICE_IDENTIFICATION_OIR}</LI>
8562          *     <LI>{@link #SUPPLEMENTARY_SERVICE_IDENTIFICATION_TIR}</LI>
8563          *     <LI>{@link #SUPPLEMENTARY_SERVICE_CB_ALL}</LI>
8564          *     <LI>{@link #SUPPLEMENTARY_SERVICE_CB_OBS}</LI>
8565          *     <LI>{@link #SUPPLEMENTARY_SERVICE_CB_IBS}</LI>
8566          *     <LI>{@link #SUPPLEMENTARY_SERVICE_CB_BAOC}</LI>
8567          *     <LI>{@link #SUPPLEMENTARY_SERVICE_CB_BOIC}</LI>
8568          *     <LI>{@link #SUPPLEMENTARY_SERVICE_CB_BOIC_EXHC}</LI>
8569          *     <LI>{@link #SUPPLEMENTARY_SERVICE_CB_BAIC}</LI>
8570          *     <LI>{@link #SUPPLEMENTARY_SERVICE_CB_BIC_ROAM}</LI>
8571          *     <LI>{@link #SUPPLEMENTARY_SERVICE_CB_ACR}</LI>
8572          *     <LI>{@link #SUPPLEMENTARY_SERVICE_CB_BIL}</LI>
8573          * </UL>
8574          */
8575         public static final String KEY_UT_SERVER_BASED_SERVICES_INT_ARRAY =
8576                 KEY_PREFIX + "ut_server_based_services_int_array";
8577 
8578         /**
8579          * List of UT services that are terminal based.
8580          *
8581          * By default, all services are server based and defined in
8582          * {@link #KEY_UT_SERVER_BASED_SERVICES_INT_ARRAY}.
8583          * Adding here will override that service setting to terminal based.
8584          *
8585          * <p>Possible values are,
8586          * <UL>
8587          *     <LI>{@link #SUPPLEMENTARY_SERVICE_CW}</LI>
8588          *     <LI>{@link #SUPPLEMENTARY_SERVICE_IDENTIFICATION_OIR}</LI>
8589          * </UL>
8590          */
8591         public static final String KEY_UT_TERMINAL_BASED_SERVICES_INT_ARRAY =
8592                 KEY_PREFIX + "ut_terminal_based_services_int_array";
8593 
8594         /**
8595          * List of different RAT technologies on which XCAP over UT
8596          * is supported.
8597          *
8598          * <p>Possible values are,
8599          * {@link AccessNetworkConstants.AccessNetworkType#NGRAN}
8600          * {@link AccessNetworkConstants.AccessNetworkType#EUTRAN}
8601          * {@link AccessNetworkConstants.AccessNetworkType#IWLAN}
8602          * {@link AccessNetworkConstants.AccessNetworkType#UTRAN}
8603          * {@link AccessNetworkConstants.AccessNetworkType#GERAN}
8604          */
8605         public static final String KEY_XCAP_OVER_UT_SUPPORTED_RATS_INT_ARRAY =
8606                 KEY_PREFIX + "xcap_over_ut_supported_rats_int_array";
8607 
8608         /** @hide */
8609         @IntDef({
8610             CALL_WAITING_SYNC_NONE,
8611             CALL_WAITING_SYNC_USER_CHANGE,
8612             CALL_WAITING_SYNC_FIRST_POWER_UP,
8613             CALL_WAITING_SYNC_FIRST_CHANGE,
8614             CALL_WAITING_SYNC_IMS_ONLY
8615         })
8616         public @interface CwSyncType {}
8617 
8618         /**
8619          * Do not synchronize the user's call waiting setting with the network. Call waiting is
8620          * always enabled on the carrier network and the user setting for call waiting is applied
8621          * on the terminal side. If the user disables call waiting, the call will be rejected on
8622          * the terminal.
8623          */
8624         public static final int CALL_WAITING_SYNC_NONE = 0;
8625 
8626         /**
8627          * The change of user’s setting is always passed to the carrier network
8628          * and then synchronized to the terminal based call waiting solution over IMS.
8629          * If changing the service over the carrier network is not successful,
8630          * the setting over IMS shall not be changed.
8631          */
8632         public static final int CALL_WAITING_SYNC_USER_CHANGE = 1;
8633 
8634         /**
8635          * Activate call waiting on the carrier network when the device boots or a subscription
8636          * using this carrier is loaded. Call waiting is always considered enabled on the carrier
8637          * network and the user setting for call waiting is applied on the terminal side only. If
8638          * the user disables call waiting, the call will be rejected on the terminal.
8639          * The mismatch between CS calls and IMS calls can happen when the network based call
8640          * waiting service is in disabled state in the legacy 3G/2G networks while it's enabled
8641          * in the terminal side.
8642          */
8643         public static final int CALL_WAITING_SYNC_FIRST_POWER_UP = 2;
8644 
8645         /**
8646          * Activate call waiting on the carrier network when the user enables call waiting the
8647          * first time. Call waiting is then always considered enabled on the carrier network. If
8648          * the user disables call waiting, the setting will only be applied to the terminal based
8649          * call waiting service and the call will be rejected on the terminal.
8650          * The mismatch between CS calls and IMS calls can happen when the network based call
8651          * waiting service is in disabled state in the legacy 3G/2G networks while it's enabled
8652          * in the terminal side. However, if the user retrieves the setting again when the device
8653          * is in the legacy 3G/2G networks, the correct state will be shown to the user.
8654          */
8655         public static final int CALL_WAITING_SYNC_FIRST_CHANGE = 3;
8656 
8657         /**
8658          * Do not synchronize the call waiting service state between the carrier network and
8659          * the terminal based IMS call waiting service. If the user changes the call waiting setting
8660          * when IMS is registered, the change will only be applied to the terminal based call
8661          * waiting service. If IMS is not registered when call waiting is changed, synchronize this
8662          * setting with the carrier network.
8663          */
8664         public static final int CALL_WAITING_SYNC_IMS_ONLY = 4;
8665 
8666         /** @hide */
8667         public static final int CALL_WAITING_SYNC_MAX = CALL_WAITING_SYNC_IMS_ONLY;
8668 
8669         /**
8670          * Flag indicating the way to synchronize the setting between CS and IMS.
8671          *
8672          * <p>Possible values are,
8673          * {@link #CALL_WAITING_SYNC_NONE},
8674          * {@link #CALL_WAITING_SYNC_USER_CHANGE},
8675          * {@link #CALL_WAITING_SYNC_FIRST_POWER_UP},
8676          * {@link #CALL_WAITING_SYNC_FIRST_CHANGE},
8677          * {@link #CALL_WAITING_SYNC_IMS_ONLY}.
8678          *
8679          * This configuration is valid only when
8680          * {@link #KEY_UT_TERMINAL_BASED_SERVICES_INT_ARRAY} includes
8681          * {@link #SUPPLEMENTARY_SERVICE_CW}.
8682          *
8683          * <p>If key is invalid or not configured, the default value
8684          * {@link #CALL_WAITING_SYNC_FIRST_CHANGE} will apply.
8685          */
8686         public static final String KEY_TERMINAL_BASED_CALL_WAITING_SYNC_TYPE_INT =
8687                 KEY_PREFIX + "terminal_based_call_waiting_sync_type_int";
8688 
8689         /**
8690          * Flag indicating whether the user setting for terminal-based call waiting
8691          * is enabled by default or not.
8692          * This configuration is valid only when
8693          * {@link #KEY_UT_TERMINAL_BASED_SERVICES_INT_ARRAY} includes
8694          * {@link #SUPPLEMENTARY_SERVICE_CW}.
8695          *
8696          * The default value for this key is {@code true}.
8697          */
8698         public static final String KEY_TERMINAL_BASED_CALL_WAITING_DEFAULT_ENABLED_BOOL =
8699                 KEY_PREFIX + "terminal_based_call_waiting_default_enabled_bool";
8700 
getDefaults()8701         private static PersistableBundle getDefaults() {
8702             PersistableBundle defaults = new PersistableBundle();
8703             defaults.putBoolean(KEY_UT_REQUIRES_IMS_REGISTRATION_BOOL, false);
8704             defaults.putBoolean(KEY_USE_CSFB_ON_XCAP_OVER_UT_FAILURE_BOOL, true);
8705             defaults.putBoolean(KEY_UT_SUPPORTED_WHEN_PS_DATA_OFF_BOOL, true);
8706             defaults.putBoolean(KEY_NETWORK_INITIATED_USSD_OVER_IMS_SUPPORTED_BOOL, true);
8707             defaults.putBoolean(KEY_UT_SUPPORTED_WHEN_ROAMING_BOOL, true);
8708 
8709             defaults.putInt(KEY_UT_IPTYPE_HOME_INT, ApnSetting.PROTOCOL_IPV4V6);
8710             defaults.putInt(KEY_UT_IPTYPE_ROAMING_INT, ApnSetting.PROTOCOL_IPV4V6);
8711             defaults.putInt(KEY_UT_AS_SERVER_PORT_INT, 80);
8712             defaults.putInt(KEY_UT_TRANSPORT_TYPE_INT, Ims.PREFERRED_TRANSPORT_TCP);
8713 
8714             defaults.putIntArray(
8715                     KEY_UT_SERVER_BASED_SERVICES_INT_ARRAY,
8716                     new int[] {
8717                         SUPPLEMENTARY_SERVICE_CW,
8718                         SUPPLEMENTARY_SERVICE_CF_ALL,
8719                         SUPPLEMENTARY_SERVICE_CF_CFU,
8720                         SUPPLEMENTARY_SERVICE_CF_CFNRC,
8721                         SUPPLEMENTARY_SERVICE_CF_ALL_CONDITONAL_FORWARDING,
8722                         SUPPLEMENTARY_SERVICE_CF_CFB,
8723                         SUPPLEMENTARY_SERVICE_CF_CFNRY,
8724                         SUPPLEMENTARY_SERVICE_CF_CFNL,
8725                         SUPPLEMENTARY_SERVICE_IDENTIFICATION_OIP,
8726                         SUPPLEMENTARY_SERVICE_IDENTIFICATION_TIP,
8727                         SUPPLEMENTARY_SERVICE_IDENTIFICATION_OIR,
8728                         SUPPLEMENTARY_SERVICE_IDENTIFICATION_TIR,
8729                         SUPPLEMENTARY_SERVICE_CB_ALL,
8730                         SUPPLEMENTARY_SERVICE_CB_OBS,
8731                         SUPPLEMENTARY_SERVICE_CB_IBS,
8732                         SUPPLEMENTARY_SERVICE_CB_BAOC,
8733                         SUPPLEMENTARY_SERVICE_CB_BOIC,
8734                         SUPPLEMENTARY_SERVICE_CB_BOIC_EXHC,
8735                         SUPPLEMENTARY_SERVICE_CB_BAIC,
8736                         SUPPLEMENTARY_SERVICE_CB_BIC_ROAM,
8737                         SUPPLEMENTARY_SERVICE_CB_ACR,
8738                         SUPPLEMENTARY_SERVICE_CB_BIL
8739                     });
8740             defaults.putIntArray(KEY_UT_TERMINAL_BASED_SERVICES_INT_ARRAY, new int[0]);
8741 
8742             defaults.putIntArray(
8743                     KEY_XCAP_OVER_UT_SUPPORTED_RATS_INT_ARRAY,
8744                     new int[] {
8745                         AccessNetworkType.EUTRAN,
8746                         AccessNetworkType.IWLAN,
8747                         AccessNetworkType.NGRAN
8748                     });
8749             defaults.putString(KEY_UT_AS_SERVER_FQDN_STRING, "");
8750             defaults.putBoolean(KEY_TERMINAL_BASED_CALL_WAITING_DEFAULT_ENABLED_BOOL, true);
8751             defaults.putInt(KEY_TERMINAL_BASED_CALL_WAITING_SYNC_TYPE_INT,
8752                     CALL_WAITING_SYNC_FIRST_CHANGE);
8753 
8754             return defaults;
8755         }
8756     }
8757 
8758     /**
8759      * This groups the BSF (BootStrapping Function) related configs.
8760      * Reference: 3GPP TS 24.109.
8761      */
8762     public static final class Bsf {
Bsf()8763         private Bsf() {}
8764 
8765         /** Prefix of all bsf.KEY_* constants. */
8766         public static final String KEY_PREFIX = "bsf.";
8767 
8768         /** Specifies the fully qualified domain name (FQDN) of BSF Server
8769          * as per 3GPP 24.109.
8770          */
8771         public static final String KEY_BSF_SERVER_FQDN_STRING =
8772                 KEY_PREFIX + "bsf_server_fqdn_string";
8773 
8774         /**
8775          * Specifies the port number of the BSF server as per 3GPP 24.109.
8776          * This is usually default port number of HTTP, i.e. 80.
8777          */
8778         public static final String KEY_BSF_SERVER_PORT_INT =
8779                 KEY_PREFIX + "bsf_server_port_int";
8780 
8781         /**
8782          * Specifies the transport type used in communication with
8783          * BSF server.
8784          *
8785          * <p>Possible values are,
8786          * {@link Ims#PREFERRED_TRANSPORT_TCP},
8787          * {@link Ims#PREFERRED_TRANSPORT_TLS}
8788          *
8789          * <p>If key is invalid or not configured, the default value
8790          * {@link Ims#PREFERRED_TRANSPORT_TCP} will apply.
8791          */
8792         public static final String KEY_BSF_TRANSPORT_TYPE_INT =
8793                 KEY_PREFIX + "bsf_transport_type_int";
8794 
getDefaults()8795         private static PersistableBundle getDefaults() {
8796             PersistableBundle defaults = new PersistableBundle();
8797 
8798             defaults.putInt(KEY_BSF_SERVER_PORT_INT, 80);
8799             defaults.putInt(KEY_BSF_TRANSPORT_TYPE_INT, Ims.PREFERRED_TRANSPORT_TCP);
8800             defaults.putString(KEY_BSF_SERVER_FQDN_STRING, "");
8801 
8802             return defaults;
8803         }
8804     }
8805 
8806     /**
8807      * Configs used for epdg tunnel bring up.
8808      *
8809      * @see <a href="https://tools.ietf.org/html/rfc7296">RFC 7296, Internet Key Exchange Protocol
8810      *     Version 2 (IKEv2)</a>
8811      */
8812     public static final class Iwlan {
8813         /** Prefix of all Epdg.KEY_* constants. */
8814         public static final String KEY_PREFIX = "iwlan.";
8815 
8816         /**
8817          * Time in seconds after which the child security association session is terminated if rekey
8818          * procedure is not successful. If not set or set to <= 0, the default value is 3600
8819          * seconds.
8820          */
8821         public static final String KEY_CHILD_SA_REKEY_HARD_TIMER_SEC_INT =
8822                 KEY_PREFIX + "child_sa_rekey_hard_timer_sec_int";
8823 
8824         /**
8825          * Time in seconds after which the child session rekey procedure is started. If not set or
8826          * set to <= 0, default value is 3000 seconds.
8827          */
8828         public static final String KEY_CHILD_SA_REKEY_SOFT_TIMER_SEC_INT =
8829                 KEY_PREFIX + "child_sa_rekey_soft_timer_sec_int";
8830 
8831         /**
8832          * Supported DH groups for IKE negotiation. Possible values are:
8833          * {@link android.net.ipsec.ike.SaProposal#DH_GROUP_NONE},
8834          * {@link android.net.ipsec.ike.SaProposal#DH_GROUP_1024_BIT_MODP},
8835          * {@link android.net.ipsec.ike.SaProposal#DH_GROUP_1536_BIT_MODP},
8836          * {@link android.net.ipsec.ike.SaProposal#DH_GROUP_2048_BIT_MODP}
8837          */
8838         public static final String KEY_DIFFIE_HELLMAN_GROUPS_INT_ARRAY =
8839                 KEY_PREFIX + "diffie_hellman_groups_int_array";
8840 
8841         /**
8842          * Time in seconds after which a dead peer detection (DPD) request is sent. If not set or
8843          * set to <= 0, default value is 120 seconds.
8844          */
8845         public static final String KEY_DPD_TIMER_SEC_INT = KEY_PREFIX + "dpd_timer_sec_int";
8846 
8847         /**
8848          * Method used to authenticate epdg server. Possible values are {@link
8849          * #AUTHENTICATION_METHOD_EAP_ONLY}, {@link #AUTHENTICATION_METHOD_CERT}
8850          */
8851         public static final String KEY_EPDG_AUTHENTICATION_METHOD_INT =
8852                 KEY_PREFIX + "epdg_authentication_method_int";
8853 
8854         /**
8855          * A priority list of ePDG addresses to be used. Possible values are {@link
8856          * #EPDG_ADDRESS_STATIC}, {@link #EPDG_ADDRESS_PLMN}, {@link #EPDG_ADDRESS_PCO}, {@link
8857          * #EPDG_ADDRESS_CELLULAR_LOC}, {@link #EPDG_ADDRESS_VISITED_COUNTRY}
8858          */
8859         public static final String KEY_EPDG_ADDRESS_PRIORITY_INT_ARRAY =
8860                 KEY_PREFIX + "epdg_address_priority_int_array";
8861 
8862         /**
8863          * A priority list of PLMN to be used in EPDG_ADDRESS_PLMN. Possible values are {@link
8864          * #EPDG_PLMN_RPLMN}, {@link #EPDG_PLMN_HPLMN}, {@link #EPDG_PLMN_EHPLMN_ALL}, {@link
8865          * #EPDG_PLMN_EHPLMN_FIRST}
8866          *
8867          * @hide
8868          */
8869         public static final String KEY_EPDG_PLMN_PRIORITY_INT_ARRAY =
8870                 KEY_PREFIX + "epdg_plmn_priority_int_array";
8871 
8872         /** Epdg static IP address or FQDN */
8873         public static final String KEY_EPDG_STATIC_ADDRESS_STRING =
8874                 KEY_PREFIX + "epdg_static_address_string";
8875 
8876         /** Epdg static IP address or FQDN for roaming */
8877         public static final String KEY_EPDG_STATIC_ADDRESS_ROAMING_STRING =
8878                 KEY_PREFIX + "epdg_static_address_roaming_string";
8879 
8880         /**
8881          * List of supported key sizes for AES Cipher Block Chaining (CBC) encryption mode of child
8882          * session. Possible values are:
8883          * {@link android.net.ipsec.ike.SaProposal#KEY_LEN_UNUSED},
8884          * {@link android.net.ipsec.ike.SaProposal#KEY_LEN_AES_128},
8885          * {@link android.net.ipsec.ike.SaProposal#KEY_LEN_AES_192},
8886          * {@link android.net.ipsec.ike.SaProposal#KEY_LEN_AES_256}
8887          */
8888         public static final String KEY_CHILD_SESSION_AES_CBC_KEY_SIZE_INT_ARRAY =
8889                 KEY_PREFIX + "child_session_aes_cbc_key_size_int_array";
8890 
8891         /**
8892          * List of supported key sizes for AES Counter (CTR) encryption mode of child session.
8893          * Possible values are:
8894          * {@link android.net.ipsec.ike.SaProposal#KEY_LEN_UNUSED},
8895          * {@link android.net.ipsec.ike.SaProposal#KEY_LEN_AES_128},
8896          * {@link android.net.ipsec.ike.SaProposal#KEY_LEN_AES_192},
8897          * {@link android.net.ipsec.ike.SaProposal#KEY_LEN_AES_256}
8898          */
8899         public static final String KEY_CHILD_SESSION_AES_CTR_KEY_SIZE_INT_ARRAY =
8900                 KEY_PREFIX + "child_session_aes_ctr_key_size_int_array";
8901 
8902         /**
8903          * List of supported encryption algorithms for child session. Possible values are
8904          * {@link android.net.ipsec.ike.SaProposal#ENCRYPTION_ALGORITHM_AES_CBC}
8905          */
8906         public static final String KEY_SUPPORTED_CHILD_SESSION_ENCRYPTION_ALGORITHMS_INT_ARRAY =
8907                 KEY_PREFIX + "supported_child_session_encryption_algorithms_int_array";
8908 
8909         /**
8910          * Time in seconds after which the IKE session is terminated if rekey procedure is not
8911          * successful. If not set or set to <= 0, default value is 3600 seconds.
8912          */
8913         public static final String KEY_IKE_REKEY_HARD_TIMER_SEC_INT =
8914                 KEY_PREFIX + "ike_rekey_hard_timer_in_sec";
8915 
8916         /**
8917          * Time in seconds after which the IKE session rekey procedure is started. If not set or set
8918          * to <= 0, default value is 3000 seconds.
8919          */
8920         public static final String KEY_IKE_REKEY_SOFT_TIMER_SEC_INT =
8921                 KEY_PREFIX + "ike_rekey_soft_timer_sec_int";
8922 
8923         /**
8924          * List of supported key sizes for AES Cipher Block Chaining (CBC) encryption mode of IKE
8925          * session. Possible values:
8926          * {@link android.net.ipsec.ike.SaProposal#KEY_LEN_UNUSED},
8927          * {@link android.net.ipsec.ike.SaProposal#KEY_LEN_AES_128},
8928          * {@link android.net.ipsec.ike.SaProposal#KEY_LEN_AES_192},
8929          * {@link android.net.ipsec.ike.SaProposal#KEY_LEN_AES_256}
8930          */
8931         public static final String KEY_IKE_SESSION_AES_CBC_KEY_SIZE_INT_ARRAY =
8932                 KEY_PREFIX + "ike_session_encryption_aes_cbc_key_size_int_array";
8933 
8934         /**
8935          * List of supported key sizes for AES Counter (CTR) encryption mode of IKE session.
8936          * Possible values -
8937          * {@link android.net.ipsec.ike.SaProposal#KEY_LEN_UNUSED},
8938          * {@link android.net.ipsec.ike.SaProposal#KEY_LEN_AES_128},
8939          * {@link android.net.ipsec.ike.SaProposal#KEY_LEN_AES_192},
8940          * {@link android.net.ipsec.ike.SaProposal#KEY_LEN_AES_256}
8941          */
8942          public static final String KEY_IKE_SESSION_AES_CTR_KEY_SIZE_INT_ARRAY =
8943                  KEY_PREFIX + "ike_session_encryption_aes_ctr_key_size_int_array";
8944 
8945         /**
8946          * List of supported encryption algorithms for IKE session. Possible values are
8947          * {@link android.net.ipsec.ike.SaProposal#ENCRYPTION_ALGORITHM_AES_CBC},
8948          * {@link android.net.ipsec.ike.SaProposal#ENCRYPTION_ALGORITHM_AES_CTR}
8949          */
8950         public static final String KEY_SUPPORTED_IKE_SESSION_ENCRYPTION_ALGORITHMS_INT_ARRAY =
8951                 KEY_PREFIX + "supported_ike_session_encryption_algorithms_int_array";
8952 
8953         /**
8954          * List of supported integrity algorithms for IKE session. Possible values are
8955          * {@link android.net.ipsec.ike.SaProposal#INTEGRITY_ALGORITHM_NONE},
8956          * {@link android.net.ipsec.ike.SaProposal#INTEGRITY_ALGORITHM_HMAC_SHA1_96},
8957          * {@link android.net.ipsec.ike.SaProposal#INTEGRITY_ALGORITHM_AES_XCBC_96},
8958          * {@link android.net.ipsec.ike.SaProposal#INTEGRITY_ALGORITHM_HMAC_SHA2_256_128},
8959          * {@link android.net.ipsec.ike.SaProposal#INTEGRITY_ALGORITHM_HMAC_SHA2_384_192},
8960          * {@link android.net.ipsec.ike.SaProposal#INTEGRITY_ALGORITHM_HMAC_SHA2_512_256}
8961          */
8962         public static final String KEY_SUPPORTED_INTEGRITY_ALGORITHMS_INT_ARRAY =
8963                 KEY_PREFIX + "supported_integrity_algorithms_int_array";
8964 
8965         /** Maximum number of retries for tunnel establishment. */
8966         public static final String KEY_MAX_RETRIES_INT = KEY_PREFIX + "max_retries_int";
8967 
8968         /**
8969          * Time in seconds after which a NATT keep alive message is sent. If not set or set to <= 0,
8970          * default value is 20 seconds.
8971          */
8972         public static final String KEY_NATT_KEEP_ALIVE_TIMER_SEC_INT =
8973                 KEY_PREFIX + "natt_keep_alive_timer_sec_int";
8974 
8975         /** List of '-' separated MCC/MNCs used to create ePDG FQDN as per 3GPP TS 23.003 */
8976         public static final String KEY_MCC_MNCS_STRING_ARRAY = KEY_PREFIX + "mcc_mncs_string_array";
8977 
8978         /**
8979          * List of supported pseudo random function algorithms for IKE session. Possible values are
8980          * {@link android.net.ipsec.ike.SaProposal#PSEUDORANDOM_FUNCTION_HMAC_SHA1},
8981          * {@link android.net.ipsec.ike.SaProposal#PSEUDORANDOM_FUNCTION_AES128_XCBC},
8982          * {@link android.net.ipsec.ike.SaProposal#PSEUDORANDOM_FUNCTION_SHA2_256},
8983          * {@link android.net.ipsec.ike.SaProposal#PSEUDORANDOM_FUNCTION_SHA2_384},
8984          * {@link android.net.ipsec.ike.SaProposal#PSEUDORANDOM_FUNCTION_SHA2_512}
8985          */
8986         public static final String KEY_SUPPORTED_PRF_ALGORITHMS_INT_ARRAY =
8987                 KEY_PREFIX + "supported_prf_algorithms_int_array";
8988 
8989         /**
8990          * List of IKE message retransmission timeouts in milliseconds, where each timeout
8991          * is the waiting time before next retry, except the last timeout which is the waiting time
8992          * before terminating the IKE Session. Min list length = 1, Max
8993          * list length = 10 Min timeout = 500 ms, Max timeout = 1800000 ms
8994          */
8995         public static final String KEY_RETRANSMIT_TIMER_MSEC_INT_ARRAY =
8996                 KEY_PREFIX + "retransmit_timer_sec_int_array";
8997 
8998         /**
8999          * Specifies the local identity type for IKE negotiations. Possible values are {@link
9000          * #ID_TYPE_FQDN}, {@link #ID_TYPE_RFC822_ADDR}, {@link #ID_TYPE_KEY_ID}
9001          */
9002         public static final String KEY_IKE_LOCAL_ID_TYPE_INT = KEY_PREFIX + "ike_local_id_type_int";
9003 
9004         /**
9005          * Specifies the remote identity type for IKE negotiations. Possible values are {@link
9006          * #ID_TYPE_FQDN}, {@link #ID_TYPE_RFC822_ADDR}, {@link #ID_TYPE_KEY_ID}
9007          */
9008         public static final String KEY_IKE_REMOTE_ID_TYPE_INT =
9009                 KEY_PREFIX + "ike_remote_id_type_int";
9010 
9011         /** Controls if KE payload should be added during child session local rekey procedure. */
9012         public static final String KEY_ADD_KE_TO_CHILD_SESSION_REKEY_BOOL =
9013                 KEY_PREFIX + "add_ke_to_child_session_rekey_bool";
9014 
9015         /** Specifies the PCO id for IPv6 Epdg server address */
9016         public static final String KEY_EPDG_PCO_ID_IPV6_INT = KEY_PREFIX + "epdg_pco_id_ipv6_int";
9017 
9018         /** Specifies the PCO id for IPv4 Epdg server address */
9019         public static final String KEY_EPDG_PCO_ID_IPV4_INT = KEY_PREFIX + "epdg_pco_id_ipv4_int";
9020 
9021         /** Controls if the IKE tunnel setup supports EAP-AKA fast reauth */
9022         public static final String KEY_SUPPORTS_EAP_AKA_FAST_REAUTH_BOOL =
9023                 KEY_PREFIX + "supports_eap_aka_fast_reauth_bool";
9024 
9025         /**
9026          * Type of IP preference used to prioritize ePDG servers. Possible values are
9027          * {@link #EPDG_ADDRESS_IPV4_PREFERRED}, {@link #EPDG_ADDRESS_IPV6_PREFERRED},
9028          * {@link #EPDG_ADDRESS_IPV4_ONLY}
9029          */
9030         public static final String KEY_EPDG_ADDRESS_IP_TYPE_PREFERENCE_INT =
9031                 KEY_PREFIX + "epdg_address_ip_type_preference_int";
9032 
9033         /** @hide */
9034         @IntDef({AUTHENTICATION_METHOD_EAP_ONLY, AUTHENTICATION_METHOD_CERT})
9035         public @interface AuthenticationMethodType {}
9036 
9037         /**
9038          * Certificate sent from the server is ignored. Only Extensible Authentication Protocol
9039          * (EAP) is used to authenticate the server. EAP_ONLY_AUTH payload is added to IKE_AUTH
9040          * request if supported.
9041          *
9042          * @see <a href="https://tools.ietf.org/html/rfc5998">RFC 5998</a>
9043          */
9044         public static final int AUTHENTICATION_METHOD_EAP_ONLY = 0;
9045         /** Server is authenticated using its certificate. */
9046         public static final int AUTHENTICATION_METHOD_CERT = 1;
9047 
9048         /** @hide */
9049         @IntDef({
9050             EPDG_ADDRESS_STATIC,
9051             EPDG_ADDRESS_PLMN,
9052             EPDG_ADDRESS_PCO,
9053             EPDG_ADDRESS_CELLULAR_LOC,
9054             EPDG_ADDRESS_VISITED_COUNTRY
9055         })
9056         public @interface EpdgAddressType {}
9057 
9058         /** Use static epdg address. */
9059         public static final int EPDG_ADDRESS_STATIC = 0;
9060         /** Construct the epdg address using plmn. */
9061         public static final int EPDG_ADDRESS_PLMN = 1;
9062         /**
9063          * Use the epdg address received in protocol configuration options (PCO) from the network.
9064          */
9065         public static final int EPDG_ADDRESS_PCO = 2;
9066         /** Use cellular location to chose epdg server */
9067         public static final int EPDG_ADDRESS_CELLULAR_LOC = 3;
9068         /** Use Visited Country FQDN rule*/
9069         public static final int EPDG_ADDRESS_VISITED_COUNTRY = 4;
9070 
9071         /** @hide */
9072         @IntDef({
9073                 EPDG_PLMN_RPLMN,
9074                 EPDG_PLMN_HPLMN,
9075                 EPDG_PLMN_EHPLMN_ALL,
9076                 EPDG_PLMN_EHPLMN_FIRST
9077         })
9078         public @interface EpdgAddressPlmnType {}
9079 
9080         /**
9081          * Use the Registered PLMN
9082          * @hide
9083          */
9084         public static final int EPDG_PLMN_RPLMN = 0;
9085         /**
9086          * Use the PLMN derived from IMSI
9087          * @hide
9088          */
9089         public static final int EPDG_PLMN_HPLMN = 1;
9090         /**
9091          * Use all EHPLMN from SIM EF files
9092          * @hide
9093          */
9094         public static final int EPDG_PLMN_EHPLMN_ALL = 2;
9095         /**
9096          * Use the first EHPLMN from SIM EF files
9097          * @hide
9098          */
9099         public static final int EPDG_PLMN_EHPLMN_FIRST = 3;
9100 
9101         /** @hide */
9102         @IntDef({ID_TYPE_FQDN, ID_TYPE_RFC822_ADDR, ID_TYPE_KEY_ID})
9103         public @interface IkeIdType {}
9104 
9105         /**
9106          * Ike Identification Fully Qualified Domain Name
9107          *
9108          * @see <a href="https://tools.ietf.org/html/rfc7296#section-3.5">RFC 7296, Internet Key
9109          *     Exchange Protocol Version 2 (IKEv2)</a>
9110          */
9111         public static final int ID_TYPE_FQDN = 2;
9112         /**
9113          * Ike Identification Fully Qualified RFC 822 email address.
9114          *
9115          * @see <a href="https://tools.ietf.org/html/rfc7296#section-3.5">RFC 7296, Internet Key
9116          *     Exchange Protocol Version 2 (IKEv2)</a>
9117          */
9118         public static final int ID_TYPE_RFC822_ADDR = 3;
9119         /**
9120          * Ike Identification opaque octet stream for vendor specific information
9121          *
9122          * @see <a href="https://tools.ietf.org/html/rfc7296#section-3.5">RFC 7296, Internet Key
9123          *     Exchange Protocol Version 2 (IKEv2)</a>
9124          */
9125         public static final int ID_TYPE_KEY_ID = 11;
9126 
9127         /** @hide */
9128         @IntDef({
9129                 EPDG_ADDRESS_IPV4_PREFERRED,
9130                 EPDG_ADDRESS_IPV6_PREFERRED,
9131                 EPDG_ADDRESS_IPV4_ONLY,
9132                 EPDG_ADDRESS_IPV6_ONLY,
9133                 EPDG_ADDRESS_SYSTEM_PREFERRED
9134         })
9135         public @interface EpdgAddressIpPreference {}
9136 
9137         /** Prioritize IPv4 ePDG addresses. */
9138         public static final int EPDG_ADDRESS_IPV4_PREFERRED = 0;
9139 
9140         /** Prioritize IPv6 ePDG addresses */
9141         public static final int EPDG_ADDRESS_IPV6_PREFERRED = 1;
9142 
9143         /** Use IPv4 ePDG addresses only. */
9144         public static final int EPDG_ADDRESS_IPV4_ONLY = 2;
9145 
9146         /** Use IPv6 ePDG addresses only.
9147          * @hide
9148          */
9149         public static final int EPDG_ADDRESS_IPV6_ONLY = 3;
9150 
9151         /** Follow the priority from DNS resolution results, which are sorted by using RFC6724
9152          * algorithm.
9153          *
9154          * @see <a href="https://tools.ietf.org/html/rfc6724#section-6">RFC 6724, Default Address
9155          *     Selection for Internet Protocol Version 6 (IPv6)</a>
9156          * @hide
9157          */
9158         public static final int EPDG_ADDRESS_SYSTEM_PREFERRED = 4;
9159 
Iwlan()9160         private Iwlan() {}
9161 
getDefaults()9162         private static PersistableBundle getDefaults() {
9163             PersistableBundle defaults = new PersistableBundle();
9164             defaults.putInt(KEY_IKE_REKEY_SOFT_TIMER_SEC_INT, 7200);
9165             defaults.putInt(KEY_IKE_REKEY_HARD_TIMER_SEC_INT, 14400);
9166             defaults.putInt(KEY_CHILD_SA_REKEY_SOFT_TIMER_SEC_INT, 3600);
9167             defaults.putInt(KEY_CHILD_SA_REKEY_HARD_TIMER_SEC_INT, 7200);
9168             defaults.putIntArray(
9169                     KEY_RETRANSMIT_TIMER_MSEC_INT_ARRAY, new int[] {500, 1000, 2000, 4000, 8000});
9170             defaults.putInt(KEY_DPD_TIMER_SEC_INT, 120);
9171             defaults.putInt(KEY_MAX_RETRIES_INT, 3);
9172             defaults.putIntArray(
9173                     KEY_DIFFIE_HELLMAN_GROUPS_INT_ARRAY,
9174                     new int[] {
9175                         SaProposal.DH_GROUP_1024_BIT_MODP,
9176                         SaProposal.DH_GROUP_1536_BIT_MODP,
9177                         SaProposal.DH_GROUP_2048_BIT_MODP
9178                     });
9179             defaults.putIntArray(
9180                     KEY_SUPPORTED_IKE_SESSION_ENCRYPTION_ALGORITHMS_INT_ARRAY,
9181                     new int[] {SaProposal.ENCRYPTION_ALGORITHM_AES_CBC});
9182             defaults.putIntArray(
9183                     KEY_SUPPORTED_CHILD_SESSION_ENCRYPTION_ALGORITHMS_INT_ARRAY,
9184                     new int[] {SaProposal.ENCRYPTION_ALGORITHM_AES_CBC});
9185             defaults.putIntArray(
9186                     KEY_SUPPORTED_INTEGRITY_ALGORITHMS_INT_ARRAY,
9187                     new int[] {
9188                         SaProposal.INTEGRITY_ALGORITHM_AES_XCBC_96,
9189                         SaProposal.INTEGRITY_ALGORITHM_HMAC_SHA1_96,
9190                         SaProposal.INTEGRITY_ALGORITHM_HMAC_SHA2_256_128,
9191                         SaProposal.INTEGRITY_ALGORITHM_HMAC_SHA2_384_192,
9192                         SaProposal.INTEGRITY_ALGORITHM_HMAC_SHA2_512_256,
9193                     });
9194             defaults.putIntArray(
9195                     KEY_SUPPORTED_PRF_ALGORITHMS_INT_ARRAY,
9196                     new int[] {
9197                         SaProposal.PSEUDORANDOM_FUNCTION_HMAC_SHA1,
9198                         SaProposal.PSEUDORANDOM_FUNCTION_AES128_XCBC,
9199                         SaProposal.PSEUDORANDOM_FUNCTION_SHA2_256,
9200                         SaProposal.PSEUDORANDOM_FUNCTION_SHA2_384,
9201                         SaProposal.PSEUDORANDOM_FUNCTION_SHA2_512
9202                     });
9203 
9204             defaults.putInt(KEY_EPDG_AUTHENTICATION_METHOD_INT, AUTHENTICATION_METHOD_EAP_ONLY);
9205             defaults.putString(KEY_EPDG_STATIC_ADDRESS_STRING, "");
9206             defaults.putString(KEY_EPDG_STATIC_ADDRESS_ROAMING_STRING, "");
9207             // will be used after b/158036773 is fixed
9208             defaults.putInt(KEY_NATT_KEEP_ALIVE_TIMER_SEC_INT, 20);
9209             defaults.putIntArray(
9210                     KEY_IKE_SESSION_AES_CBC_KEY_SIZE_INT_ARRAY,
9211                     new int[] {
9212                       SaProposal.KEY_LEN_AES_128,
9213                       SaProposal.KEY_LEN_AES_192,
9214                       SaProposal.KEY_LEN_AES_256});
9215             defaults.putIntArray(
9216                     KEY_CHILD_SESSION_AES_CBC_KEY_SIZE_INT_ARRAY,
9217                     new int[] {
9218                       SaProposal.KEY_LEN_AES_128,
9219                       SaProposal.KEY_LEN_AES_192,
9220                       SaProposal.KEY_LEN_AES_256});
9221             defaults.putIntArray(
9222                     KEY_IKE_SESSION_AES_CTR_KEY_SIZE_INT_ARRAY,
9223                     new int[] {
9224                       SaProposal.KEY_LEN_AES_128,
9225                       SaProposal.KEY_LEN_AES_192,
9226                       SaProposal.KEY_LEN_AES_256});
9227             defaults.putIntArray(
9228                     KEY_CHILD_SESSION_AES_CTR_KEY_SIZE_INT_ARRAY,
9229                     new int[] {
9230                       SaProposal.KEY_LEN_AES_128,
9231                       SaProposal.KEY_LEN_AES_192,
9232                       SaProposal.KEY_LEN_AES_256});
9233             defaults.putIntArray(
9234                     KEY_EPDG_ADDRESS_PRIORITY_INT_ARRAY,
9235                     new int[] {EPDG_ADDRESS_PLMN, EPDG_ADDRESS_STATIC});
9236             defaults.putIntArray(
9237                     KEY_EPDG_PLMN_PRIORITY_INT_ARRAY,
9238                     new int[]{
9239                             EPDG_PLMN_RPLMN,
9240                             EPDG_PLMN_HPLMN,
9241                             EPDG_PLMN_EHPLMN_ALL});
9242             defaults.putStringArray(KEY_MCC_MNCS_STRING_ARRAY, new String[0]);
9243             defaults.putInt(KEY_IKE_LOCAL_ID_TYPE_INT, ID_TYPE_RFC822_ADDR);
9244             defaults.putInt(KEY_IKE_REMOTE_ID_TYPE_INT, ID_TYPE_FQDN);
9245             defaults.putBoolean(KEY_ADD_KE_TO_CHILD_SESSION_REKEY_BOOL, false);
9246             defaults.putInt(KEY_EPDG_PCO_ID_IPV6_INT, 0);
9247             defaults.putInt(KEY_EPDG_PCO_ID_IPV4_INT, 0);
9248             defaults.putBoolean(KEY_SUPPORTS_EAP_AKA_FAST_REAUTH_BOOL, false);
9249             defaults.putInt(KEY_EPDG_ADDRESS_IP_TYPE_PREFERENCE_INT, EPDG_ADDRESS_IPV4_PREFERRED);
9250             return defaults;
9251         }
9252     }
9253 
9254     /**
9255      * A list of 4 GSM RSSI thresholds above which a signal level is considered POOR,
9256      * MODERATE, GOOD, or EXCELLENT, to be used in SignalStrength reporting.
9257      *
9258      * Note that the min and max thresholds are fixed at -113 and -51, as set in 3GPP TS 27.007
9259      * section 8.5.
9260      * <p>
9261      * See CellSignalStrengthGsm#GSM_RSSI_MAX and CellSignalStrengthGsm#GSM_RSSI_MIN. Any signal
9262      * level outside these boundaries is considered invalid.
9263      * @hide
9264      */
9265     public static final String KEY_GSM_RSSI_THRESHOLDS_INT_ARRAY = "gsm_rssi_thresholds_int_array";
9266 
9267     /**
9268      * An interval in dB for {@link SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSSI} measurement
9269      * type defining the required magnitude change between reports.
9270      *
9271      * <p>The default value is 2 and the minimum allowed value is 0. If no value or negative value
9272      * is set, the default value 2 is used.
9273      * @hide
9274      */
9275     public static final String KEY_GERAN_RSSI_HYSTERESIS_DB_INT = "geran_rssi_hysteresis_db_int";
9276 
9277     /**
9278      * Determines whether Wireless Priority Service call is supported over IMS.
9279      *
9280      * See Wireless Priority Service from https://www.fcc.gov/general/wireless-priority-service-wps
9281      * @hide
9282      */
9283     public static final String KEY_SUPPORT_WPS_OVER_IMS_BOOL = "support_wps_over_ims_bool";
9284 
9285     /**
9286      * The two digital number pattern of MMI code which is defined by carrier.
9287      * If the dial number matches this pattern, it will be dialed out normally not USSD.
9288      *
9289      * @hide
9290      */
9291     public static final String KEY_MMI_TWO_DIGIT_NUMBER_PATTERN_STRING_ARRAY =
9292             "mmi_two_digit_number_pattern_string_array";
9293 
9294     /**
9295      * Holds the list of carrier certificate hashes, followed by optional package names.
9296      * Format: "sha1/256" or "sha1/256:package1,package2,package3..."
9297      * Note that each carrier has its own hashes.
9298      */
9299     public static final String KEY_CARRIER_CERTIFICATE_STRING_ARRAY =
9300             "carrier_certificate_string_array";
9301 
9302     /**
9303      * Flag specifying whether the incoming call number and the conference participant number
9304      * should be formatted to national number for Japan.
9305      * @return {@code true} convert to the national format, {@code false} otherwise.
9306      * e.g. "+819012345678" -> "09012345678"
9307      * @hide
9308      */
9309     public static final String KEY_FORMAT_INCOMING_NUMBER_TO_NATIONAL_FOR_JP_BOOL =
9310             "format_incoming_number_to_national_for_jp_bool";
9311 
9312     /**
9313      * DisconnectCause array to play busy tone. Value should be array of
9314      * {@link android.telephony.DisconnectCause}.
9315      */
9316     public static final String KEY_DISCONNECT_CAUSE_PLAY_BUSYTONE_INT_ARRAY =
9317             "disconnect_cause_play_busytone_int_array";
9318 
9319     /**
9320      * Flag specifying whether to prevent sending CLIR activation("*31#") and deactivation("#31#")
9321      * code only without dialing number.
9322      * When {@code true}, these are prevented, {@code false} otherwise.
9323      */
9324     public static final String KEY_PREVENT_CLIR_ACTIVATION_AND_DEACTIVATION_CODE_BOOL =
9325             "prevent_clir_activation_and_deactivation_code_bool";
9326 
9327     /**
9328      * Flag specifying whether to show forwarded number on call-in-progress screen.
9329      * When true, forwarded number is shown.
9330      * When false, forwarded number is not shown.
9331      */
9332     public static final String KEY_SHOW_FORWARDED_NUMBER_BOOL = "show_forwarded_number_bool";
9333 
9334     /**
9335      * The list of originating address of missed incoming call SMS. If the SMS has originator
9336      * matched, the SMS will be treated as special SMS for notifying missed incoming call to the
9337      * user.
9338      *
9339      * @hide
9340      */
9341     public static final String KEY_MISSED_INCOMING_CALL_SMS_ORIGINATOR_STRING_ARRAY =
9342             "missed_incoming_call_sms_originator_string_array";
9343 
9344     /**
9345      * String array of Apn Type configurations.
9346      * The entries should be of form "APN_TYPE_NAME:priority".
9347      * priority is an integer that is sorted from highest to lowest.
9348      * example: cbs:5
9349      *
9350      * @hide
9351      */
9352     public static final String KEY_APN_PRIORITY_STRING_ARRAY = "apn_priority_string_array";
9353 
9354     /**
9355      * Network capability priority for determine the satisfy order in telephony. The priority is
9356      * from the lowest 0 to the highest 100. The long-lived network shall have the lowest priority.
9357      * This allows other short-lived requests like MMS requests to be established. Emergency request
9358      * always has the highest priority.
9359      *
9360      * @hide
9361      */
9362     public static final String KEY_TELEPHONY_NETWORK_CAPABILITY_PRIORITIES_STRING_ARRAY =
9363             "telephony_network_capability_priorities_string_array";
9364 
9365     /**
9366      * Defines the rules for data setup retry.
9367      *
9368      * The syntax of the retry rule:
9369      * 1. Retry based on {@link NetworkCapabilities}. Note that only APN-type network capabilities
9370      *    are supported. If the capabilities are not specified, then the retry rule only applies
9371      *    to the current failed APN used in setup data call request.
9372      * "capabilities=[netCaps1|netCaps2|...], [retry_interval=n1|n2|n3|n4...], [maximum_retries=n]"
9373      *
9374      * 2. Retry based on {@link DataFailCause}
9375      * "fail_causes=[cause1|cause2|cause3|..], [retry_interval=n1|n2|n3|n4...], [maximum_retries=n]"
9376      *
9377      * 3. Retry based on {@link NetworkCapabilities} and {@link DataFailCause}. Note that only
9378      *    APN-type network capabilities are supported.
9379      * "capabilities=[netCaps1|netCaps2|...], fail_causes=[cause1|cause2|cause3|...],
9380      *     [retry_interval=n1|n2|n3|n4...], [maximum_retries=n]"
9381      *
9382      * 4. Permanent fail causes (no timer-based retry) on the current failed APN. Retry interval
9383      *    is specified for retrying the next available APN.
9384      * "permanent_fail_causes=8|27|28|29|30|32|33|35|50|51|111|-5|-6|65537|65538|-3|65543|65547|
9385      *     2252|2253|2254, retry_interval=2500"
9386      *
9387      * For example,
9388      * "capabilities=eims, retry_interval=1000, maximum_retries=20" means if the attached
9389      * network request is emergency, then retry data network setup every 1 second for up to 20
9390      * times.
9391      *
9392      * "capabilities=internet|enterprise|dun|ims|fota, retry_interval=2500|3000|"
9393      * "5000|10000|15000|20000|40000|60000|120000|240000|600000|1200000|1800000"
9394      * "1800000, maximum_retries=20" means for those capabilities, retry happens in 2.5s, 3s, 5s,
9395      * 10s, 15s, 20s, 40s, 1m, 2m, 4m, 10m, 20m, 30m, 30m, 30m, until reaching 20 retries.
9396      *
9397      * @hide
9398      */
9399     public static final String KEY_TELEPHONY_DATA_SETUP_RETRY_RULES_STRING_ARRAY =
9400             "telephony_data_setup_retry_rules_string_array";
9401 
9402     /**
9403      * Defines the rules for data handover retry.
9404      *
9405      * The syntax of the retry rule:
9406      * 1. Retry when handover fails.
9407      * "retry_interval=[n1|n2|n3|...], [maximum_retries=n]"
9408      *
9409      * For example,
9410      * "retry_interval=1000|3000|5000, maximum_retries=10" means handover retry will happen in 1s,
9411      * 3s, 5s, 5s, 5s....up to 10 times.
9412      *
9413      * 2. Retry when handover fails with certain fail causes.
9414      * "retry_interval=[n1|n2|n3|...], fail_causes=[cause1|cause2|cause3|...], [maximum_retries=n]
9415      *
9416      * For example,
9417      * "retry_interval=1000, maximum_retries=3, fail_causes=5" means handover retry every 1 second
9418      * for up to 3 times when handover fails with the cause 5.
9419      *
9420      * "maximum_retries=0, fail_causes=6|10|67" means handover retry should not happen for those
9421      * causes.
9422      *
9423      * @hide
9424      */
9425     public static final String KEY_TELEPHONY_DATA_HANDOVER_RETRY_RULES_STRING_ARRAY =
9426             "telephony_data_handover_retry_rules_string_array";
9427 
9428     /**
9429      * Indicates whether delay tearing down IMS data network until voice call ends.
9430      * @hide
9431      */
9432     public static final String KEY_DELAY_IMS_TEAR_DOWN_UNTIL_CALL_END_BOOL =
9433             "delay_ims_tear_down_until_call_end_bool";
9434 
9435     /**
9436      * The patterns of missed incoming call sms. This is the regular expression used for
9437      * matching the missed incoming call's date, time, and caller id. The pattern should match
9438      * fields for at least month, day, hour, and minute. Year is optional although it is encouraged.
9439      *
9440      * An usable pattern should look like this:
9441      * ^(?<month>0[1-9]|1[012])\/(?<day>0[1-9]|1[0-9]|2[0-9]|3[0-1]) (?<hour>[0-1][0-9]|2[0-3]):
9442      * (?<minute>[0-5][0-9])\s*(?<callerId>[0-9]+)\s*$
9443      *
9444      * @hide
9445      */
9446     public static final String KEY_MISSED_INCOMING_CALL_SMS_PATTERN_STRING_ARRAY =
9447             "missed_incoming_call_sms_pattern_string_array";
9448 
9449     /**
9450      * Indicate the satellite services supported per provider by a carrier.
9451      *
9452      * Key is the PLMN of a satellite provider. Value should be an integer array of supported
9453      * services with the following value:
9454      * <ul>
9455      * <li>1 = {@link android.telephony.NetworkRegistrationInfo#SERVICE_TYPE_VOICE}</li>
9456      * <li>2 = {@link android.telephony.NetworkRegistrationInfo#SERVICE_TYPE_DATA}</li>
9457      * <li>3 = {@link android.telephony.NetworkRegistrationInfo#SERVICE_TYPE_SMS}</li>
9458      * <li>4 = {@link android.telephony.NetworkRegistrationInfo#SERVICE_TYPE_VIDEO}</li>
9459      * <li>5 = {@link android.telephony.NetworkRegistrationInfo#SERVICE_TYPE_EMERGENCY}</li>
9460      * </ul>
9461      * <p>
9462      * If this carrier config is not present, the overlay config
9463      * {@code config_satellite_services_supported_by_providers} will be used. If the carrier config
9464      * is present, the supported satellite services will be identified as follows:
9465      * <ul>
9466      * <li>For the PLMN that exists in both provider supported satellite services and carrier
9467      * supported satellite services, the supported services will be the intersection of the two
9468      * sets.</li>
9469      * <li>For the PLMN that is present in provider supported satellite services but not in carrier
9470      * supported satellite services, the provider supported satellite services will be used.</li>
9471      * <li>For the PLMN that is present in carrier supported satellite services but not in provider
9472      * supported satellite services, the PLMN will be ignored.</li>
9473      * </ul>
9474      *
9475      * This config is empty by default.
9476      *
9477      * @hide
9478      */
9479     public static final String KEY_CARRIER_SUPPORTED_SATELLITE_SERVICES_PER_PROVIDER_BUNDLE =
9480             "carrier_supported_satellite_services_per_provider_bundle";
9481 
9482     /**
9483      * Indicating whether DUN APN should be disabled when the device is roaming. In that case,
9484      * the default APN (i.e. internet) will be used for tethering.
9485      *
9486      * This config is only available when using Preset APN(not user edited) as Preferred APN.
9487      *
9488      * @hide
9489      */
9490     public static final String KEY_DISABLE_DUN_APN_WHILE_ROAMING_WITH_PRESET_APN_BOOL =
9491             "disable_dun_apn_while_roaming_with_preset_apn_bool";
9492 
9493     /**
9494      * Where there is no preferred APN, specifies the carrier's default preferred APN.
9495      * Specifies the {@link android.provider.Telephony.Carriers.APN} of the default preferred apn.
9496      *
9497      * This config is only available with Preset APN(not user edited).
9498      *
9499      * @hide
9500      */
9501     public static final String KEY_DEFAULT_PREFERRED_APN_NAME_STRING =
9502             "default_preferred_apn_name_string";
9503 
9504     /**
9505      * Indicates if the carrier supports call composer.
9506      */
9507     public static final String KEY_SUPPORTS_CALL_COMPOSER_BOOL = "supports_call_composer_bool";
9508 
9509     /**
9510      * Indicates the carrier server url that serves the call composer picture.
9511      */
9512     public static final String KEY_CALL_COMPOSER_PICTURE_SERVER_URL_STRING =
9513             "call_composer_picture_server_url_string";
9514 
9515     /**
9516      * Determines the default RTT mode.
9517      *
9518      * Upon first boot, when the user has not yet set a value for their preferred RTT mode,
9519      * the value of this config will be sent to the IMS stack. Valid values are the same as for
9520      * {@link Settings.Secure#RTT_CALLING_MODE}.
9521      *
9522      * @hide
9523      */
9524     public static final String KEY_DEFAULT_RTT_MODE_INT = "default_rtt_mode_int";
9525 
9526     /**
9527      * Indicates whether RTT is supported while roaming.
9528      */
9529     public static final String KEY_RTT_SUPPORTED_WHILE_ROAMING_BOOL =
9530             "rtt_supported_while_roaming_bool";
9531 
9532     /**
9533      * Indicates if auto-configuration server is used for the RCS config
9534      * Reference: GSMA RCC.14
9535      */
9536     public static final String KEY_USE_ACS_FOR_RCS_BOOL = "use_acs_for_rcs_bool";
9537 
9538     /**
9539      * Indicates temporarily unmetered mobile data is supported by the carrier.
9540      * @hide
9541      */
9542     public static final String KEY_NETWORK_TEMP_NOT_METERED_SUPPORTED_BOOL =
9543             "network_temp_not_metered_supported_bool";
9544 
9545     /**
9546      * Boolean indicating whether the SIM PIN can be stored and verified
9547      * seamlessly after an unattended reboot.
9548      *
9549      * The device configuration value {@code config_allow_pin_storage_for_unattended_reboot}
9550      * ultimately controls whether this carrier configuration option is used. Where
9551      * {@code config_allow_pin_storage_for_unattended_reboot} is false, the value of this
9552      * carrier configuration is ignored.
9553      *
9554      * @hide
9555      */
9556     public static final String KEY_STORE_SIM_PIN_FOR_UNATTENDED_REBOOT_BOOL =
9557             "store_sim_pin_for_unattended_reboot_bool";
9558 
9559     /**
9560      * Allow whether the user can use the "Allow 2G" toggle in Settings.
9561      *
9562      * If {@code true} then the toggle is disabled (i.e. grayed out).
9563      *
9564      * Used to trade privacy/security against potentially reduced carrier coverage for some
9565      * carriers.
9566      *
9567      * @deprecated Future versions of Android will disallow carriers from hiding this toggle
9568      * because disabling 2g is a security feature that users should always have access to at
9569      * their discretion.
9570      */
9571     @Deprecated
9572     public static final String KEY_HIDE_ENABLE_2G = "hide_enable_2g_bool";
9573 
9574     /**
9575      * Indicates the allowed APN types that can be used for LTE initial attach. The order of APN
9576      * types in the configuration is the order of APN types that will be used for initial attach.
9577      * Empty list indicates that no APN types are allowed for initial attach.
9578      *
9579      * @hide
9580      */
9581     public static final String KEY_ALLOWED_INITIAL_ATTACH_APN_TYPES_STRING_ARRAY =
9582             "allowed_initial_attach_apn_types_string_array";
9583 
9584     /**
9585      * Indicates whether or not the carrier will provision merged carrier Wi-Fi offload networks.
9586      * Such networks are considered part of the core carrier network.
9587      *
9588      * This configuration will be use to gate whether such configurations are allowed to the carrier
9589      * and correspondingly enable UI elements which are required for such configurations.
9590      */
9591     public static final String KEY_CARRIER_PROVISIONS_WIFI_MERGED_NETWORKS_BOOL =
9592             "carrier_provisions_wifi_merged_networks_bool";
9593 
9594     /**
9595      * Determines whether or not to use (IP) data connectivity as a supplemental condition to
9596      * control the visibility of the no-calling indicator for this carrier in the System UI. Setting
9597      * the configuration to true may make sense for carriers that provide OTT calling.
9598      *
9599      * Config = true: show no-calling indication only if telephony does not have voice registration
9600      *                and if no (IP) data connectivity is available.
9601      * Config = false: show no-calling indication only if telephony does not have voice
9602      *                 registration.
9603      */
9604     public static final String KEY_USE_IP_FOR_CALLING_INDICATOR_BOOL =
9605             "use_ip_for_calling_indicator_bool";
9606 
9607     /**
9608      * Determine whether or not to display a call strength indicator for this carrier in the System
9609      * UI. Disabling the indication may be reasonable if the carrier's calling is not integrated
9610      * into the Android telephony stack (e.g. it is OTT).
9611      *
9612      * true: Use telephony APIs to detect the current networking medium of calling and display a
9613      *       UI indication based on the current strength (e.g. signal level) of that medium.
9614      * false: Do not display the call strength indicator.
9615      */
9616     public static final String KEY_DISPLAY_CALL_STRENGTH_INDICATOR_BOOL =
9617             "display_call_strength_indicator_bool";
9618 
9619     /**
9620      * Determine whether or not to display no data notification when data setup is permanently
9621      * failed.
9622      *
9623      * @hide
9624      */
9625     public static final String KEY_DISPLAY_NO_DATA_NOTIFICATION_ON_PERMANENT_FAILURE_BOOL =
9626             "display_no_data_notification_on_permanent_failure_bool";
9627 
9628     /**
9629      * Boolean indicating if the VoNR setting is visible in the Call Settings menu.
9630      * If this flag is set and VoNR is enabled for this carrier (see {@link #KEY_VONR_ENABLED_BOOL})
9631      * the VoNR setting menu will be visible. If {@link #KEY_VONR_ENABLED_BOOL} or
9632      * this setting is false, the menu will be gone.
9633      *
9634      * Enabled by default.
9635      *
9636      */
9637     public static final String KEY_VONR_SETTING_VISIBILITY_BOOL = "vonr_setting_visibility_bool";
9638 
9639     /**
9640      * Flag specifying whether VoNR should be enabled for carrier.
9641      * If true, VoNr will be enabled. If false, hard disabled.
9642      *
9643      * Disabled by default.
9644      *
9645      */
9646     public static final String KEY_VONR_ENABLED_BOOL = "vonr_enabled_bool";
9647 
9648     /**
9649      * Boolean indicating the default VoNR user preference setting.
9650      * If true, the VoNR setting will be enabled. If false, it will be disabled initially.
9651      *
9652      * Enabled by default.
9653      *
9654      */
9655     public static final String KEY_VONR_ON_BY_DEFAULT_BOOL = "vonr_on_by_default_bool";
9656 
9657     /**
9658      * Determine whether unthrottle data retry when tracking area code (TAC/LAC) from cell changes
9659      *
9660      * @hide
9661      */
9662     public static final String KEY_UNTHROTTLE_DATA_RETRY_WHEN_TAC_CHANGES_BOOL =
9663             "unthrottle_data_retry_when_tac_changes_bool";
9664 
9665     /**
9666      * A list of premium capabilities the carrier supports. Applications can prompt users to
9667      * purchase these premium capabilities from their carrier for a performance boost.
9668      * Valid values are any of {@link TelephonyManager.PremiumCapability}.
9669      *
9670      * This is empty by default, indicating that no premium capabilities are supported.
9671      *
9672      * @see TelephonyManager#isPremiumCapabilityAvailableForPurchase(int)
9673      * @see TelephonyManager#purchasePremiumCapability(int, Executor, Consumer)
9674      */
9675     public static final String KEY_SUPPORTED_PREMIUM_CAPABILITIES_INT_ARRAY =
9676             "supported_premium_capabilities_int_array";
9677 
9678     /**
9679      * The amount of time in milliseconds the notification for a performance boost via
9680      * premium capabilities will be visible to the user after
9681      * {@link TelephonyManager#purchasePremiumCapability(int, Executor, Consumer)}
9682      * requests user action to purchase the boost from the carrier. Once the timeout expires,
9683      * the performance boost notification will be automatically dismissed and the request will fail
9684      * with {@link TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_TIMEOUT}.
9685      *
9686      * The default value is 30 minutes.
9687      */
9688     public static final String KEY_PREMIUM_CAPABILITY_NOTIFICATION_DISPLAY_TIMEOUT_MILLIS_LONG =
9689             "premium_capability_notification_display_timeout_millis_long";
9690 
9691     /**
9692      * The amount of time in milliseconds that the notification for a performance boost via
9693      * premium capabilities should be blocked when
9694      * {@link TelephonyManager#purchasePremiumCapability(int, Executor, Consumer)}
9695      * returns a failure due to user action or timeout.
9696      * The maximum number of performance boost notifications to show the user are defined in
9697      * {@link #KEY_PREMIUM_CAPABILITY_MAXIMUM_DAILY_NOTIFICATION_COUNT_INT} and
9698      * {@link #KEY_PREMIUM_CAPABILITY_MAXIMUM_MONTHLY_NOTIFICATION_COUNT_INT}.
9699      *
9700      * The default value is 30 minutes.
9701      *
9702      * @see TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_USER_CANCELED
9703      * @see TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_TIMEOUT
9704      * @see TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_USER_DISABLED
9705      */
9706     public static final String
9707             KEY_PREMIUM_CAPABILITY_NOTIFICATION_BACKOFF_HYSTERESIS_TIME_MILLIS_LONG =
9708             "premium_capability_notification_backoff_hysteresis_time_millis_long";
9709 
9710     /**
9711      * The maximum number of times in a day that we display the notification for a performance boost
9712      * via premium capabilities when
9713      * {@link TelephonyManager#purchasePremiumCapability(int, Executor, Consumer)}
9714      * returns a failure due to user action or timeout.
9715      *
9716      * The default value is 2 times.
9717      *
9718      * @see TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_USER_CANCELED
9719      * @see TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_TIMEOUT
9720      */
9721     public static final String KEY_PREMIUM_CAPABILITY_MAXIMUM_DAILY_NOTIFICATION_COUNT_INT =
9722             "premium_capability_maximum_daily_notification_count_int";
9723 
9724     /**
9725      * The maximum number of times in a month that we display the notification for a performance
9726      * boost via premium capabilities when
9727      * {@link TelephonyManager#purchasePremiumCapability(int, Executor, Consumer)}
9728      * returns a failure due to user action or timeout.
9729      *
9730      * The default value is 10 times.
9731      *
9732      * @see TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_USER_CANCELED
9733      * @see TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_TIMEOUT
9734      */
9735     public static final String KEY_PREMIUM_CAPABILITY_MAXIMUM_MONTHLY_NOTIFICATION_COUNT_INT =
9736             "premium_capability_maximum_monthly_notification_count_int";
9737 
9738     /**
9739      * The amount of time in milliseconds that the purchase request should be throttled when
9740      * {@link TelephonyManager#purchasePremiumCapability(int, Executor, Consumer)}
9741      * returns a failure due to the carrier.
9742      *
9743      * The default value is 30 minutes.
9744      *
9745      * @see TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_CARRIER_ERROR
9746      * @see TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_ENTITLEMENT_CHECK_FAILED
9747      */
9748     public static final String
9749             KEY_PREMIUM_CAPABILITY_PURCHASE_CONDITION_BACKOFF_HYSTERESIS_TIME_MILLIS_LONG =
9750             "premium_capability_purchase_condition_backoff_hysteresis_time_millis_long";
9751 
9752     /**
9753      * The amount of time in milliseconds within which the network must set up a slicing
9754      * configuration for the premium capability after
9755      * {@link TelephonyManager#purchasePremiumCapability(int, Executor, Consumer)}
9756      * returns {@link TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_SUCCESS}.
9757      * During the setup time, calls to
9758      * {@link TelephonyManager#purchasePremiumCapability(int, Executor, Consumer)} will return
9759      * {@link TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_PENDING_NETWORK_SETUP}.
9760      * If the network fails to set up a slicing configuration for the premium capability within the
9761      * setup time, subsequent purchase requests will be allowed to go through again.
9762      *
9763      * The default value is 5 minutes.
9764      */
9765     public static final String KEY_PREMIUM_CAPABILITY_NETWORK_SETUP_TIME_MILLIS_LONG =
9766             "premium_capability_network_setup_time_millis_long";
9767 
9768     /**
9769      * The URL to redirect to when the user clicks on the notification for a performance boost via
9770      * premium capabilities after applications call
9771      * {@link TelephonyManager#purchasePremiumCapability(int, Executor, Consumer)}.
9772      * If the URL is empty or invalid, the purchase request will return
9773      * {@link TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_FEATURE_NOT_SUPPORTED}.
9774      *
9775      * This is empty by default.
9776      */
9777     public static final String KEY_PREMIUM_CAPABILITY_PURCHASE_URL_STRING =
9778             "premium_capability_purchase_url_string";
9779 
9780     /**
9781      * Whether to allow premium capabilities to be purchased when the device is connected to LTE.
9782      * If this is {@code true}, applications can call
9783      * {@link TelephonyManager#purchasePremiumCapability(int, Executor, Consumer)}
9784      * when connected to {@link TelephonyManager#NETWORK_TYPE_LTE} to purchase and use
9785      * premium capabilities.
9786      * If this is {@code false}, applications can only purchase and use premium capabilities when
9787      * connected to {@link TelephonyManager#NETWORK_TYPE_NR}.
9788      *
9789      * This is {@code false} by default.
9790      */
9791     public static final String KEY_PREMIUM_CAPABILITY_SUPPORTED_ON_LTE_BOOL =
9792             "premium_capability_supported_on_lte_bool";
9793 
9794     /**
9795      * IWLAN handover rules that determine whether handover is allowed or disallowed between
9796      * cellular and IWLAN.
9797      *
9798      * Rule syntax: "source=[GERAN|UTRAN|EUTRAN|NGRAN|IWLAN|UNKNOWN], target=[GERAN|UTRAN|EUTRAN
9799      * |NGRAN|IWLAN], type=[allowed|disallowed], roaming=[true|false], capabilities=[INTERNET|MMS
9800      * |FOTA|IMS|CBS|SUPL|EIMS|XCAP|DUN]"
9801      *
9802      * Note that UNKNOWN can be only specified in the source access network and can be only used
9803      * in the disallowed rule.
9804      *
9805      * The handover rules will be matched in the order. Here are some sample rules.
9806      * <string-array name="iwlan_handover_rules" num="5">
9807      *     <!-- Handover from IWLAN to 2G/3G is not allowed -->
9808      *     <item value="source=IWLAN, target=GERAN|UTRAN, type=disallowed"/>
9809      *     <!-- Handover from 2G/3G to IWLAN is not allowed -->
9810      *     <item value="source=GERAN|UTRAN, target:IWLAN, type=disallowed"/>
9811      *     <!-- Handover from IWLAN to 3G/4G/5G is not allowed if the device is roaming. -->
9812      *     <item value="source=IWLAN, target=UTRAN|EUTRAN|NGRAN, roaming=true, type=disallowed"/>
9813      *     <!-- Handover from 4G to IWLAN is not allowed if the device has capability in either IMS
9814      *     or EIMS-->
9815      *     <item value="source=EUTRAN, target=IWLAN, type=disallowed, capabilities=IMS|EIMS"/>
9816      *     <!-- Handover is always allowed in any condition. -->
9817      *     <item value="source=GERAN|UTRAN|EUTRAN|NGRAN|IWLAN|UNKNOWN,
9818      *         target=GERAN|UTRAN|EUTRAN|NGRAN|IWLAN, type=allowed"/>
9819      * </string-array>
9820      *
9821      * When handover is not allowed, frameworks will tear down the data network on source transport,
9822      * and then setup a new one on the target transport when Qualified Network Service changes the
9823      * preferred access networks for particular APN types.
9824      *
9825      * @hide
9826      */
9827     public static final String KEY_IWLAN_HANDOVER_POLICY_STRING_ARRAY =
9828             "iwlan_handover_policy_string_array";
9829 
9830     /**
9831      * Score table for {@link TelephonyManager#MOBILE_DATA_POLICY_AUTO_DATA_SWITCH}. The score is
9832      * used in conjunction with a tolerance value defined in resource config
9833      * {@code auto_data_switch_score_tolerance}, greater than which device will switch to the sub
9834      * with higher score.
9835      * Possible keys are network type name string(also see {@link #KEY_BANDWIDTH_STRING_ARRAY}).
9836      * Value should be "score_level_0, score_level_1, score_level_2, score_level_3,score_level_4".
9837      * Each network type must have 5 scores correspond to {@link CellSignalStrength}, where score is
9838      * a non-negative integer. A score of 0 is treated the same as data out of service.
9839      *
9840      * For NR (5G), the following network names should be used:
9841      * - NR_NSA: NR NSA, sub-6 frequencies
9842      * - NR_NSA_MMWAVE: NR NSA, mmwave frequencies
9843      * - NR_SA: NR SA, sub-6 frequencies
9844      * - NR_SA_MMWAVE: NR SA, mmwave frequencies
9845      *
9846      * @hide
9847      */
9848     public static final String KEY_AUTO_DATA_SWITCH_RAT_SIGNAL_SCORE_BUNDLE =
9849             "auto_data_switch_rat_signal_score_string_bundle";
9850 
9851     /** The default value for every variable. */
9852     private static final PersistableBundle sDefaults;
9853 
9854     static {
9855         sDefaults = new PersistableBundle();
sDefaults.putString(KEY_CARRIER_CONFIG_VERSION_STRING, R)9856         sDefaults.putString(KEY_CARRIER_CONFIG_VERSION_STRING, "");
sDefaults.putBoolean(KEY_ALLOW_HOLD_IN_IMS_CALL_BOOL, true)9857         sDefaults.putBoolean(KEY_ALLOW_HOLD_IN_IMS_CALL_BOOL, true);
sDefaults.putBoolean(KEY_CARRIER_ALLOW_DEFLECT_IMS_CALL_BOOL, false)9858         sDefaults.putBoolean(KEY_CARRIER_ALLOW_DEFLECT_IMS_CALL_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_ALLOW_TRANSFER_IMS_CALL_BOOL, false)9859         sDefaults.putBoolean(KEY_CARRIER_ALLOW_TRANSFER_IMS_CALL_BOOL, false);
sDefaults.putBoolean(KEY_ALWAYS_PLAY_REMOTE_HOLD_TONE_BOOL, false)9860         sDefaults.putBoolean(KEY_ALWAYS_PLAY_REMOTE_HOLD_TONE_BOOL, false);
sDefaults.putBoolean(KEY_AUTO_RETRY_FAILED_WIFI_EMERGENCY_CALL, false)9861         sDefaults.putBoolean(KEY_AUTO_RETRY_FAILED_WIFI_EMERGENCY_CALL, false);
sDefaults.putBoolean(KEY_ADDITIONAL_CALL_SETTING_BOOL, true)9862         sDefaults.putBoolean(KEY_ADDITIONAL_CALL_SETTING_BOOL, true);
sDefaults.putBoolean(KEY_ALLOW_EMERGENCY_NUMBERS_IN_CALL_LOG_BOOL, false)9863         sDefaults.putBoolean(KEY_ALLOW_EMERGENCY_NUMBERS_IN_CALL_LOG_BOOL, false);
sDefaults.putStringArray(KEY_UNLOGGABLE_NUMBERS_STRING_ARRAY, null)9864         sDefaults.putStringArray(KEY_UNLOGGABLE_NUMBERS_STRING_ARRAY, null);
sDefaults.putBoolean(KEY_ALLOW_LOCAL_DTMF_TONES_BOOL, true)9865         sDefaults.putBoolean(KEY_ALLOW_LOCAL_DTMF_TONES_BOOL, true);
sDefaults.putBoolean(KEY_PLAY_CALL_RECORDING_TONE_BOOL, false)9866         sDefaults.putBoolean(KEY_PLAY_CALL_RECORDING_TONE_BOOL, false);
sDefaults.putBoolean(KEY_APN_EXPAND_BOOL, true)9867         sDefaults.putBoolean(KEY_APN_EXPAND_BOOL, true);
sDefaults.putBoolean(KEY_AUTO_RETRY_ENABLED_BOOL, false)9868         sDefaults.putBoolean(KEY_AUTO_RETRY_ENABLED_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_SETTINGS_ENABLE_BOOL, false)9869         sDefaults.putBoolean(KEY_CARRIER_SETTINGS_ENABLE_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_VOLTE_AVAILABLE_BOOL, false)9870         sDefaults.putBoolean(KEY_CARRIER_VOLTE_AVAILABLE_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_VT_AVAILABLE_BOOL, false)9871         sDefaults.putBoolean(KEY_CARRIER_VT_AVAILABLE_BOOL, false);
sDefaults.putInt(KEY_CARRIER_USSD_METHOD_INT, USSD_OVER_CS_PREFERRED)9872         sDefaults.putInt(KEY_CARRIER_USSD_METHOD_INT, USSD_OVER_CS_PREFERRED);
sDefaults.putBoolean(KEY_VOLTE_5G_LIMITED_ALERT_DIALOG_BOOL, false)9873         sDefaults.putBoolean(KEY_VOLTE_5G_LIMITED_ALERT_DIALOG_BOOL, false);
sDefaults.putBoolean(KEY_NOTIFY_HANDOVER_VIDEO_FROM_WIFI_TO_LTE_BOOL, false)9874         sDefaults.putBoolean(KEY_NOTIFY_HANDOVER_VIDEO_FROM_WIFI_TO_LTE_BOOL, false);
sDefaults.putBoolean(KEY_ALLOW_MERGING_RTT_CALLS_BOOL, false)9875         sDefaults.putBoolean(KEY_ALLOW_MERGING_RTT_CALLS_BOOL, false);
sDefaults.putBoolean(KEY_NOTIFY_HANDOVER_VIDEO_FROM_LTE_TO_WIFI_BOOL, false)9876         sDefaults.putBoolean(KEY_NOTIFY_HANDOVER_VIDEO_FROM_LTE_TO_WIFI_BOOL, false);
sDefaults.putBoolean(KEY_SUPPORT_DOWNGRADE_VT_TO_AUDIO_BOOL, true)9877         sDefaults.putBoolean(KEY_SUPPORT_DOWNGRADE_VT_TO_AUDIO_BOOL, true);
sDefaults.putString(KEY_DEFAULT_VM_NUMBER_STRING, R)9878         sDefaults.putString(KEY_DEFAULT_VM_NUMBER_STRING, "");
sDefaults.putString(KEY_DEFAULT_VM_NUMBER_ROAMING_STRING, R)9879         sDefaults.putString(KEY_DEFAULT_VM_NUMBER_ROAMING_STRING, "");
sDefaults.putString(KEY_DEFAULT_VM_NUMBER_ROAMING_AND_IMS_UNREGISTERED_STRING, R)9880         sDefaults.putString(KEY_DEFAULT_VM_NUMBER_ROAMING_AND_IMS_UNREGISTERED_STRING, "");
sDefaults.putBoolean(KEY_CONFIG_TELEPHONY_USE_OWN_NUMBER_FOR_VOICEMAIL_BOOL, false)9881         sDefaults.putBoolean(KEY_CONFIG_TELEPHONY_USE_OWN_NUMBER_FOR_VOICEMAIL_BOOL, false);
sDefaults.putBoolean(KEY_IGNORE_DATA_ENABLED_CHANGED_FOR_VIDEO_CALLS, true)9882         sDefaults.putBoolean(KEY_IGNORE_DATA_ENABLED_CHANGED_FOR_VIDEO_CALLS, true);
sDefaults.putBoolean(KEY_VILTE_DATA_IS_METERED_BOOL, true)9883         sDefaults.putBoolean(KEY_VILTE_DATA_IS_METERED_BOOL, true);
sDefaults.putBoolean(KEY_CARRIER_WFC_IMS_AVAILABLE_BOOL, false)9884         sDefaults.putBoolean(KEY_CARRIER_WFC_IMS_AVAILABLE_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_CROSS_SIM_IMS_AVAILABLE_BOOL, false)9885         sDefaults.putBoolean(KEY_CARRIER_CROSS_SIM_IMS_AVAILABLE_BOOL, false);
sDefaults.putBoolean(KEY_ENABLE_CROSS_SIM_CALLING_ON_OPPORTUNISTIC_DATA_BOOL, false)9886         sDefaults.putBoolean(KEY_ENABLE_CROSS_SIM_CALLING_ON_OPPORTUNISTIC_DATA_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_WFC_SUPPORTS_WIFI_ONLY_BOOL, false)9887         sDefaults.putBoolean(KEY_CARRIER_WFC_SUPPORTS_WIFI_ONLY_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_DEFAULT_WFC_IMS_ENABLED_BOOL, false)9888         sDefaults.putBoolean(KEY_CARRIER_DEFAULT_WFC_IMS_ENABLED_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_DEFAULT_WFC_IMS_ROAMING_ENABLED_BOOL, false)9889         sDefaults.putBoolean(KEY_CARRIER_DEFAULT_WFC_IMS_ROAMING_ENABLED_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_PROMOTE_WFC_ON_CALL_FAIL_BOOL, false)9890         sDefaults.putBoolean(KEY_CARRIER_PROMOTE_WFC_ON_CALL_FAIL_BOOL, false);
sDefaults.putInt(KEY_CARRIER_DEFAULT_WFC_IMS_MODE_INT, 2)9891         sDefaults.putInt(KEY_CARRIER_DEFAULT_WFC_IMS_MODE_INT, 2);
sDefaults.putInt(KEY_CARRIER_DEFAULT_WFC_IMS_ROAMING_MODE_INT, 2)9892         sDefaults.putInt(KEY_CARRIER_DEFAULT_WFC_IMS_ROAMING_MODE_INT, 2);
sDefaults.putBoolean(KEY_CARRIER_FORCE_DISABLE_ETWS_CMAS_TEST_BOOL, false)9893         sDefaults.putBoolean(KEY_CARRIER_FORCE_DISABLE_ETWS_CMAS_TEST_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_RCS_PROVISIONING_REQUIRED_BOOL, true)9894         sDefaults.putBoolean(KEY_CARRIER_RCS_PROVISIONING_REQUIRED_BOOL, true);
sDefaults.putBoolean(KEY_CARRIER_VOLTE_PROVISIONING_REQUIRED_BOOL, false)9895         sDefaults.putBoolean(KEY_CARRIER_VOLTE_PROVISIONING_REQUIRED_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_UT_PROVISIONING_REQUIRED_BOOL, false)9896         sDefaults.putBoolean(KEY_CARRIER_UT_PROVISIONING_REQUIRED_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_SUPPORTS_SS_OVER_UT_BOOL, false)9897         sDefaults.putBoolean(KEY_CARRIER_SUPPORTS_SS_OVER_UT_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_VOLTE_OVERRIDE_WFC_PROVISIONING_BOOL, false)9898         sDefaults.putBoolean(KEY_CARRIER_VOLTE_OVERRIDE_WFC_PROVISIONING_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_VOLTE_TTY_SUPPORTED_BOOL, true)9899         sDefaults.putBoolean(KEY_CARRIER_VOLTE_TTY_SUPPORTED_BOOL, true);
sDefaults.putBoolean(KEY_CARRIER_VOWIFI_TTY_SUPPORTED_BOOL, true)9900         sDefaults.putBoolean(KEY_CARRIER_VOWIFI_TTY_SUPPORTED_BOOL, true);
sDefaults.putBoolean(KEY_CARRIER_ALLOW_TURNOFF_IMS_BOOL, true)9901         sDefaults.putBoolean(KEY_CARRIER_ALLOW_TURNOFF_IMS_BOOL, true);
sDefaults.putBoolean(KEY_CARRIER_IMS_GBA_REQUIRED_BOOL, false)9902         sDefaults.putBoolean(KEY_CARRIER_IMS_GBA_REQUIRED_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_INSTANT_LETTERING_AVAILABLE_BOOL, false)9903         sDefaults.putBoolean(KEY_CARRIER_INSTANT_LETTERING_AVAILABLE_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_USE_IMS_FIRST_FOR_EMERGENCY_BOOL, true)9904         sDefaults.putBoolean(KEY_CARRIER_USE_IMS_FIRST_FOR_EMERGENCY_BOOL, true);
sDefaults.putBoolean(KEY_PREFER_IN_SERVICE_SIM_FOR_NORMAL_ROUTED_EMERGENCY_CALLS_BOOL, false)9905         sDefaults.putBoolean(KEY_PREFER_IN_SERVICE_SIM_FOR_NORMAL_ROUTED_EMERGENCY_CALLS_BOOL,
9906                 false);
sDefaults.putBoolean(KEY_USE_ONLY_DIALED_SIM_ECC_LIST_BOOL, false)9907         sDefaults.putBoolean(KEY_USE_ONLY_DIALED_SIM_ECC_LIST_BOOL, false);
sDefaults.putString(KEY_CARRIER_NETWORK_SERVICE_WWAN_PACKAGE_OVERRIDE_STRING, R)9908         sDefaults.putString(KEY_CARRIER_NETWORK_SERVICE_WWAN_PACKAGE_OVERRIDE_STRING, "");
sDefaults.putString(KEY_CARRIER_NETWORK_SERVICE_WLAN_PACKAGE_OVERRIDE_STRING, R)9909         sDefaults.putString(KEY_CARRIER_NETWORK_SERVICE_WLAN_PACKAGE_OVERRIDE_STRING, "");
sDefaults.putString(KEY_CARRIER_QUALIFIED_NETWORKS_SERVICE_PACKAGE_OVERRIDE_STRING, R)9910         sDefaults.putString(KEY_CARRIER_QUALIFIED_NETWORKS_SERVICE_PACKAGE_OVERRIDE_STRING, "");
sDefaults.putString(KEY_CARRIER_DATA_SERVICE_WWAN_PACKAGE_OVERRIDE_STRING, R)9911         sDefaults.putString(KEY_CARRIER_DATA_SERVICE_WWAN_PACKAGE_OVERRIDE_STRING, "");
sDefaults.putString(KEY_CARRIER_DATA_SERVICE_WLAN_PACKAGE_OVERRIDE_STRING, R)9912         sDefaults.putString(KEY_CARRIER_DATA_SERVICE_WLAN_PACKAGE_OVERRIDE_STRING, "");
sDefaults.putString(KEY_CARRIER_INSTANT_LETTERING_INVALID_CHARS_STRING, R)9913         sDefaults.putString(KEY_CARRIER_INSTANT_LETTERING_INVALID_CHARS_STRING, "");
sDefaults.putString(KEY_CARRIER_INSTANT_LETTERING_ESCAPED_CHARS_STRING, R)9914         sDefaults.putString(KEY_CARRIER_INSTANT_LETTERING_ESCAPED_CHARS_STRING, "");
sDefaults.putString(KEY_CARRIER_INSTANT_LETTERING_ENCODING_STRING, R)9915         sDefaults.putString(KEY_CARRIER_INSTANT_LETTERING_ENCODING_STRING, "");
sDefaults.putInt(KEY_CARRIER_INSTANT_LETTERING_LENGTH_LIMIT_INT, 64)9916         sDefaults.putInt(KEY_CARRIER_INSTANT_LETTERING_LENGTH_LIMIT_INT, 64);
sDefaults.putBoolean(KEY_DISABLE_CDMA_ACTIVATION_CODE_BOOL, false)9917         sDefaults.putBoolean(KEY_DISABLE_CDMA_ACTIVATION_CODE_BOOL, false);
sDefaults.putBoolean(KEY_DTMF_TYPE_ENABLED_BOOL, false)9918         sDefaults.putBoolean(KEY_DTMF_TYPE_ENABLED_BOOL, false);
sDefaults.putBoolean(KEY_ENABLE_DIALER_KEY_VIBRATION_BOOL, true)9919         sDefaults.putBoolean(KEY_ENABLE_DIALER_KEY_VIBRATION_BOOL, true);
sDefaults.putBoolean(KEY_HAS_IN_CALL_NOISE_SUPPRESSION_BOOL, false)9920         sDefaults.putBoolean(KEY_HAS_IN_CALL_NOISE_SUPPRESSION_BOOL, false);
sDefaults.putBoolean(KEY_HIDE_CARRIER_NETWORK_SETTINGS_BOOL, false)9921         sDefaults.putBoolean(KEY_HIDE_CARRIER_NETWORK_SETTINGS_BOOL, false);
sDefaults.putBoolean(KEY_ONLY_AUTO_SELECT_IN_HOME_NETWORK_BOOL, false)9922         sDefaults.putBoolean(KEY_ONLY_AUTO_SELECT_IN_HOME_NETWORK_BOOL, false);
sDefaults.putBoolean(KEY_SHOW_SINGLE_OPERATOR_ROW_IN_CHOOSE_NETWORK_SETTING_BOOL, true)9923         sDefaults.putBoolean(KEY_SHOW_SINGLE_OPERATOR_ROW_IN_CHOOSE_NETWORK_SETTING_BOOL, true);
sDefaults.putBoolean(KEY_SHOW_SPN_FOR_HOME_IN_CHOOSE_NETWORK_SETTING_BOOL, false)9924         sDefaults.putBoolean(KEY_SHOW_SPN_FOR_HOME_IN_CHOOSE_NETWORK_SETTING_BOOL, false);
sDefaults.putBoolean(KEY_SIMPLIFIED_NETWORK_SETTINGS_BOOL, false)9925         sDefaults.putBoolean(KEY_SIMPLIFIED_NETWORK_SETTINGS_BOOL, false);
sDefaults.putBoolean(KEY_HIDE_SIM_LOCK_SETTINGS_BOOL, false)9926         sDefaults.putBoolean(KEY_HIDE_SIM_LOCK_SETTINGS_BOOL, false);
9927 
sDefaults.putBoolean(KEY_CARRIER_VOLTE_PROVISIONED_BOOL, false)9928         sDefaults.putBoolean(KEY_CARRIER_VOLTE_PROVISIONED_BOOL, false);
sDefaults.putBoolean(KEY_CALL_BARRING_VISIBILITY_BOOL, false)9929         sDefaults.putBoolean(KEY_CALL_BARRING_VISIBILITY_BOOL, false);
sDefaults.putBoolean(KEY_CALL_BARRING_SUPPORTS_PASSWORD_CHANGE_BOOL, true)9930         sDefaults.putBoolean(KEY_CALL_BARRING_SUPPORTS_PASSWORD_CHANGE_BOOL, true);
sDefaults.putBoolean(KEY_CALL_BARRING_SUPPORTS_DEACTIVATE_ALL_BOOL, true)9931         sDefaults.putBoolean(KEY_CALL_BARRING_SUPPORTS_DEACTIVATE_ALL_BOOL, true);
sDefaults.putInt(KEY_CALL_BARRING_DEFAULT_SERVICE_CLASS_INT, SERVICE_CLASS_VOICE)9932         sDefaults.putInt(KEY_CALL_BARRING_DEFAULT_SERVICE_CLASS_INT, SERVICE_CLASS_VOICE);
sDefaults.putBoolean(KEY_SUPPORT_SS_OVER_CDMA_BOOL, false)9933         sDefaults.putBoolean(KEY_SUPPORT_SS_OVER_CDMA_BOOL, false);
sDefaults.putBoolean(KEY_CALL_FORWARDING_VISIBILITY_BOOL, true)9934         sDefaults.putBoolean(KEY_CALL_FORWARDING_VISIBILITY_BOOL, true);
sDefaults.putBoolean(KEY_CALL_FORWARDING_WHEN_UNREACHABLE_SUPPORTED_BOOL, true)9935         sDefaults.putBoolean(KEY_CALL_FORWARDING_WHEN_UNREACHABLE_SUPPORTED_BOOL, true);
sDefaults.putBoolean(KEY_CALL_FORWARDING_WHEN_UNANSWERED_SUPPORTED_BOOL, true)9936         sDefaults.putBoolean(KEY_CALL_FORWARDING_WHEN_UNANSWERED_SUPPORTED_BOOL, true);
sDefaults.putBoolean(KEY_CALL_FORWARDING_WHEN_BUSY_SUPPORTED_BOOL, true)9937         sDefaults.putBoolean(KEY_CALL_FORWARDING_WHEN_BUSY_SUPPORTED_BOOL, true);
sDefaults.putBoolean(KEY_ADDITIONAL_SETTINGS_CALLER_ID_VISIBILITY_BOOL, true)9938         sDefaults.putBoolean(KEY_ADDITIONAL_SETTINGS_CALLER_ID_VISIBILITY_BOOL, true);
sDefaults.putBoolean(KEY_ADDITIONAL_SETTINGS_CALL_WAITING_VISIBILITY_BOOL, true)9939         sDefaults.putBoolean(KEY_ADDITIONAL_SETTINGS_CALL_WAITING_VISIBILITY_BOOL, true);
sDefaults.putBoolean(KEY_DISABLE_SUPPLEMENTARY_SERVICES_IN_AIRPLANE_MODE_BOOL, false)9940         sDefaults.putBoolean(KEY_DISABLE_SUPPLEMENTARY_SERVICES_IN_AIRPLANE_MODE_BOOL, false);
sDefaults.putBoolean(KEY_IGNORE_SIM_NETWORK_LOCKED_EVENTS_BOOL, false)9941         sDefaults.putBoolean(KEY_IGNORE_SIM_NETWORK_LOCKED_EVENTS_BOOL, false);
sDefaults.putBoolean(KEY_MDN_IS_ADDITIONAL_VOICEMAIL_NUMBER_BOOL, false)9942         sDefaults.putBoolean(KEY_MDN_IS_ADDITIONAL_VOICEMAIL_NUMBER_BOOL, false);
sDefaults.putBoolean(KEY_OPERATOR_SELECTION_EXPAND_BOOL, true)9943         sDefaults.putBoolean(KEY_OPERATOR_SELECTION_EXPAND_BOOL, true);
sDefaults.putBoolean(KEY_PREFER_2G_BOOL, false)9944         sDefaults.putBoolean(KEY_PREFER_2G_BOOL, false);
sDefaults.putBoolean(KEY_4G_ONLY_BOOL, false)9945         sDefaults.putBoolean(KEY_4G_ONLY_BOOL, false);
sDefaults.putBoolean(KEY_SHOW_APN_SETTING_CDMA_BOOL, false)9946         sDefaults.putBoolean(KEY_SHOW_APN_SETTING_CDMA_BOOL, false);
sDefaults.putBoolean(KEY_SHOW_CDMA_CHOICES_BOOL, false)9947         sDefaults.putBoolean(KEY_SHOW_CDMA_CHOICES_BOOL, false);
sDefaults.putBoolean(KEY_SMS_REQUIRES_DESTINATION_NUMBER_CONVERSION_BOOL, false)9948         sDefaults.putBoolean(KEY_SMS_REQUIRES_DESTINATION_NUMBER_CONVERSION_BOOL, false);
sDefaults.putBoolean(KEY_SUPPORT_EMERGENCY_SMS_OVER_IMS_BOOL, false)9949         sDefaults.putBoolean(KEY_SUPPORT_EMERGENCY_SMS_OVER_IMS_BOOL, false);
sDefaults.putBoolean(KEY_SHOW_ONSCREEN_DIAL_BUTTON_BOOL, true)9950         sDefaults.putBoolean(KEY_SHOW_ONSCREEN_DIAL_BUTTON_BOOL, true);
sDefaults.putBoolean(KEY_SIM_NETWORK_UNLOCK_ALLOW_DISMISS_BOOL, true)9951         sDefaults.putBoolean(KEY_SIM_NETWORK_UNLOCK_ALLOW_DISMISS_BOOL, true);
sDefaults.putBoolean(KEY_SUPPORT_PAUSE_IMS_VIDEO_CALLS_BOOL, false)9952         sDefaults.putBoolean(KEY_SUPPORT_PAUSE_IMS_VIDEO_CALLS_BOOL, false);
sDefaults.putBoolean(KEY_SUPPORT_SWAP_AFTER_MERGE_BOOL, true)9953         sDefaults.putBoolean(KEY_SUPPORT_SWAP_AFTER_MERGE_BOOL, true);
sDefaults.putBoolean(KEY_USE_HFA_FOR_PROVISIONING_BOOL, false)9954         sDefaults.putBoolean(KEY_USE_HFA_FOR_PROVISIONING_BOOL, false);
sDefaults.putBoolean(KEY_EDITABLE_VOICEMAIL_NUMBER_SETTING_BOOL, true)9955         sDefaults.putBoolean(KEY_EDITABLE_VOICEMAIL_NUMBER_SETTING_BOOL, true);
sDefaults.putBoolean(KEY_EDITABLE_VOICEMAIL_NUMBER_BOOL, false)9956         sDefaults.putBoolean(KEY_EDITABLE_VOICEMAIL_NUMBER_BOOL, false);
sDefaults.putBoolean(KEY_USE_OTASP_FOR_PROVISIONING_BOOL, false)9957         sDefaults.putBoolean(KEY_USE_OTASP_FOR_PROVISIONING_BOOL, false);
sDefaults.putBoolean(KEY_VOICEMAIL_NOTIFICATION_PERSISTENT_BOOL, false)9958         sDefaults.putBoolean(KEY_VOICEMAIL_NOTIFICATION_PERSISTENT_BOOL, false);
sDefaults.putBoolean(KEY_VOICE_PRIVACY_DISABLE_UI_BOOL, false)9959         sDefaults.putBoolean(KEY_VOICE_PRIVACY_DISABLE_UI_BOOL, false);
sDefaults.putBoolean(KEY_WORLD_PHONE_BOOL, false)9960         sDefaults.putBoolean(KEY_WORLD_PHONE_BOOL, false);
sDefaults.putBoolean(KEY_REQUIRE_ENTITLEMENT_CHECKS_BOOL, true)9961         sDefaults.putBoolean(KEY_REQUIRE_ENTITLEMENT_CHECKS_BOOL, true);
sDefaults.putBoolean(KEY_CARRIER_SUPPORTS_TETHERING_BOOL, true)9962         sDefaults.putBoolean(KEY_CARRIER_SUPPORTS_TETHERING_BOOL, true);
sDefaults.putBoolean(KEY_RESTART_RADIO_ON_PDP_FAIL_REGULAR_DEACTIVATION_BOOL, false)9963         sDefaults.putBoolean(KEY_RESTART_RADIO_ON_PDP_FAIL_REGULAR_DEACTIVATION_BOOL, false);
sDefaults.putIntArray(KEY_RADIO_RESTART_FAILURE_CAUSES_INT_ARRAY, new int[0])9964         sDefaults.putIntArray(KEY_RADIO_RESTART_FAILURE_CAUSES_INT_ARRAY, new int[0]);
sDefaults.putInt(KEY_VOLTE_REPLACEMENT_RAT_INT, 0)9965         sDefaults.putInt(KEY_VOLTE_REPLACEMENT_RAT_INT, 0);
sDefaults.putString(KEY_DEFAULT_SIM_CALL_MANAGER_STRING, R)9966         sDefaults.putString(KEY_DEFAULT_SIM_CALL_MANAGER_STRING, "");
sDefaults.putString(KEY_VVM_DESTINATION_NUMBER_STRING, R)9967         sDefaults.putString(KEY_VVM_DESTINATION_NUMBER_STRING, "");
sDefaults.putInt(KEY_VVM_PORT_NUMBER_INT, 0)9968         sDefaults.putInt(KEY_VVM_PORT_NUMBER_INT, 0);
sDefaults.putString(KEY_VVM_TYPE_STRING, R)9969         sDefaults.putString(KEY_VVM_TYPE_STRING, "");
sDefaults.putBoolean(KEY_VVM_CELLULAR_DATA_REQUIRED_BOOL, false)9970         sDefaults.putBoolean(KEY_VVM_CELLULAR_DATA_REQUIRED_BOOL, false);
sDefaults.putString(KEY_VVM_CLIENT_PREFIX_STRING, R)9971         sDefaults.putString(KEY_VVM_CLIENT_PREFIX_STRING, "//VVM");
sDefaults.putBoolean(KEY_VVM_SSL_ENABLED_BOOL, false)9972         sDefaults.putBoolean(KEY_VVM_SSL_ENABLED_BOOL, false);
sDefaults.putStringArray(KEY_VVM_DISABLED_CAPABILITIES_STRING_ARRAY, null)9973         sDefaults.putStringArray(KEY_VVM_DISABLED_CAPABILITIES_STRING_ARRAY, null);
sDefaults.putBoolean(KEY_VVM_LEGACY_MODE_ENABLED_BOOL, false)9974         sDefaults.putBoolean(KEY_VVM_LEGACY_MODE_ENABLED_BOOL, false);
sDefaults.putBoolean(KEY_VVM_PREFETCH_BOOL, true)9975         sDefaults.putBoolean(KEY_VVM_PREFETCH_BOOL, true);
sDefaults.putString(KEY_CARRIER_VVM_PACKAGE_NAME_STRING, R)9976         sDefaults.putString(KEY_CARRIER_VVM_PACKAGE_NAME_STRING, "");
sDefaults.putStringArray(KEY_CARRIER_VVM_PACKAGE_NAME_STRING_ARRAY, null)9977         sDefaults.putStringArray(KEY_CARRIER_VVM_PACKAGE_NAME_STRING_ARRAY, null);
sDefaults.putBoolean(KEY_SHOW_ICCID_IN_SIM_STATUS_BOOL, false)9978         sDefaults.putBoolean(KEY_SHOW_ICCID_IN_SIM_STATUS_BOOL, false);
sDefaults.putBoolean(KEY_SHOW_SIGNAL_STRENGTH_IN_SIM_STATUS_BOOL, true)9979         sDefaults.putBoolean(KEY_SHOW_SIGNAL_STRENGTH_IN_SIM_STATUS_BOOL, true);
sDefaults.putBoolean(KEY_INFLATE_SIGNAL_STRENGTH_BOOL, false)9980         sDefaults.putBoolean(KEY_INFLATE_SIGNAL_STRENGTH_BOOL, false);
sDefaults.putBoolean(KEY_CI_ACTION_ON_SYS_UPDATE_BOOL, false)9981         sDefaults.putBoolean(KEY_CI_ACTION_ON_SYS_UPDATE_BOOL, false);
sDefaults.putString(KEY_CI_ACTION_ON_SYS_UPDATE_INTENT_STRING, R)9982         sDefaults.putString(KEY_CI_ACTION_ON_SYS_UPDATE_INTENT_STRING, "");
sDefaults.putString(KEY_CI_ACTION_ON_SYS_UPDATE_EXTRA_STRING, R)9983         sDefaults.putString(KEY_CI_ACTION_ON_SYS_UPDATE_EXTRA_STRING, "");
sDefaults.putString(KEY_CI_ACTION_ON_SYS_UPDATE_EXTRA_VAL_STRING, R)9984         sDefaults.putString(KEY_CI_ACTION_ON_SYS_UPDATE_EXTRA_VAL_STRING, "");
sDefaults.putBoolean(KEY_CSP_ENABLED_BOOL, false)9985         sDefaults.putBoolean(KEY_CSP_ENABLED_BOOL, false);
sDefaults.putBoolean(KEY_ALLOW_ADDING_APNS_BOOL, true)9986         sDefaults.putBoolean(KEY_ALLOW_ADDING_APNS_BOOL, true);
sDefaults.putStringArray(KEY_READ_ONLY_APN_TYPES_STRING_ARRAY, new String[] {R})9987         sDefaults.putStringArray(KEY_READ_ONLY_APN_TYPES_STRING_ARRAY, new String[] {"dun"});
sDefaults.putStringArray(KEY_READ_ONLY_APN_FIELDS_STRING_ARRAY, null)9988         sDefaults.putStringArray(KEY_READ_ONLY_APN_FIELDS_STRING_ARRAY, null);
sDefaults.putStringArray(KEY_APN_SETTINGS_DEFAULT_APN_TYPES_STRING_ARRAY, null)9989         sDefaults.putStringArray(KEY_APN_SETTINGS_DEFAULT_APN_TYPES_STRING_ARRAY, null);
Apn.getDefaults()9990         sDefaults.putAll(Apn.getDefaults());
9991 
sDefaults.putBoolean(KEY_BROADCAST_EMERGENCY_CALL_STATE_CHANGES_BOOL, false)9992         sDefaults.putBoolean(KEY_BROADCAST_EMERGENCY_CALL_STATE_CHANGES_BOOL, false);
sDefaults.putBoolean(KEY_ALWAYS_SHOW_EMERGENCY_ALERT_ONOFF_BOOL, false)9993         sDefaults.putBoolean(KEY_ALWAYS_SHOW_EMERGENCY_ALERT_ONOFF_BOOL, false);
sDefaults.putInt(KEY_DEFAULT_MTU_INT, 1500)9994         sDefaults.putInt(KEY_DEFAULT_MTU_INT, 1500);
sDefaults.putLong(KEY_CARRIER_DATA_CALL_APN_RETRY_AFTER_DISCONNECT_LONG, 3000)9995         sDefaults.putLong(KEY_CARRIER_DATA_CALL_APN_RETRY_AFTER_DISCONNECT_LONG, 3000);
sDefaults.putString(KEY_CARRIER_ERI_FILE_NAME_STRING, R)9996         sDefaults.putString(KEY_CARRIER_ERI_FILE_NAME_STRING, "eri.xml");
sDefaults.putInt(KEY_DURATION_BLOCKING_DISABLED_AFTER_EMERGENCY_INT, 7200)9997         sDefaults.putInt(KEY_DURATION_BLOCKING_DISABLED_AFTER_EMERGENCY_INT, 7200);
sDefaults.putStringArray(KEY_CARRIER_METERED_APN_TYPES_STRINGS, new String[]{R, R, R, R, R})9998         sDefaults.putStringArray(KEY_CARRIER_METERED_APN_TYPES_STRINGS,
9999                 new String[]{"default", "mms", "dun", "supl", "enterprise"});
sDefaults.putStringArray(KEY_CARRIER_METERED_ROAMING_APN_TYPES_STRINGS, new String[]{R, R, R, R, R})10000         sDefaults.putStringArray(KEY_CARRIER_METERED_ROAMING_APN_TYPES_STRINGS,
10001                 new String[]{"default", "mms", "dun", "supl", "enterprise"});
sDefaults.putIntArray(KEY_ONLY_SINGLE_DC_ALLOWED_INT_ARRAY, new int[] {TelephonyManager.NETWORK_TYPE_CDMA, TelephonyManager.NETWORK_TYPE_1xRTT, TelephonyManager.NETWORK_TYPE_EVDO_0, TelephonyManager.NETWORK_TYPE_EVDO_A, TelephonyManager.NETWORK_TYPE_EVDO_B})10002         sDefaults.putIntArray(KEY_ONLY_SINGLE_DC_ALLOWED_INT_ARRAY,
10003                 new int[] {TelephonyManager.NETWORK_TYPE_CDMA, TelephonyManager.NETWORK_TYPE_1xRTT,
10004                         TelephonyManager.NETWORK_TYPE_EVDO_0, TelephonyManager.NETWORK_TYPE_EVDO_A,
10005                         TelephonyManager.NETWORK_TYPE_EVDO_B});
sDefaults.putIntArray(KEY_CAPABILITIES_EXEMPT_FROM_SINGLE_DC_CHECK_INT_ARRAY, new int[] {NetworkCapabilities.NET_CAPABILITY_IMS})10006         sDefaults.putIntArray(KEY_CAPABILITIES_EXEMPT_FROM_SINGLE_DC_CHECK_INT_ARRAY,
10007                 new int[] {NetworkCapabilities.NET_CAPABILITY_IMS});
sDefaults.putStringArray(KEY_GSM_ROAMING_NETWORKS_STRING_ARRAY, null)10008         sDefaults.putStringArray(KEY_GSM_ROAMING_NETWORKS_STRING_ARRAY, null);
sDefaults.putStringArray(KEY_GSM_NONROAMING_NETWORKS_STRING_ARRAY, null)10009         sDefaults.putStringArray(KEY_GSM_NONROAMING_NETWORKS_STRING_ARRAY, null);
sDefaults.putString(KEY_CONFIG_IMS_PACKAGE_OVERRIDE_STRING, null)10010         sDefaults.putString(KEY_CONFIG_IMS_PACKAGE_OVERRIDE_STRING, null);
sDefaults.putString(KEY_CONFIG_IMS_MMTEL_PACKAGE_OVERRIDE_STRING, null)10011         sDefaults.putString(KEY_CONFIG_IMS_MMTEL_PACKAGE_OVERRIDE_STRING, null);
sDefaults.putString(KEY_CONFIG_IMS_RCS_PACKAGE_OVERRIDE_STRING, null)10012         sDefaults.putString(KEY_CONFIG_IMS_RCS_PACKAGE_OVERRIDE_STRING, null);
sDefaults.putStringArray(KEY_CDMA_ROAMING_NETWORKS_STRING_ARRAY, null)10013         sDefaults.putStringArray(KEY_CDMA_ROAMING_NETWORKS_STRING_ARRAY, null);
sDefaults.putStringArray(KEY_CDMA_NONROAMING_NETWORKS_STRING_ARRAY, null)10014         sDefaults.putStringArray(KEY_CDMA_NONROAMING_NETWORKS_STRING_ARRAY, null);
sDefaults.putStringArray(KEY_DIAL_STRING_REPLACE_STRING_ARRAY, null)10015         sDefaults.putStringArray(KEY_DIAL_STRING_REPLACE_STRING_ARRAY, null);
sDefaults.putStringArray(KEY_INTERNATIONAL_ROAMING_DIAL_STRING_REPLACE_STRING_ARRAY, null)10016         sDefaults.putStringArray(KEY_INTERNATIONAL_ROAMING_DIAL_STRING_REPLACE_STRING_ARRAY, null);
sDefaults.putBoolean(KEY_FORCE_HOME_NETWORK_BOOL, false)10017         sDefaults.putBoolean(KEY_FORCE_HOME_NETWORK_BOOL, false);
sDefaults.putInt(KEY_GSM_DTMF_TONE_DELAY_INT, 0)10018         sDefaults.putInt(KEY_GSM_DTMF_TONE_DELAY_INT, 0);
sDefaults.putInt(KEY_IMS_DTMF_TONE_DELAY_INT, 0)10019         sDefaults.putInt(KEY_IMS_DTMF_TONE_DELAY_INT, 0);
sDefaults.putInt(KEY_CDMA_DTMF_TONE_DELAY_INT, 100)10020         sDefaults.putInt(KEY_CDMA_DTMF_TONE_DELAY_INT, 100);
sDefaults.putBoolean(KEY_CALL_FORWARDING_MAP_NON_NUMBER_TO_VOICEMAIL_BOOL, false)10021         sDefaults.putBoolean(KEY_CALL_FORWARDING_MAP_NON_NUMBER_TO_VOICEMAIL_BOOL, false);
sDefaults.putBoolean(KEY_IGNORE_RTT_MODE_SETTING_BOOL, true)10022         sDefaults.putBoolean(KEY_IGNORE_RTT_MODE_SETTING_BOOL, true);
sDefaults.putInt(KEY_CDMA_3WAYCALL_FLASH_DELAY_INT , 0)10023         sDefaults.putInt(KEY_CDMA_3WAYCALL_FLASH_DELAY_INT , 0);
sDefaults.putBoolean(KEY_SUPPORT_ADHOC_CONFERENCE_CALLS_BOOL, false)10024         sDefaults.putBoolean(KEY_SUPPORT_ADHOC_CONFERENCE_CALLS_BOOL, false);
sDefaults.putBoolean(KEY_SUPPORT_ADD_CONFERENCE_PARTICIPANTS_BOOL, false)10025         sDefaults.putBoolean(KEY_SUPPORT_ADD_CONFERENCE_PARTICIPANTS_BOOL, false);
sDefaults.putBoolean(KEY_SUPPORT_CONFERENCE_CALL_BOOL, true)10026         sDefaults.putBoolean(KEY_SUPPORT_CONFERENCE_CALL_BOOL, true);
sDefaults.putBoolean(KEY_SUPPORT_IMS_CONFERENCE_CALL_BOOL, true)10027         sDefaults.putBoolean(KEY_SUPPORT_IMS_CONFERENCE_CALL_BOOL, true);
sDefaults.putBoolean(KEY_LOCAL_DISCONNECT_EMPTY_IMS_CONFERENCE_BOOL, false)10028         sDefaults.putBoolean(KEY_LOCAL_DISCONNECT_EMPTY_IMS_CONFERENCE_BOOL, false);
sDefaults.putBoolean(KEY_SUPPORT_MANAGE_IMS_CONFERENCE_CALL_BOOL, true)10029         sDefaults.putBoolean(KEY_SUPPORT_MANAGE_IMS_CONFERENCE_CALL_BOOL, true);
sDefaults.putBoolean(KEY_SUPPORT_IMS_CONFERENCE_EVENT_PACKAGE_BOOL, true)10030         sDefaults.putBoolean(KEY_SUPPORT_IMS_CONFERENCE_EVENT_PACKAGE_BOOL, true);
sDefaults.putBoolean(KEY_SUPPORT_IMS_CONFERENCE_EVENT_PACKAGE_ON_PEER_BOOL, true)10031         sDefaults.putBoolean(KEY_SUPPORT_IMS_CONFERENCE_EVENT_PACKAGE_ON_PEER_BOOL, true);
sDefaults.putBoolean(KEY_SUPPORTS_DEVICE_TO_DEVICE_COMMUNICATION_USING_RTP_BOOL, false)10032         sDefaults.putBoolean(KEY_SUPPORTS_DEVICE_TO_DEVICE_COMMUNICATION_USING_RTP_BOOL, false);
sDefaults.putBoolean(KEY_SUPPORTS_SDP_NEGOTIATION_OF_D2D_RTP_HEADER_EXTENSIONS_BOOL, false)10033         sDefaults.putBoolean(KEY_SUPPORTS_SDP_NEGOTIATION_OF_D2D_RTP_HEADER_EXTENSIONS_BOOL, false);
sDefaults.putBoolean(KEY_SUPPORTS_DEVICE_TO_DEVICE_COMMUNICATION_USING_DTMF_BOOL, false)10034         sDefaults.putBoolean(KEY_SUPPORTS_DEVICE_TO_DEVICE_COMMUNICATION_USING_DTMF_BOOL, false);
sDefaults.putBoolean(KEY_SUPPORT_VIDEO_CONFERENCE_CALL_BOOL, false)10035         sDefaults.putBoolean(KEY_SUPPORT_VIDEO_CONFERENCE_CALL_BOOL, false);
sDefaults.putBoolean(KEY_IS_IMS_CONFERENCE_SIZE_ENFORCED_BOOL, false)10036         sDefaults.putBoolean(KEY_IS_IMS_CONFERENCE_SIZE_ENFORCED_BOOL, false);
sDefaults.putInt(KEY_IMS_CONFERENCE_SIZE_LIMIT_INT, 5)10037         sDefaults.putInt(KEY_IMS_CONFERENCE_SIZE_LIMIT_INT, 5);
sDefaults.putBoolean(KEY_DISPLAY_HD_AUDIO_PROPERTY_BOOL, true)10038         sDefaults.putBoolean(KEY_DISPLAY_HD_AUDIO_PROPERTY_BOOL, true);
sDefaults.putBoolean(KEY_EDITABLE_ENHANCED_4G_LTE_BOOL, true)10039         sDefaults.putBoolean(KEY_EDITABLE_ENHANCED_4G_LTE_BOOL, true);
sDefaults.putBoolean(KEY_HIDE_ENHANCED_4G_LTE_BOOL, false)10040         sDefaults.putBoolean(KEY_HIDE_ENHANCED_4G_LTE_BOOL, false);
sDefaults.putBoolean(KEY_ENHANCED_4G_LTE_ON_BY_DEFAULT_BOOL, true)10041         sDefaults.putBoolean(KEY_ENHANCED_4G_LTE_ON_BY_DEFAULT_BOOL, true);
sDefaults.putBoolean(KEY_HIDE_IMS_APN_BOOL, false)10042         sDefaults.putBoolean(KEY_HIDE_IMS_APN_BOOL, false);
sDefaults.putBoolean(KEY_HIDE_PREFERRED_NETWORK_TYPE_BOOL, false)10043         sDefaults.putBoolean(KEY_HIDE_PREFERRED_NETWORK_TYPE_BOOL, false);
sDefaults.putBoolean(KEY_ALLOW_EMERGENCY_VIDEO_CALLS_BOOL, false)10044         sDefaults.putBoolean(KEY_ALLOW_EMERGENCY_VIDEO_CALLS_BOOL, false);
sDefaults.putStringArray(KEY_ENABLE_APPS_STRING_ARRAY, null)10045         sDefaults.putStringArray(KEY_ENABLE_APPS_STRING_ARRAY, null);
sDefaults.putBoolean(KEY_EDITABLE_WFC_MODE_BOOL, true)10046         sDefaults.putBoolean(KEY_EDITABLE_WFC_MODE_BOOL, true);
sDefaults.putStringArray(KEY_WFC_OPERATOR_ERROR_CODES_STRING_ARRAY, null)10047         sDefaults.putStringArray(KEY_WFC_OPERATOR_ERROR_CODES_STRING_ARRAY, null);
sDefaults.putInt(KEY_WFC_SPN_FORMAT_IDX_INT, 0)10048         sDefaults.putInt(KEY_WFC_SPN_FORMAT_IDX_INT, 0);
sDefaults.putInt(KEY_WFC_DATA_SPN_FORMAT_IDX_INT, 0)10049         sDefaults.putInt(KEY_WFC_DATA_SPN_FORMAT_IDX_INT, 0);
sDefaults.putInt(KEY_WFC_FLIGHT_MODE_SPN_FORMAT_IDX_INT, -1)10050         sDefaults.putInt(KEY_WFC_FLIGHT_MODE_SPN_FORMAT_IDX_INT, -1);
sDefaults.putBoolean(KEY_WFC_SPN_USE_ROOT_LOCALE, false)10051         sDefaults.putBoolean(KEY_WFC_SPN_USE_ROOT_LOCALE, false);
sDefaults.putString(KEY_WFC_EMERGENCY_ADDRESS_CARRIER_APP_STRING, R)10052         sDefaults.putString(KEY_WFC_EMERGENCY_ADDRESS_CARRIER_APP_STRING, "");
sDefaults.putBoolean(KEY_CONFIG_WIFI_DISABLE_IN_ECBM, false)10053         sDefaults.putBoolean(KEY_CONFIG_WIFI_DISABLE_IN_ECBM, false);
sDefaults.putBoolean(KEY_CARRIER_NAME_OVERRIDE_BOOL, false)10054         sDefaults.putBoolean(KEY_CARRIER_NAME_OVERRIDE_BOOL, false);
sDefaults.putString(KEY_CARRIER_NAME_STRING, R)10055         sDefaults.putString(KEY_CARRIER_NAME_STRING, "");
sDefaults.putBoolean(KEY_WFC_CARRIER_NAME_OVERRIDE_BY_PNN_BOOL, false)10056         sDefaults.putBoolean(KEY_WFC_CARRIER_NAME_OVERRIDE_BY_PNN_BOOL, false);
sDefaults.putInt(KEY_CROSS_SIM_SPN_FORMAT_INT, 1)10057         sDefaults.putInt(KEY_CROSS_SIM_SPN_FORMAT_INT, 1);
sDefaults.putInt(KEY_SPN_DISPLAY_CONDITION_OVERRIDE_INT, -1)10058         sDefaults.putInt(KEY_SPN_DISPLAY_CONDITION_OVERRIDE_INT, -1);
sDefaults.putStringArray(KEY_SPDI_OVERRIDE_STRING_ARRAY, null)10059         sDefaults.putStringArray(KEY_SPDI_OVERRIDE_STRING_ARRAY, null);
sDefaults.putStringArray(KEY_PNN_OVERRIDE_STRING_ARRAY, null)10060         sDefaults.putStringArray(KEY_PNN_OVERRIDE_STRING_ARRAY, null);
sDefaults.putStringArray(KEY_OPL_OVERRIDE_STRING_ARRAY, null)10061         sDefaults.putStringArray(KEY_OPL_OVERRIDE_STRING_ARRAY, null);
sDefaults.putStringArray(KEY_EHPLMN_OVERRIDE_STRING_ARRAY, null)10062         sDefaults.putStringArray(KEY_EHPLMN_OVERRIDE_STRING_ARRAY, null);
sDefaults.putBoolean(KEY_ALLOW_ERI_BOOL, false)10063         sDefaults.putBoolean(KEY_ALLOW_ERI_BOOL, false);
sDefaults.putBoolean(KEY_ENABLE_CARRIER_DISPLAY_NAME_RESOLVER_BOOL, false)10064         sDefaults.putBoolean(KEY_ENABLE_CARRIER_DISPLAY_NAME_RESOLVER_BOOL, false);
sDefaults.putString(KEY_SIM_COUNTRY_ISO_OVERRIDE_STRING, R)10065         sDefaults.putString(KEY_SIM_COUNTRY_ISO_OVERRIDE_STRING, "");
sDefaults.putString(KEY_CARRIER_CALL_SCREENING_APP_STRING, R)10066         sDefaults.putString(KEY_CARRIER_CALL_SCREENING_APP_STRING, "");
sDefaults.putString(KEY_CALL_REDIRECTION_SERVICE_COMPONENT_NAME_STRING, null)10067         sDefaults.putString(KEY_CALL_REDIRECTION_SERVICE_COMPONENT_NAME_STRING, null);
sDefaults.putBoolean(KEY_CDMA_HOME_REGISTERED_PLMN_NAME_OVERRIDE_BOOL, false)10068         sDefaults.putBoolean(KEY_CDMA_HOME_REGISTERED_PLMN_NAME_OVERRIDE_BOOL, false);
sDefaults.putString(KEY_CDMA_HOME_REGISTERED_PLMN_NAME_STRING, R)10069         sDefaults.putString(KEY_CDMA_HOME_REGISTERED_PLMN_NAME_STRING, "");
sDefaults.putBoolean(KEY_SUPPORT_DIRECT_FDN_DIALING_BOOL, false)10070         sDefaults.putBoolean(KEY_SUPPORT_DIRECT_FDN_DIALING_BOOL, false);
sDefaults.putInt(KEY_FDN_NUMBER_LENGTH_LIMIT_INT, 20)10071         sDefaults.putInt(KEY_FDN_NUMBER_LENGTH_LIMIT_INT, 20);
sDefaults.putBoolean(KEY_CARRIER_DEFAULT_DATA_ROAMING_ENABLED_BOOL, false)10072         sDefaults.putBoolean(KEY_CARRIER_DEFAULT_DATA_ROAMING_ENABLED_BOOL, false);
sDefaults.putBoolean(KEY_SKIP_CF_FAIL_TO_DISABLE_DIALOG_BOOL, false)10073         sDefaults.putBoolean(KEY_SKIP_CF_FAIL_TO_DISABLE_DIALOG_BOOL, false);
sDefaults.putBoolean(KEY_SUPPORT_ENHANCED_CALL_BLOCKING_BOOL, true)10074         sDefaults.putBoolean(KEY_SUPPORT_ENHANCED_CALL_BLOCKING_BOOL, true);
10075 
10076         // MMS defaults
sDefaults.putBoolean(KEY_MMS_ALIAS_ENABLED_BOOL, false)10077         sDefaults.putBoolean(KEY_MMS_ALIAS_ENABLED_BOOL, false);
sDefaults.putBoolean(KEY_MMS_ALLOW_ATTACH_AUDIO_BOOL, true)10078         sDefaults.putBoolean(KEY_MMS_ALLOW_ATTACH_AUDIO_BOOL, true);
sDefaults.putBoolean(KEY_MMS_APPEND_TRANSACTION_ID_BOOL, false)10079         sDefaults.putBoolean(KEY_MMS_APPEND_TRANSACTION_ID_BOOL, false);
sDefaults.putBoolean(KEY_MMS_GROUP_MMS_ENABLED_BOOL, true)10080         sDefaults.putBoolean(KEY_MMS_GROUP_MMS_ENABLED_BOOL, true);
sDefaults.putBoolean(KEY_MMS_MMS_DELIVERY_REPORT_ENABLED_BOOL, false)10081         sDefaults.putBoolean(KEY_MMS_MMS_DELIVERY_REPORT_ENABLED_BOOL, false);
sDefaults.putBoolean(KEY_MMS_MMS_ENABLED_BOOL, true)10082         sDefaults.putBoolean(KEY_MMS_MMS_ENABLED_BOOL, true);
sDefaults.putBoolean(KEY_MMS_MMS_READ_REPORT_ENABLED_BOOL, false)10083         sDefaults.putBoolean(KEY_MMS_MMS_READ_REPORT_ENABLED_BOOL, false);
sDefaults.putBoolean(KEY_MMS_MULTIPART_SMS_ENABLED_BOOL, true)10084         sDefaults.putBoolean(KEY_MMS_MULTIPART_SMS_ENABLED_BOOL, true);
sDefaults.putBoolean(KEY_MMS_NOTIFY_WAP_MMSC_ENABLED_BOOL, false)10085         sDefaults.putBoolean(KEY_MMS_NOTIFY_WAP_MMSC_ENABLED_BOOL, false);
sDefaults.putBoolean(KEY_MMS_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES_BOOL, false)10086         sDefaults.putBoolean(KEY_MMS_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES_BOOL, false);
sDefaults.putBoolean(KEY_MMS_SHOW_CELL_BROADCAST_APP_LINKS_BOOL, true)10087         sDefaults.putBoolean(KEY_MMS_SHOW_CELL_BROADCAST_APP_LINKS_BOOL, true);
sDefaults.putBoolean(KEY_MMS_SMS_DELIVERY_REPORT_ENABLED_BOOL, true)10088         sDefaults.putBoolean(KEY_MMS_SMS_DELIVERY_REPORT_ENABLED_BOOL, true);
sDefaults.putBoolean(KEY_MMS_SUPPORT_HTTP_CHARSET_HEADER_BOOL, false)10089         sDefaults.putBoolean(KEY_MMS_SUPPORT_HTTP_CHARSET_HEADER_BOOL, false);
sDefaults.putBoolean(KEY_MMS_SUPPORT_MMS_CONTENT_DISPOSITION_BOOL, true)10090         sDefaults.putBoolean(KEY_MMS_SUPPORT_MMS_CONTENT_DISPOSITION_BOOL, true);
sDefaults.putBoolean(KEY_MMS_CLOSE_CONNECTION_BOOL, false)10091         sDefaults.putBoolean(KEY_MMS_CLOSE_CONNECTION_BOOL, false);
sDefaults.putInt(KEY_MMS_ALIAS_MAX_CHARS_INT, 48)10092         sDefaults.putInt(KEY_MMS_ALIAS_MAX_CHARS_INT, 48);
sDefaults.putInt(KEY_MMS_ALIAS_MIN_CHARS_INT, 2)10093         sDefaults.putInt(KEY_MMS_ALIAS_MIN_CHARS_INT, 2);
sDefaults.putInt(KEY_MMS_HTTP_SOCKET_TIMEOUT_INT, 60 * 1000)10094         sDefaults.putInt(KEY_MMS_HTTP_SOCKET_TIMEOUT_INT, 60 * 1000);
sDefaults.putInt(KEY_MMS_MAX_IMAGE_HEIGHT_INT, 480)10095         sDefaults.putInt(KEY_MMS_MAX_IMAGE_HEIGHT_INT, 480);
sDefaults.putInt(KEY_MMS_MAX_IMAGE_WIDTH_INT, 640)10096         sDefaults.putInt(KEY_MMS_MAX_IMAGE_WIDTH_INT, 640);
sDefaults.putInt(KEY_MMS_MAX_MESSAGE_SIZE_INT, 300 * 1024)10097         sDefaults.putInt(KEY_MMS_MAX_MESSAGE_SIZE_INT, 300 * 1024);
sDefaults.putInt(KEY_MMS_MESSAGE_TEXT_MAX_SIZE_INT, -1)10098         sDefaults.putInt(KEY_MMS_MESSAGE_TEXT_MAX_SIZE_INT, -1);
sDefaults.putInt(KEY_MMS_RECIPIENT_LIMIT_INT, Integer.MAX_VALUE)10099         sDefaults.putInt(KEY_MMS_RECIPIENT_LIMIT_INT, Integer.MAX_VALUE);
sDefaults.putInt(KEY_MMS_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD_INT, -1)10100         sDefaults.putInt(KEY_MMS_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD_INT, -1);
sDefaults.putInt(KEY_MMS_SMS_TO_MMS_TEXT_THRESHOLD_INT, -1)10101         sDefaults.putInt(KEY_MMS_SMS_TO_MMS_TEXT_THRESHOLD_INT, -1);
sDefaults.putInt(KEY_MMS_SUBJECT_MAX_LENGTH_INT, 40)10102         sDefaults.putInt(KEY_MMS_SUBJECT_MAX_LENGTH_INT, 40);
sDefaults.putInt(KEY_MMS_NETWORK_RELEASE_TIMEOUT_MILLIS_INT, 5 * 1000)10103         sDefaults.putInt(KEY_MMS_NETWORK_RELEASE_TIMEOUT_MILLIS_INT, 5 * 1000);
sDefaults.putString(KEY_MMS_EMAIL_GATEWAY_NUMBER_STRING, R)10104         sDefaults.putString(KEY_MMS_EMAIL_GATEWAY_NUMBER_STRING, "");
sDefaults.putString(KEY_MMS_HTTP_PARAMS_STRING, R)10105         sDefaults.putString(KEY_MMS_HTTP_PARAMS_STRING, "");
sDefaults.putString(KEY_MMS_NAI_SUFFIX_STRING, R)10106         sDefaults.putString(KEY_MMS_NAI_SUFFIX_STRING, "");
sDefaults.putString(KEY_MMS_UA_PROF_TAG_NAME_STRING, R)10107         sDefaults.putString(KEY_MMS_UA_PROF_TAG_NAME_STRING, "x-wap-profile");
sDefaults.putString(KEY_MMS_UA_PROF_URL_STRING, R)10108         sDefaults.putString(KEY_MMS_UA_PROF_URL_STRING, "");
sDefaults.putString(KEY_MMS_USER_AGENT_STRING, R)10109         sDefaults.putString(KEY_MMS_USER_AGENT_STRING, "");
sDefaults.putBoolean(KEY_ALLOW_NON_EMERGENCY_CALLS_IN_ECM_BOOL, true)10110         sDefaults.putBoolean(KEY_ALLOW_NON_EMERGENCY_CALLS_IN_ECM_BOOL, true);
sDefaults.putInt(KEY_EMERGENCY_SMS_MODE_TIMER_MS_INT, 0)10111         sDefaults.putInt(KEY_EMERGENCY_SMS_MODE_TIMER_MS_INT, 0);
sDefaults.putBoolean(KEY_ALLOW_HOLD_CALL_DURING_EMERGENCY_BOOL, true)10112         sDefaults.putBoolean(KEY_ALLOW_HOLD_CALL_DURING_EMERGENCY_BOOL, true);
sDefaults.putBoolean(KEY_USE_RCS_PRESENCE_BOOL, false)10113         sDefaults.putBoolean(KEY_USE_RCS_PRESENCE_BOOL, false);
sDefaults.putBoolean(KEY_USE_RCS_SIP_OPTIONS_BOOL, false)10114         sDefaults.putBoolean(KEY_USE_RCS_SIP_OPTIONS_BOOL, false);
sDefaults.putBoolean(KEY_FORCE_IMEI_BOOL, false)10115         sDefaults.putBoolean(KEY_FORCE_IMEI_BOOL, false);
sDefaults.putInt( KEY_CDMA_ROAMING_MODE_INT, TelephonyManager.CDMA_ROAMING_MODE_RADIO_DEFAULT)10116         sDefaults.putInt(
10117                 KEY_CDMA_ROAMING_MODE_INT, TelephonyManager.CDMA_ROAMING_MODE_RADIO_DEFAULT);
sDefaults.putBoolean(KEY_SUPPORT_CDMA_1X_VOICE_CALLS_BOOL, true)10118         sDefaults.putBoolean(KEY_SUPPORT_CDMA_1X_VOICE_CALLS_BOOL, true);
sDefaults.putString(KEY_RCS_CONFIG_SERVER_URL_STRING, R)10119         sDefaults.putString(KEY_RCS_CONFIG_SERVER_URL_STRING, "");
10120 
10121         // Carrier Signalling Receivers
sDefaults.putString(KEY_CARRIER_SETUP_APP_STRING, R)10122         sDefaults.putString(KEY_CARRIER_SETUP_APP_STRING, "");
sDefaults.putStringArray(KEY_CARRIER_APP_WAKE_SIGNAL_CONFIG_STRING_ARRAY, new String[]{ R + R })10123         sDefaults.putStringArray(KEY_CARRIER_APP_WAKE_SIGNAL_CONFIG_STRING_ARRAY,
10124                 new String[]{
10125                         "com.android.carrierdefaultapp/.CarrierDefaultBroadcastReceiver:"
10126                                 + "com.android.internal.telephony.CARRIER_SIGNAL_RESET"
10127                 });
sDefaults.putStringArray(KEY_CARRIER_APP_NO_WAKE_SIGNAL_CONFIG_STRING_ARRAY, null)10128         sDefaults.putStringArray(KEY_CARRIER_APP_NO_WAKE_SIGNAL_CONFIG_STRING_ARRAY, null);
sDefaults.putBoolean(KEY_CARRIER_APP_REQUIRED_DURING_SIM_SETUP_BOOL, false)10129         sDefaults.putBoolean(KEY_CARRIER_APP_REQUIRED_DURING_SIM_SETUP_BOOL, false);
10130 
10131         // Default carrier app configurations
sDefaults.putStringArray(KEY_CARRIER_DEFAULT_ACTIONS_ON_REDIRECTION_STRING_ARRAY, new String[]{ R })10132         sDefaults.putStringArray(KEY_CARRIER_DEFAULT_ACTIONS_ON_REDIRECTION_STRING_ARRAY,
10133                 new String[]{
10134                         "9, 4, 1"
10135                         //9: CARRIER_ACTION_REGISTER_NETWORK_AVAIL
10136                         //4: CARRIER_ACTION_DISABLE_METERED_APNS
10137                         //1: CARRIER_ACTION_SHOW_PORTAL_NOTIFICATION
10138                 });
sDefaults.putStringArray(KEY_CARRIER_DEFAULT_ACTIONS_ON_RESET, new String[]{ R })10139         sDefaults.putStringArray(KEY_CARRIER_DEFAULT_ACTIONS_ON_RESET, new String[]{
10140                 "6, 8"
10141                 //6: CARRIER_ACTION_CANCEL_ALL_NOTIFICATIONS
10142                 //8: CARRIER_ACTION_DISABLE_DEFAULT_URL_HANDLER
10143                 });
sDefaults.putStringArray(KEY_CARRIER_DEFAULT_ACTIONS_ON_DEFAULT_NETWORK_AVAILABLE, new String[] { false + R, true + R })10144         sDefaults.putStringArray(KEY_CARRIER_DEFAULT_ACTIONS_ON_DEFAULT_NETWORK_AVAILABLE,
10145                 new String[] {
10146                         false + ": 7", //7: CARRIER_ACTION_ENABLE_DEFAULT_URL_HANDLER
10147                         true + ": 8"  //8: CARRIER_ACTION_DISABLE_DEFAULT_URL_HANDLER
10148                 });
sDefaults.putStringArray(KEY_CARRIER_DEFAULT_REDIRECTION_URL_STRING_ARRAY, null)10149         sDefaults.putStringArray(KEY_CARRIER_DEFAULT_REDIRECTION_URL_STRING_ARRAY, null);
10150 
sDefaults.putInt(KEY_MONTHLY_DATA_CYCLE_DAY_INT, DATA_CYCLE_USE_PLATFORM_DEFAULT)10151         sDefaults.putInt(KEY_MONTHLY_DATA_CYCLE_DAY_INT, DATA_CYCLE_USE_PLATFORM_DEFAULT);
sDefaults.putLong(KEY_DATA_WARNING_THRESHOLD_BYTES_LONG, DATA_CYCLE_USE_PLATFORM_DEFAULT)10152         sDefaults.putLong(KEY_DATA_WARNING_THRESHOLD_BYTES_LONG, DATA_CYCLE_USE_PLATFORM_DEFAULT);
sDefaults.putBoolean(KEY_DATA_WARNING_NOTIFICATION_BOOL, true)10153         sDefaults.putBoolean(KEY_DATA_WARNING_NOTIFICATION_BOOL, true);
sDefaults.putBoolean(KEY_LIMITED_SIM_FUNCTION_NOTIFICATION_FOR_DSDS_BOOL, false)10154         sDefaults.putBoolean(KEY_LIMITED_SIM_FUNCTION_NOTIFICATION_FOR_DSDS_BOOL, false);
sDefaults.putLong(KEY_DATA_LIMIT_THRESHOLD_BYTES_LONG, DATA_CYCLE_USE_PLATFORM_DEFAULT)10155         sDefaults.putLong(KEY_DATA_LIMIT_THRESHOLD_BYTES_LONG, DATA_CYCLE_USE_PLATFORM_DEFAULT);
sDefaults.putBoolean(KEY_DATA_LIMIT_NOTIFICATION_BOOL, true)10156         sDefaults.putBoolean(KEY_DATA_LIMIT_NOTIFICATION_BOOL, true);
sDefaults.putBoolean(KEY_DATA_RAPID_NOTIFICATION_BOOL, true)10157         sDefaults.putBoolean(KEY_DATA_RAPID_NOTIFICATION_BOOL, true);
10158 
10159         // Rat families: {GPRS, EDGE}, {EVDO, EVDO_A, EVDO_B}, {UMTS, HSPA, HSDPA, HSUPA, HSPAP},
10160         // {LTE, LTE_CA}
10161         // Order is important - lowest precedence first
sDefaults.putStringArray(KEY_RATCHET_RAT_FAMILIES, new String[]{R, R, R, R})10162         sDefaults.putStringArray(KEY_RATCHET_RAT_FAMILIES,
10163                 new String[]{"1,2", "7,8,12", "3,11,9,10,15", "14,19"});
sDefaults.putBoolean(KEY_TREAT_DOWNGRADED_VIDEO_CALLS_AS_VIDEO_CALLS_BOOL, false)10164         sDefaults.putBoolean(KEY_TREAT_DOWNGRADED_VIDEO_CALLS_AS_VIDEO_CALLS_BOOL, false);
sDefaults.putBoolean(KEY_DROP_VIDEO_CALL_WHEN_ANSWERING_AUDIO_CALL_BOOL, false)10165         sDefaults.putBoolean(KEY_DROP_VIDEO_CALL_WHEN_ANSWERING_AUDIO_CALL_BOOL, false);
sDefaults.putBoolean(KEY_ALLOW_MERGE_WIFI_CALLS_WHEN_VOWIFI_OFF_BOOL, true)10166         sDefaults.putBoolean(KEY_ALLOW_MERGE_WIFI_CALLS_WHEN_VOWIFI_OFF_BOOL, true);
sDefaults.putBoolean(KEY_ALLOW_ADD_CALL_DURING_VIDEO_CALL_BOOL, true)10167         sDefaults.putBoolean(KEY_ALLOW_ADD_CALL_DURING_VIDEO_CALL_BOOL, true);
sDefaults.putBoolean(KEY_ALLOW_HOLD_VIDEO_CALL_BOOL, true)10168         sDefaults.putBoolean(KEY_ALLOW_HOLD_VIDEO_CALL_BOOL, true);
sDefaults.putBoolean(KEY_WIFI_CALLS_CAN_BE_HD_AUDIO, true)10169         sDefaults.putBoolean(KEY_WIFI_CALLS_CAN_BE_HD_AUDIO, true);
sDefaults.putBoolean(KEY_VIDEO_CALLS_CAN_BE_HD_AUDIO, true)10170         sDefaults.putBoolean(KEY_VIDEO_CALLS_CAN_BE_HD_AUDIO, true);
sDefaults.putBoolean(KEY_GSM_CDMA_CALLS_CAN_BE_HD_AUDIO, false)10171         sDefaults.putBoolean(KEY_GSM_CDMA_CALLS_CAN_BE_HD_AUDIO, false);
sDefaults.putBoolean(KEY_ALLOW_VIDEO_CALLING_FALLBACK_BOOL, true)10172         sDefaults.putBoolean(KEY_ALLOW_VIDEO_CALLING_FALLBACK_BOOL, true);
10173 
sDefaults.putStringArray(KEY_IMS_REASONINFO_MAPPING_STRING_ARRAY, null)10174         sDefaults.putStringArray(KEY_IMS_REASONINFO_MAPPING_STRING_ARRAY, null);
sDefaults.putBoolean(KEY_ENHANCED_4G_LTE_TITLE_VARIANT_BOOL, false)10175         sDefaults.putBoolean(KEY_ENHANCED_4G_LTE_TITLE_VARIANT_BOOL, false);
sDefaults.putInt(KEY_ENHANCED_4G_LTE_TITLE_VARIANT_INT, 0)10176         sDefaults.putInt(KEY_ENHANCED_4G_LTE_TITLE_VARIANT_INT, 0);
sDefaults.putBoolean(KEY_NOTIFY_VT_HANDOVER_TO_WIFI_FAILURE_BOOL, false)10177         sDefaults.putBoolean(KEY_NOTIFY_VT_HANDOVER_TO_WIFI_FAILURE_BOOL, false);
sDefaults.putStringArray(KEY_FILTERED_CNAP_NAMES_STRING_ARRAY, null)10178         sDefaults.putStringArray(KEY_FILTERED_CNAP_NAMES_STRING_ARRAY, null);
sDefaults.putBoolean(KEY_EDITABLE_WFC_ROAMING_MODE_BOOL, false)10179         sDefaults.putBoolean(KEY_EDITABLE_WFC_ROAMING_MODE_BOOL, false);
sDefaults.putBoolean(KEY_SHOW_BLOCKING_PAY_PHONE_OPTION_BOOL, false)10180         sDefaults.putBoolean(KEY_SHOW_BLOCKING_PAY_PHONE_OPTION_BOOL, false);
sDefaults.putBoolean(KEY_USE_WFC_HOME_NETWORK_MODE_IN_ROAMING_NETWORK_BOOL, false)10181         sDefaults.putBoolean(KEY_USE_WFC_HOME_NETWORK_MODE_IN_ROAMING_NETWORK_BOOL, false);
sDefaults.putBoolean(KEY_STK_DISABLE_LAUNCH_BROWSER_BOOL, false)10182         sDefaults.putBoolean(KEY_STK_DISABLE_LAUNCH_BROWSER_BOOL, false);
sDefaults.putBoolean(KEY_ALLOW_METERED_NETWORK_FOR_CERT_DOWNLOAD_BOOL, false)10183         sDefaults.putBoolean(KEY_ALLOW_METERED_NETWORK_FOR_CERT_DOWNLOAD_BOOL, false);
sDefaults.putBoolean(KEY_HIDE_DIGITS_HELPER_TEXT_ON_STK_INPUT_SCREEN_BOOL, true)10184         sDefaults.putBoolean(KEY_HIDE_DIGITS_HELPER_TEXT_ON_STK_INPUT_SCREEN_BOOL, true);
sDefaults.putInt(KEY_PREF_NETWORK_NOTIFICATION_DELAY_INT, -1)10185         sDefaults.putInt(KEY_PREF_NETWORK_NOTIFICATION_DELAY_INT, -1);
sDefaults.putInt(KEY_EMERGENCY_NOTIFICATION_DELAY_INT, -1)10186         sDefaults.putInt(KEY_EMERGENCY_NOTIFICATION_DELAY_INT, -1);
sDefaults.putBoolean(KEY_ALLOW_USSD_REQUESTS_VIA_TELEPHONY_MANAGER_BOOL, true)10187         sDefaults.putBoolean(KEY_ALLOW_USSD_REQUESTS_VIA_TELEPHONY_MANAGER_BOOL, true);
sDefaults.putBoolean(KEY_SUPPORT_3GPP_CALL_FORWARDING_WHILE_ROAMING_BOOL, true)10188         sDefaults.putBoolean(KEY_SUPPORT_3GPP_CALL_FORWARDING_WHILE_ROAMING_BOOL, true);
sDefaults.putBoolean(KEY_DISPLAY_VOICEMAIL_NUMBER_AS_DEFAULT_CALL_FORWARDING_NUMBER_BOOL, false)10189         sDefaults.putBoolean(KEY_DISPLAY_VOICEMAIL_NUMBER_AS_DEFAULT_CALL_FORWARDING_NUMBER_BOOL,
10190                 false);
sDefaults.putBoolean(KEY_NOTIFY_INTERNATIONAL_CALL_ON_WFC_BOOL, false)10191         sDefaults.putBoolean(KEY_NOTIFY_INTERNATIONAL_CALL_ON_WFC_BOOL, false);
sDefaults.putBoolean(KEY_HIDE_PRESET_APN_DETAILS_BOOL, false)10192         sDefaults.putBoolean(KEY_HIDE_PRESET_APN_DETAILS_BOOL, false);
sDefaults.putBoolean(KEY_SHOW_VIDEO_CALL_CHARGES_ALERT_DIALOG_BOOL, false)10193         sDefaults.putBoolean(KEY_SHOW_VIDEO_CALL_CHARGES_ALERT_DIALOG_BOOL, false);
sDefaults.putStringArray(KEY_CALL_FORWARDING_BLOCKS_WHILE_ROAMING_STRING_ARRAY, null)10194         sDefaults.putStringArray(KEY_CALL_FORWARDING_BLOCKS_WHILE_ROAMING_STRING_ARRAY, null);
sDefaults.putBoolean(KEY_SUPPORT_IMS_CALL_FORWARDING_WHILE_ROAMING_BOOL, true)10195         sDefaults.putBoolean(KEY_SUPPORT_IMS_CALL_FORWARDING_WHILE_ROAMING_BOOL, true);
sDefaults.putInt(KEY_LTE_EARFCNS_RSRP_BOOST_INT, 0)10196         sDefaults.putInt(KEY_LTE_EARFCNS_RSRP_BOOST_INT, 0);
sDefaults.putStringArray(KEY_BOOSTED_LTE_EARFCNS_STRING_ARRAY, null)10197         sDefaults.putStringArray(KEY_BOOSTED_LTE_EARFCNS_STRING_ARRAY, null);
sDefaults.putIntArray(KEY_NRARFCNS_RSRP_BOOST_INT_ARRAY, null)10198         sDefaults.putIntArray(KEY_NRARFCNS_RSRP_BOOST_INT_ARRAY, null);
sDefaults.putStringArray(KEY_BOOSTED_NRARFCNS_STRING_ARRAY, null)10199         sDefaults.putStringArray(KEY_BOOSTED_NRARFCNS_STRING_ARRAY, null);
sDefaults.putBoolean(KEY_USE_ONLY_RSRP_FOR_LTE_SIGNAL_BAR_BOOL, false)10200         sDefaults.putBoolean(KEY_USE_ONLY_RSRP_FOR_LTE_SIGNAL_BAR_BOOL, false);
sDefaults.putBoolean(KEY_DISABLE_VOICE_BARRING_NOTIFICATION_BOOL, false)10201         sDefaults.putBoolean(KEY_DISABLE_VOICE_BARRING_NOTIFICATION_BOOL, false);
sDefaults.putInt(IMSI_KEY_AVAILABILITY_INT, 0)10202         sDefaults.putInt(IMSI_KEY_AVAILABILITY_INT, 0);
sDefaults.putString(IMSI_KEY_DOWNLOAD_URL_STRING, null)10203         sDefaults.putString(IMSI_KEY_DOWNLOAD_URL_STRING, null);
sDefaults.putString(IMSI_CARRIER_PUBLIC_KEY_EPDG_STRING, null)10204         sDefaults.putString(IMSI_CARRIER_PUBLIC_KEY_EPDG_STRING, null);
sDefaults.putString(IMSI_CARRIER_PUBLIC_KEY_WLAN_STRING, null)10205         sDefaults.putString(IMSI_CARRIER_PUBLIC_KEY_WLAN_STRING, null);
sDefaults.putBoolean(KEY_CONVERT_CDMA_CALLER_ID_MMI_CODES_WHILE_ROAMING_ON_3GPP_BOOL, false)10206         sDefaults.putBoolean(KEY_CONVERT_CDMA_CALLER_ID_MMI_CODES_WHILE_ROAMING_ON_3GPP_BOOL,
10207                 false);
sDefaults.putStringArray(KEY_NON_ROAMING_OPERATOR_STRING_ARRAY, null)10208         sDefaults.putStringArray(KEY_NON_ROAMING_OPERATOR_STRING_ARRAY, null);
sDefaults.putStringArray(KEY_ROAMING_OPERATOR_STRING_ARRAY, null)10209         sDefaults.putStringArray(KEY_ROAMING_OPERATOR_STRING_ARRAY, null);
sDefaults.putBoolean(KEY_SHOW_ROAMING_INDICATOR_BOOL, true)10210         sDefaults.putBoolean(KEY_SHOW_ROAMING_INDICATOR_BOOL, true);
sDefaults.putBoolean(KEY_SHOW_IMS_REGISTRATION_STATUS_BOOL, false)10211         sDefaults.putBoolean(KEY_SHOW_IMS_REGISTRATION_STATUS_BOOL, false);
sDefaults.putBoolean(KEY_RTT_SUPPORTED_BOOL, false)10212         sDefaults.putBoolean(KEY_RTT_SUPPORTED_BOOL, false);
sDefaults.putBoolean(KEY_TTY_SUPPORTED_BOOL, true)10213         sDefaults.putBoolean(KEY_TTY_SUPPORTED_BOOL, true);
sDefaults.putBoolean(KEY_HIDE_TTY_HCO_VCO_WITH_RTT_BOOL, false)10214         sDefaults.putBoolean(KEY_HIDE_TTY_HCO_VCO_WITH_RTT_BOOL, false);
sDefaults.putBoolean(KEY_RTT_SUPPORTED_WHILE_ROAMING_BOOL, false)10215         sDefaults.putBoolean(KEY_RTT_SUPPORTED_WHILE_ROAMING_BOOL, false);
sDefaults.putBoolean(KEY_RTT_UPGRADE_SUPPORTED_FOR_DOWNGRADED_VT_CALL_BOOL, true)10216         sDefaults.putBoolean(KEY_RTT_UPGRADE_SUPPORTED_FOR_DOWNGRADED_VT_CALL_BOOL, true);
sDefaults.putBoolean(KEY_VT_UPGRADE_SUPPORTED_FOR_DOWNGRADED_RTT_CALL_BOOL, true)10217         sDefaults.putBoolean(KEY_VT_UPGRADE_SUPPORTED_FOR_DOWNGRADED_RTT_CALL_BOOL, true);
sDefaults.putBoolean(KEY_DISABLE_CHARGE_INDICATION_BOOL, false)10218         sDefaults.putBoolean(KEY_DISABLE_CHARGE_INDICATION_BOOL, false);
sDefaults.putBoolean(KEY_SUPPORT_NO_REPLY_TIMER_FOR_CFNRY_BOOL, true)10219         sDefaults.putBoolean(KEY_SUPPORT_NO_REPLY_TIMER_FOR_CFNRY_BOOL, true);
sDefaults.putStringArray(KEY_FEATURE_ACCESS_CODES_STRING_ARRAY, null)10220         sDefaults.putStringArray(KEY_FEATURE_ACCESS_CODES_STRING_ARRAY, null);
sDefaults.putBoolean(KEY_IDENTIFY_HIGH_DEFINITION_CALLS_IN_CALL_LOG_BOOL, false)10221         sDefaults.putBoolean(KEY_IDENTIFY_HIGH_DEFINITION_CALLS_IN_CALL_LOG_BOOL, false);
sDefaults.putBoolean(KEY_SHOW_PRECISE_FAILED_CAUSE_BOOL, false)10222         sDefaults.putBoolean(KEY_SHOW_PRECISE_FAILED_CAUSE_BOOL, false);
sDefaults.putBoolean(KEY_SPN_DISPLAY_RULE_USE_ROAMING_FROM_SERVICE_STATE_BOOL, false)10223         sDefaults.putBoolean(KEY_SPN_DISPLAY_RULE_USE_ROAMING_FROM_SERVICE_STATE_BOOL, false);
sDefaults.putBoolean(KEY_ALWAYS_SHOW_DATA_RAT_ICON_BOOL, false)10224         sDefaults.putBoolean(KEY_ALWAYS_SHOW_DATA_RAT_ICON_BOOL, false);
sDefaults.putBoolean(KEY_SHOW_4G_FOR_LTE_DATA_ICON_BOOL, false)10225         sDefaults.putBoolean(KEY_SHOW_4G_FOR_LTE_DATA_ICON_BOOL, false);
sDefaults.putBoolean(KEY_SHOW_4GLTE_FOR_LTE_DATA_ICON_BOOL, false)10226         sDefaults.putBoolean(KEY_SHOW_4GLTE_FOR_LTE_DATA_ICON_BOOL, false);
sDefaults.putBoolean(KEY_SHOW_4G_FOR_3G_DATA_ICON_BOOL, false)10227         sDefaults.putBoolean(KEY_SHOW_4G_FOR_3G_DATA_ICON_BOOL, false);
sDefaults.putString(KEY_OPERATOR_NAME_FILTER_PATTERN_STRING, R)10228         sDefaults.putString(KEY_OPERATOR_NAME_FILTER_PATTERN_STRING, "");
sDefaults.putString(KEY_SHOW_CARRIER_DATA_ICON_PATTERN_STRING, R)10229         sDefaults.putString(KEY_SHOW_CARRIER_DATA_ICON_PATTERN_STRING, "");
sDefaults.putBoolean(KEY_HIDE_LTE_PLUS_DATA_ICON_BOOL, true)10230         sDefaults.putBoolean(KEY_HIDE_LTE_PLUS_DATA_ICON_BOOL, true);
sDefaults.putBoolean(KEY_SHOW_5G_SLICE_ICON_BOOL, true)10231         sDefaults.putBoolean(KEY_SHOW_5G_SLICE_ICON_BOOL, true);
sDefaults.putInt(KEY_LTE_PLUS_THRESHOLD_BANDWIDTH_KHZ_INT, 20000)10232         sDefaults.putInt(KEY_LTE_PLUS_THRESHOLD_BANDWIDTH_KHZ_INT, 20000);
sDefaults.putInt(KEY_NR_ADVANCED_THRESHOLD_BANDWIDTH_KHZ_INT, 0)10233         sDefaults.putInt(KEY_NR_ADVANCED_THRESHOLD_BANDWIDTH_KHZ_INT, 0);
sDefaults.putBoolean(KEY_INCLUDE_LTE_FOR_NR_ADVANCED_THRESHOLD_BANDWIDTH_BOOL, false)10234         sDefaults.putBoolean(KEY_INCLUDE_LTE_FOR_NR_ADVANCED_THRESHOLD_BANDWIDTH_BOOL, false);
sDefaults.putBoolean(KEY_RATCHET_NR_ADVANCED_BANDWIDTH_IF_RRC_IDLE_BOOL, false)10235         sDefaults.putBoolean(KEY_RATCHET_NR_ADVANCED_BANDWIDTH_IF_RRC_IDLE_BOOL, false);
sDefaults.putIntArray(KEY_CARRIER_NR_AVAILABILITIES_INT_ARRAY, new int[]{CARRIER_NR_AVAILABILITY_NSA, CARRIER_NR_AVAILABILITY_SA})10236         sDefaults.putIntArray(KEY_CARRIER_NR_AVAILABILITIES_INT_ARRAY,
10237                 new int[]{CARRIER_NR_AVAILABILITY_NSA, CARRIER_NR_AVAILABILITY_SA});
sDefaults.putBoolean(KEY_LTE_ENABLED_BOOL, true)10238         sDefaults.putBoolean(KEY_LTE_ENABLED_BOOL, true);
sDefaults.putBoolean(KEY_SUPPORT_TDSCDMA_BOOL, false)10239         sDefaults.putBoolean(KEY_SUPPORT_TDSCDMA_BOOL, false);
sDefaults.putStringArray(KEY_SUPPORT_TDSCDMA_ROAMING_NETWORKS_STRING_ARRAY, null)10240         sDefaults.putStringArray(KEY_SUPPORT_TDSCDMA_ROAMING_NETWORKS_STRING_ARRAY, null);
sDefaults.putBoolean(KEY_WORLD_MODE_ENABLED_BOOL, false)10241         sDefaults.putBoolean(KEY_WORLD_MODE_ENABLED_BOOL, false);
sDefaults.putString(KEY_CARRIER_SETTINGS_ACTIVITY_COMPONENT_NAME_STRING, R)10242         sDefaults.putString(KEY_CARRIER_SETTINGS_ACTIVITY_COMPONENT_NAME_STRING, "");
sDefaults.putBoolean(KEY_SHOW_OPERATOR_NAME_IN_STATUSBAR_BOOL, false)10243         sDefaults.putBoolean(KEY_SHOW_OPERATOR_NAME_IN_STATUSBAR_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_CONFIG_APPLIED_BOOL, false)10244         sDefaults.putBoolean(KEY_CARRIER_CONFIG_APPLIED_BOOL, false);
sDefaults.putBoolean(KEY_CHECK_PRICING_WITH_CARRIER_FOR_DATA_ROAMING_BOOL, false)10245         sDefaults.putBoolean(KEY_CHECK_PRICING_WITH_CARRIER_FOR_DATA_ROAMING_BOOL, false);
sDefaults.putBoolean(KEY_SHOW_DATA_CONNECTED_ROAMING_NOTIFICATION_BOOL, false)10246         sDefaults.putBoolean(KEY_SHOW_DATA_CONNECTED_ROAMING_NOTIFICATION_BOOL, false);
sDefaults.putStringArray(KEY_DATA_CONNECTED_ROAMING_NOTIFICATION_EXCLUDED_MCCS_STRING_ARRAY, new String[0])10247         sDefaults.putStringArray(KEY_DATA_CONNECTED_ROAMING_NOTIFICATION_EXCLUDED_MCCS_STRING_ARRAY,
10248                 new String[0]);
sDefaults.putStringArray( KEY_DATA_CONNECTED_ROAMING_NOTIFICATION_INCLUDED_MCC_MNCS_STRING_ARRAY, new String[0])10249         sDefaults.putStringArray(
10250                 KEY_DATA_CONNECTED_ROAMING_NOTIFICATION_INCLUDED_MCC_MNCS_STRING_ARRAY,
10251                 new String[0]);
sDefaults.putIntArray(KEY_LTE_RSRP_THRESHOLDS_INT_ARRAY, new int[] { -128, -118, -108, -98, })10252         sDefaults.putIntArray(KEY_LTE_RSRP_THRESHOLDS_INT_ARRAY,
10253                 // Boundaries: [-140 dBm, -44 dBm]
10254                 new int[] {
10255                         -128, /* SIGNAL_STRENGTH_POOR */
10256                         -118, /* SIGNAL_STRENGTH_MODERATE */
10257                         -108, /* SIGNAL_STRENGTH_GOOD */
10258                         -98,  /* SIGNAL_STRENGTH_GREAT */
10259                 });
sDefaults.putIntArray(KEY_LTE_RSRQ_THRESHOLDS_INT_ARRAY, new int[] { -20, -17, -14, -11 })10260         sDefaults.putIntArray(KEY_LTE_RSRQ_THRESHOLDS_INT_ARRAY,
10261                 // Boundaries: [-34 dB, 3 dB]
10262                 new int[] {
10263                         -20, /* SIGNAL_STRENGTH_POOR */
10264                         -17, /* SIGNAL_STRENGTH_MODERATE */
10265                         -14, /* SIGNAL_STRENGTH_GOOD */
10266                         -11  /* SIGNAL_STRENGTH_GREAT */
10267                 });
sDefaults.putIntArray(KEY_LTE_RSSNR_THRESHOLDS_INT_ARRAY, new int[] { -3, 1, 5, 13 })10268         sDefaults.putIntArray(KEY_LTE_RSSNR_THRESHOLDS_INT_ARRAY,
10269                 // Boundaries: [-20 dBm, 30 dBm]
10270                 new int[] {
10271                         -3, /* SIGNAL_STRENGTH_POOR */
10272                         1,  /* SIGNAL_STRENGTH_MODERATE */
10273                         5,  /* SIGNAL_STRENGTH_GOOD */
10274                         13  /* SIGNAL_STRENGTH_GREAT */
10275                 });
sDefaults.putIntArray(KEY_WCDMA_RSCP_THRESHOLDS_INT_ARRAY, new int[] { -115, -105, -95, -85 })10276         sDefaults.putIntArray(KEY_WCDMA_RSCP_THRESHOLDS_INT_ARRAY,
10277                 // Boundaries: [-120 dBm, -25 dBm]
10278                 new int[] {
10279                         -115, /* SIGNAL_STRENGTH_POOR */
10280                         -105, /* SIGNAL_STRENGTH_MODERATE */
10281                         -95,  /* SIGNAL_STRENGTH_GOOD */
10282                         -85   /* SIGNAL_STRENGTH_GREAT */
10283                 });
10284         // TODO(b/249896055): On enabling ECNO measurement part for Signal Bar level indication
10285         // system functionality, below values to be rechecked.
sDefaults.putIntArray(KEY_WCDMA_ECNO_THRESHOLDS_INT_ARRAY, new int[] { -24, -14, -6, 1 })10286         sDefaults.putIntArray(KEY_WCDMA_ECNO_THRESHOLDS_INT_ARRAY,
10287                 // Boundaries: [-24 dBm, 1 dBm]
10288                 new int[] {
10289                         -24, /* SIGNAL_STRENGTH_POOR */
10290                         -14, /* SIGNAL_STRENGTH_MODERATE */
10291                         -6,  /* SIGNAL_STRENGTH_GOOD */
10292                         1    /* SIGNAL_STRENGTH_GREAT */
10293                 });
sDefaults.putIntArray(KEY_5G_NR_SSRSRP_THRESHOLDS_INT_ARRAY, new int[] { -110, -90, -80, -65, })10294         sDefaults.putIntArray(KEY_5G_NR_SSRSRP_THRESHOLDS_INT_ARRAY,
10295                 // Boundaries: [-140 dB, -44 dB]
10296                 new int[] {
10297                     -110, /* SIGNAL_STRENGTH_POOR */
10298                     -90,  /* SIGNAL_STRENGTH_MODERATE */
10299                     -80,  /* SIGNAL_STRENGTH_GOOD */
10300                     -65,  /* SIGNAL_STRENGTH_GREAT */
10301                 });
sDefaults.putIntArray(KEY_5G_NR_SSRSRQ_THRESHOLDS_INT_ARRAY, new int[] { -31, -19, -7, 6 })10302         sDefaults.putIntArray(KEY_5G_NR_SSRSRQ_THRESHOLDS_INT_ARRAY,
10303                 // Boundaries: [-43 dB, 20 dB]
10304                 new int[] {
10305                     -31, /* SIGNAL_STRENGTH_POOR */
10306                     -19, /* SIGNAL_STRENGTH_MODERATE */
10307                     -7,  /* SIGNAL_STRENGTH_GOOD */
10308                     6    /* SIGNAL_STRENGTH_GREAT */
10309                 });
sDefaults.putIntArray(KEY_5G_NR_SSSINR_THRESHOLDS_INT_ARRAY, new int[] { -5, 5, 15, 30 })10310         sDefaults.putIntArray(KEY_5G_NR_SSSINR_THRESHOLDS_INT_ARRAY,
10311                 // Boundaries: [-23 dB, 40 dB]
10312                 new int[] {
10313                     -5, /* SIGNAL_STRENGTH_POOR */
10314                     5,  /* SIGNAL_STRENGTH_MODERATE */
10315                     15, /* SIGNAL_STRENGTH_GOOD */
10316                     30  /* SIGNAL_STRENGTH_GREAT */
10317                 });
sDefaults.putInt(KEY_GERAN_RSSI_HYSTERESIS_DB_INT, 2)10318         sDefaults.putInt(KEY_GERAN_RSSI_HYSTERESIS_DB_INT, 2);
sDefaults.putInt(KEY_UTRAN_RSCP_HYSTERESIS_DB_INT, 2)10319         sDefaults.putInt(KEY_UTRAN_RSCP_HYSTERESIS_DB_INT, 2);
sDefaults.putInt(KEY_EUTRAN_RSRP_HYSTERESIS_DB_INT, 2)10320         sDefaults.putInt(KEY_EUTRAN_RSRP_HYSTERESIS_DB_INT, 2);
sDefaults.putInt(KEY_EUTRAN_RSRQ_HYSTERESIS_DB_INT, 2)10321         sDefaults.putInt(KEY_EUTRAN_RSRQ_HYSTERESIS_DB_INT, 2);
sDefaults.putInt(KEY_EUTRAN_RSSNR_HYSTERESIS_DB_INT, 2)10322         sDefaults.putInt(KEY_EUTRAN_RSSNR_HYSTERESIS_DB_INT, 2);
sDefaults.putInt(KEY_NGRAN_SSRSRP_HYSTERESIS_DB_INT, 2)10323         sDefaults.putInt(KEY_NGRAN_SSRSRP_HYSTERESIS_DB_INT, 2);
sDefaults.putInt(KEY_NGRAN_SSRSRQ_HYSTERESIS_DB_INT, 2)10324         sDefaults.putInt(KEY_NGRAN_SSRSRQ_HYSTERESIS_DB_INT, 2);
sDefaults.putInt(KEY_NGRAN_SSSINR_HYSTERESIS_DB_INT, 2)10325         sDefaults.putInt(KEY_NGRAN_SSSINR_HYSTERESIS_DB_INT, 2);
sDefaults.putInt(KEY_UTRAN_ECNO_HYSTERESIS_DB_INT, 2)10326         sDefaults.putInt(KEY_UTRAN_ECNO_HYSTERESIS_DB_INT, 2);
sDefaults.putInt(KEY_PARAMETERS_USE_FOR_5G_NR_SIGNAL_BAR_INT, CellSignalStrengthNr.USE_SSRSRP)10327         sDefaults.putInt(KEY_PARAMETERS_USE_FOR_5G_NR_SIGNAL_BAR_INT,
10328                 CellSignalStrengthNr.USE_SSRSRP);
sDefaults.putBoolean(KEY_SIGNAL_STRENGTH_NR_NSA_USE_LTE_AS_PRIMARY_BOOL, true)10329         sDefaults.putBoolean(KEY_SIGNAL_STRENGTH_NR_NSA_USE_LTE_AS_PRIMARY_BOOL, true);
sDefaults.putStringArray(KEY_BANDWIDTH_STRING_ARRAY, new String[]{ R, R, R, R, R, R, R, R, R, R, R, R, R, R, R, R, R, R, R, R, R, R})10330         sDefaults.putStringArray(KEY_BANDWIDTH_STRING_ARRAY, new String[]{
10331                 "GPRS:24,24", "EDGE:70,18", "UMTS:115,115", "CDMA:14,14",
10332                 "1xRTT:30,30", "EvDo_0:750,48", "EvDo_A:950,550", "HSDPA:4300,620",
10333                 "HSUPA:4300,1800", "HSPA:4300,1800", "EvDo_B:1500,550", "eHRPD:750,48",
10334                 "iDEN:14,14", "LTE:30000,15000", "HSPA+:13000,3400", "GSM:24,24",
10335                 "TD_SCDMA:115,115", "LTE_CA:30000,15000", "NR_NSA:47000,18000",
10336                 "NR_NSA_MMWAVE:145000,60000", "NR_SA:145000,60000", "NR_SA_MMWAVE:145000,60000"});
sDefaults.putBoolean(KEY_BANDWIDTH_NR_NSA_USE_LTE_VALUE_FOR_UPLINK_BOOL, false)10337         sDefaults.putBoolean(KEY_BANDWIDTH_NR_NSA_USE_LTE_VALUE_FOR_UPLINK_BOOL, false);
sDefaults.putString(KEY_WCDMA_DEFAULT_SIGNAL_STRENGTH_MEASUREMENT_STRING, R)10338         sDefaults.putString(KEY_WCDMA_DEFAULT_SIGNAL_STRENGTH_MEASUREMENT_STRING, "rssi");
sDefaults.putBoolean(KEY_CONFIG_SHOW_ORIG_DIAL_STRING_FOR_CDMA_BOOL, false)10339         sDefaults.putBoolean(KEY_CONFIG_SHOW_ORIG_DIAL_STRING_FOR_CDMA_BOOL, false);
sDefaults.putBoolean(KEY_SHOW_CALL_BLOCKING_DISABLED_NOTIFICATION_ALWAYS_BOOL, false)10340         sDefaults.putBoolean(KEY_SHOW_CALL_BLOCKING_DISABLED_NOTIFICATION_ALWAYS_BOOL, false);
sDefaults.putBoolean(KEY_CALL_FORWARDING_OVER_UT_WARNING_BOOL, false)10341         sDefaults.putBoolean(KEY_CALL_FORWARDING_OVER_UT_WARNING_BOOL, false);
sDefaults.putBoolean(KEY_CALL_BARRING_OVER_UT_WARNING_BOOL, false)10342         sDefaults.putBoolean(KEY_CALL_BARRING_OVER_UT_WARNING_BOOL, false);
sDefaults.putBoolean(KEY_CALLER_ID_OVER_UT_WARNING_BOOL, false)10343         sDefaults.putBoolean(KEY_CALLER_ID_OVER_UT_WARNING_BOOL, false);
sDefaults.putBoolean(KEY_CALL_WAITING_OVER_UT_WARNING_BOOL, false)10344         sDefaults.putBoolean(KEY_CALL_WAITING_OVER_UT_WARNING_BOOL, false);
sDefaults.putBoolean(KEY_SUPPORT_CLIR_NETWORK_DEFAULT_BOOL, true)10345         sDefaults.putBoolean(KEY_SUPPORT_CLIR_NETWORK_DEFAULT_BOOL, true);
sDefaults.putBoolean(KEY_SUPPORT_EMERGENCY_DIALER_SHORTCUT_BOOL, true)10346         sDefaults.putBoolean(KEY_SUPPORT_EMERGENCY_DIALER_SHORTCUT_BOOL, true);
sDefaults.putBoolean(KEY_USE_CALL_FORWARDING_USSD_BOOL, false)10347         sDefaults.putBoolean(KEY_USE_CALL_FORWARDING_USSD_BOOL, false);
sDefaults.putBoolean(KEY_USE_CALLER_ID_USSD_BOOL, false)10348         sDefaults.putBoolean(KEY_USE_CALLER_ID_USSD_BOOL, false);
sDefaults.putBoolean(KEY_USE_CALL_WAITING_USSD_BOOL, false)10349         sDefaults.putBoolean(KEY_USE_CALL_WAITING_USSD_BOOL, false);
sDefaults.putInt(KEY_CALL_WAITING_SERVICE_CLASS_INT, 1 )10350         sDefaults.putInt(KEY_CALL_WAITING_SERVICE_CLASS_INT, 1 /* SERVICE_CLASS_VOICE */);
sDefaults.putString(KEY_5G_ICON_CONFIGURATION_STRING, R + R)10351         sDefaults.putString(KEY_5G_ICON_CONFIGURATION_STRING,
10352                 "connected_mmwave:5G,connected:5G,not_restricted_rrc_idle:5G,"
10353                         + "not_restricted_rrc_con:5G");
sDefaults.putString(KEY_5G_ICON_DISPLAY_GRACE_PERIOD_STRING, R)10354         sDefaults.putString(KEY_5G_ICON_DISPLAY_GRACE_PERIOD_STRING, "");
sDefaults.putString(KEY_5G_ICON_DISPLAY_SECONDARY_GRACE_PERIOD_STRING, R)10355         sDefaults.putString(KEY_5G_ICON_DISPLAY_SECONDARY_GRACE_PERIOD_STRING, "");
sDefaults.putBoolean(KEY_NR_TIMERS_RESET_IF_NON_ENDC_AND_RRC_IDLE_BOOL, false)10356         sDefaults.putBoolean(KEY_NR_TIMERS_RESET_IF_NON_ENDC_AND_RRC_IDLE_BOOL, false);
10357         /* Default value is 1 hour. */
sDefaults.putLong(KEY_5G_WATCHDOG_TIME_MS_LONG, 3600000)10358         sDefaults.putLong(KEY_5G_WATCHDOG_TIME_MS_LONG, 3600000);
sDefaults.putIntArray(KEY_ADDITIONAL_NR_ADVANCED_BANDS_INT_ARRAY, new int[0])10359         sDefaults.putIntArray(KEY_ADDITIONAL_NR_ADVANCED_BANDS_INT_ARRAY, new int[0]);
sDefaults.putInt(KEY_NR_ADVANCED_CAPABLE_PCO_ID_INT, 0)10360         sDefaults.putInt(KEY_NR_ADVANCED_CAPABLE_PCO_ID_INT, 0);
sDefaults.putBoolean(KEY_ENABLE_NR_ADVANCED_WHILE_ROAMING_BOOL, true)10361         sDefaults.putBoolean(KEY_ENABLE_NR_ADVANCED_WHILE_ROAMING_BOOL, true);
sDefaults.putBoolean(KEY_LTE_ENDC_USING_USER_DATA_FOR_RRC_DETECTION_BOOL, false)10362         sDefaults.putBoolean(KEY_LTE_ENDC_USING_USER_DATA_FOR_RRC_DETECTION_BOOL, false);
sDefaults.putStringArray(KEY_UNMETERED_NETWORK_TYPES_STRING_ARRAY, new String[] { R, R, R, R})10363         sDefaults.putStringArray(KEY_UNMETERED_NETWORK_TYPES_STRING_ARRAY, new String[] {
10364                 "NR_NSA", "NR_NSA_MMWAVE", "NR_SA", "NR_SA_MMWAVE"});
sDefaults.putStringArray(KEY_ROAMING_UNMETERED_NETWORK_TYPES_STRING_ARRAY, new String[0])10365         sDefaults.putStringArray(KEY_ROAMING_UNMETERED_NETWORK_TYPES_STRING_ARRAY, new String[0]);
sDefaults.putBoolean(KEY_ASCII_7_BIT_SUPPORT_FOR_LONG_MESSAGE_BOOL, false)10366         sDefaults.putBoolean(KEY_ASCII_7_BIT_SUPPORT_FOR_LONG_MESSAGE_BOOL, false);
sDefaults.putBoolean(KEY_SHOW_WIFI_CALLING_ICON_IN_STATUS_BAR_BOOL, false)10367         sDefaults.putBoolean(KEY_SHOW_WIFI_CALLING_ICON_IN_STATUS_BAR_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_SUPPORTS_OPP_DATA_AUTO_PROVISIONING_BOOL, false)10368         sDefaults.putBoolean(KEY_CARRIER_SUPPORTS_OPP_DATA_AUTO_PROVISIONING_BOOL, false);
sDefaults.putString(KEY_SMDP_SERVER_ADDRESS_STRING, R)10369         sDefaults.putString(KEY_SMDP_SERVER_ADDRESS_STRING, "");
sDefaults.putInt(KEY_ESIM_MAX_DOWNLOAD_RETRY_ATTEMPTS_INT, 5)10370         sDefaults.putInt(KEY_ESIM_MAX_DOWNLOAD_RETRY_ATTEMPTS_INT, 5);
sDefaults.putInt(KEY_ESIM_DOWNLOAD_RETRY_BACKOFF_TIMER_SEC_INT, 60)10371         sDefaults.putInt(KEY_ESIM_DOWNLOAD_RETRY_BACKOFF_TIMER_SEC_INT, 60);
sDefaults.putIntArray(KEY_OPPORTUNISTIC_CARRIER_IDS_INT_ARRAY, new int[] {0})10372         sDefaults.putIntArray(KEY_OPPORTUNISTIC_CARRIER_IDS_INT_ARRAY, new int[] {0});
sDefaults.putBoolean(KEY_OPPORTUNISTIC_ESIM_DOWNLOAD_VIA_WIFI_ONLY_BOOL, false)10373         sDefaults.putBoolean(KEY_OPPORTUNISTIC_ESIM_DOWNLOAD_VIA_WIFI_ONLY_BOOL, false);
10374         /* Default value is minimum RSRP level needed for SIGNAL_STRENGTH_GOOD */
sDefaults.putInt(KEY_OPPORTUNISTIC_NETWORK_ENTRY_THRESHOLD_RSRP_INT, -108)10375         sDefaults.putInt(KEY_OPPORTUNISTIC_NETWORK_ENTRY_THRESHOLD_RSRP_INT, -108);
10376         /* Default value is minimum RSRP level needed for SIGNAL_STRENGTH_MODERATE */
sDefaults.putInt(KEY_OPPORTUNISTIC_NETWORK_EXIT_THRESHOLD_RSRP_INT, -118)10377         sDefaults.putInt(KEY_OPPORTUNISTIC_NETWORK_EXIT_THRESHOLD_RSRP_INT, -118);
10378         /* Default value is minimum RSSNR level needed for SIGNAL_STRENGTH_GOOD */
sDefaults.putInt(KEY_OPPORTUNISTIC_NETWORK_ENTRY_THRESHOLD_RSSNR_INT, 5)10379         sDefaults.putInt(KEY_OPPORTUNISTIC_NETWORK_ENTRY_THRESHOLD_RSSNR_INT, 5);
10380         /* Default value is minimum RSSNR level needed for SIGNAL_STRENGTH_MODERATE */
sDefaults.putInt(KEY_OPPORTUNISTIC_NETWORK_EXIT_THRESHOLD_RSSNR_INT, 1)10381         sDefaults.putInt(KEY_OPPORTUNISTIC_NETWORK_EXIT_THRESHOLD_RSSNR_INT, 1);
10382         /* Default value is 1024 kbps */
sDefaults.putInt(KEY_OPPORTUNISTIC_NETWORK_ENTRY_THRESHOLD_BANDWIDTH_INT, 1024)10383         sDefaults.putInt(KEY_OPPORTUNISTIC_NETWORK_ENTRY_THRESHOLD_BANDWIDTH_INT, 1024);
10384         /* Default value is 10 seconds */
sDefaults.putLong(KEY_OPPORTUNISTIC_NETWORK_ENTRY_OR_EXIT_HYSTERESIS_TIME_LONG, 10000)10385         sDefaults.putLong(KEY_OPPORTUNISTIC_NETWORK_ENTRY_OR_EXIT_HYSTERESIS_TIME_LONG, 10000);
10386         /* Default value is 10 seconds. */
sDefaults.putLong(KEY_OPPORTUNISTIC_NETWORK_DATA_SWITCH_HYSTERESIS_TIME_LONG, 10000)10387         sDefaults.putLong(KEY_OPPORTUNISTIC_NETWORK_DATA_SWITCH_HYSTERESIS_TIME_LONG, 10000);
10388         /* Default value is 3 seconds. */
sDefaults.putLong(KEY_OPPORTUNISTIC_NETWORK_DATA_SWITCH_EXIT_HYSTERESIS_TIME_LONG, 3000)10389         sDefaults.putLong(KEY_OPPORTUNISTIC_NETWORK_DATA_SWITCH_EXIT_HYSTERESIS_TIME_LONG, 3000);
OpportunisticNetwork.getDefaults()10390         sDefaults.putAll(OpportunisticNetwork.getDefaults());
sDefaults.putBoolean(KEY_PING_TEST_BEFORE_DATA_SWITCH_BOOL, true)10391         sDefaults.putBoolean(KEY_PING_TEST_BEFORE_DATA_SWITCH_BOOL, true);
sDefaults.putBoolean(KEY_SWITCH_DATA_TO_PRIMARY_IF_PRIMARY_IS_OOS_BOOL, true)10392         sDefaults.putBoolean(KEY_SWITCH_DATA_TO_PRIMARY_IF_PRIMARY_IS_OOS_BOOL, true);
10393         /* Default value is 60 seconds. */
sDefaults.putLong(KEY_OPPORTUNISTIC_NETWORK_PING_PONG_TIME_LONG, 60000)10394         sDefaults.putLong(KEY_OPPORTUNISTIC_NETWORK_PING_PONG_TIME_LONG, 60000);
10395         /* Default value is 10 seconds. */
sDefaults.putLong(KEY_OPPORTUNISTIC_NETWORK_BACKOFF_TIME_LONG, 10000)10396         sDefaults.putLong(KEY_OPPORTUNISTIC_NETWORK_BACKOFF_TIME_LONG, 10000);
10397         /* Default value is 60 seconds. */
sDefaults.putLong(KEY_OPPORTUNISTIC_NETWORK_MAX_BACKOFF_TIME_LONG, 60000)10398         sDefaults.putLong(KEY_OPPORTUNISTIC_NETWORK_MAX_BACKOFF_TIME_LONG, 60000);
sDefaults.putBoolean(KEY_ENABLE_4G_OPPORTUNISTIC_NETWORK_SCAN_BOOL, true)10399         sDefaults.putBoolean(KEY_ENABLE_4G_OPPORTUNISTIC_NETWORK_SCAN_BOOL, true);
sDefaults.putLong(KEY_TIME_TO_SWITCH_BACK_TO_PRIMARY_IF_OPPORTUNISTIC_OOS_LONG, 60000L)10400         sDefaults.putLong(KEY_TIME_TO_SWITCH_BACK_TO_PRIMARY_IF_OPPORTUNISTIC_OOS_LONG, 60000L);
sDefaults.putLong(KEY_OPPORTUNISTIC_TIME_TO_SCAN_AFTER_CAPABILITY_SWITCH_TO_PRIMARY_LONG, 120000L)10401         sDefaults.putLong(KEY_OPPORTUNISTIC_TIME_TO_SCAN_AFTER_CAPABILITY_SWITCH_TO_PRIMARY_LONG,
10402                 120000L);
ImsServiceEntitlement.getDefaults()10403         sDefaults.putAll(ImsServiceEntitlement.getDefaults());
Gps.getDefaults()10404         sDefaults.putAll(Gps.getDefaults());
sDefaults.putIntArray(KEY_CDMA_ENHANCED_ROAMING_INDICATOR_FOR_HOME_NETWORK_INT_ARRAY, new int[] { 1 })10405         sDefaults.putIntArray(KEY_CDMA_ENHANCED_ROAMING_INDICATOR_FOR_HOME_NETWORK_INT_ARRAY,
10406                 new int[] {
10407                         1 /* Roaming Indicator Off */
10408                 });
sDefaults.putStringArray(KEY_EMERGENCY_NUMBER_PREFIX_STRING_ARRAY, new String[0])10409         sDefaults.putStringArray(KEY_EMERGENCY_NUMBER_PREFIX_STRING_ARRAY, new String[0]);
sDefaults.putBoolean(KEY_CARRIER_SUPPORTS_CALLER_ID_VERTICAL_SERVICE_CODES_BOOL, false)10410         sDefaults.putBoolean(KEY_CARRIER_SUPPORTS_CALLER_ID_VERTICAL_SERVICE_CODES_BOOL, false);
sDefaults.putBoolean(KEY_USE_USIM_BOOL, false)10411         sDefaults.putBoolean(KEY_USE_USIM_BOOL, false);
sDefaults.putBoolean(KEY_SHOW_WFC_LOCATION_PRIVACY_POLICY_BOOL, false)10412         sDefaults.putBoolean(KEY_SHOW_WFC_LOCATION_PRIVACY_POLICY_BOOL, false);
sDefaults.putBoolean(KEY_AUTO_CANCEL_CS_REJECT_NOTIFICATION, true)10413         sDefaults.putBoolean(KEY_AUTO_CANCEL_CS_REJECT_NOTIFICATION, true);
sDefaults.putString(KEY_SMART_FORWARDING_CONFIG_COMPONENT_NAME_STRING, R)10414         sDefaults.putString(KEY_SMART_FORWARDING_CONFIG_COMPONENT_NAME_STRING, "");
sDefaults.putBoolean(KEY_ALWAYS_SHOW_PRIMARY_SIGNAL_BAR_IN_OPPORTUNISTIC_NETWORK_BOOLEAN, false)10415         sDefaults.putBoolean(KEY_ALWAYS_SHOW_PRIMARY_SIGNAL_BAR_IN_OPPORTUNISTIC_NETWORK_BOOLEAN,
10416                 false);
sDefaults.putString(KEY_SUBSCRIPTION_GROUP_UUID_STRING, R)10417         sDefaults.putString(KEY_SUBSCRIPTION_GROUP_UUID_STRING, "");
sDefaults.putBoolean(KEY_IS_OPPORTUNISTIC_SUBSCRIPTION_BOOL, false)10418         sDefaults.putBoolean(KEY_IS_OPPORTUNISTIC_SUBSCRIPTION_BOOL, false);
sDefaults.putIntArray(KEY_GSM_RSSI_THRESHOLDS_INT_ARRAY, new int[] { -107, -103, -97, -89, })10419         sDefaults.putIntArray(KEY_GSM_RSSI_THRESHOLDS_INT_ARRAY,
10420                 new int[] {
10421                         -107, /* SIGNAL_STRENGTH_POOR */
10422                         -103, /* SIGNAL_STRENGTH_MODERATE */
10423                         -97,  /* SIGNAL_STRENGTH_GOOD */
10424                         -89,  /* SIGNAL_STRENGTH_GREAT */
10425                 });
sDefaults.putBoolean(KEY_SUPPORT_WPS_OVER_IMS_BOOL, true)10426         sDefaults.putBoolean(KEY_SUPPORT_WPS_OVER_IMS_BOOL, true);
Ims.getDefaults()10427         sDefaults.putAll(Ims.getDefaults());
ImsVoice.getDefaults()10428         sDefaults.putAll(ImsVoice.getDefaults());
ImsSms.getDefaults()10429         sDefaults.putAll(ImsSms.getDefaults());
ImsRtt.getDefaults()10430         sDefaults.putAll(ImsRtt.getDefaults());
ImsEmergency.getDefaults()10431         sDefaults.putAll(ImsEmergency.getDefaults());
ImsVt.getDefaults()10432         sDefaults.putAll(ImsVt.getDefaults());
ImsWfc.getDefaults()10433         sDefaults.putAll(ImsWfc.getDefaults());
ImsSs.getDefaults()10434         sDefaults.putAll(ImsSs.getDefaults());
Bsf.getDefaults()10435         sDefaults.putAll(Bsf.getDefaults());
Iwlan.getDefaults()10436         sDefaults.putAll(Iwlan.getDefaults());
sDefaults.putStringArray(KEY_CARRIER_CERTIFICATE_STRING_ARRAY, new String[0])10437         sDefaults.putStringArray(KEY_CARRIER_CERTIFICATE_STRING_ARRAY, new String[0]);
sDefaults.putBoolean(KEY_FORMAT_INCOMING_NUMBER_TO_NATIONAL_FOR_JP_BOOL, false)10438         sDefaults.putBoolean(KEY_FORMAT_INCOMING_NUMBER_TO_NATIONAL_FOR_JP_BOOL, false);
sDefaults.putIntArray(KEY_DISCONNECT_CAUSE_PLAY_BUSYTONE_INT_ARRAY, new int[] {4 })10439         sDefaults.putIntArray(KEY_DISCONNECT_CAUSE_PLAY_BUSYTONE_INT_ARRAY,
10440                 new int[] {4 /* BUSY */});
sDefaults.putBoolean(KEY_PREVENT_CLIR_ACTIVATION_AND_DEACTIVATION_CODE_BOOL, false)10441         sDefaults.putBoolean(KEY_PREVENT_CLIR_ACTIVATION_AND_DEACTIVATION_CODE_BOOL, false);
sDefaults.putLong(KEY_DATA_SWITCH_VALIDATION_TIMEOUT_LONG, 2000)10442         sDefaults.putLong(KEY_DATA_SWITCH_VALIDATION_TIMEOUT_LONG, 2000);
sDefaults.putStringArray(KEY_MMI_TWO_DIGIT_NUMBER_PATTERN_STRING_ARRAY, new String[0])10443         sDefaults.putStringArray(KEY_MMI_TWO_DIGIT_NUMBER_PATTERN_STRING_ARRAY, new String[0]);
sDefaults.putInt(KEY_PARAMETERS_USED_FOR_LTE_SIGNAL_BAR_INT, CellSignalStrengthLte.USE_RSRP)10444         sDefaults.putInt(KEY_PARAMETERS_USED_FOR_LTE_SIGNAL_BAR_INT,
10445                 CellSignalStrengthLte.USE_RSRP);
sDefaults.putInt(KEY_MIN_UDP_PORT_4500_NAT_TIMEOUT_SEC_INT, 300)10446         sDefaults.putInt(KEY_MIN_UDP_PORT_4500_NAT_TIMEOUT_SEC_INT, 300);
sDefaults.putInt(KEY_PREFERRED_IKE_PROTOCOL_INT, -1)10447         sDefaults.putInt(KEY_PREFERRED_IKE_PROTOCOL_INT, -1);
10448         // Default wifi configurations.
Wifi.getDefaults()10449         sDefaults.putAll(Wifi.getDefaults());
sDefaults.putBoolean(ENABLE_EAP_METHOD_PREFIX_BOOL, false)10450         sDefaults.putBoolean(ENABLE_EAP_METHOD_PREFIX_BOOL, false);
sDefaults.putInt(KEY_GBA_MODE_INT, GBA_ME)10451         sDefaults.putInt(KEY_GBA_MODE_INT, GBA_ME);
sDefaults.putInt(KEY_GBA_UA_SECURITY_ORGANIZATION_INT, UaSecurityProtocolIdentifier.ORG_3GPP)10452         sDefaults.putInt(KEY_GBA_UA_SECURITY_ORGANIZATION_INT,
10453                 UaSecurityProtocolIdentifier.ORG_3GPP);
sDefaults.putInt(KEY_GBA_UA_SECURITY_PROTOCOL_INT, UaSecurityProtocolIdentifier.UA_SECURITY_PROTOCOL_3GPP_TLS_DEFAULT)10454         sDefaults.putInt(KEY_GBA_UA_SECURITY_PROTOCOL_INT,
10455                 UaSecurityProtocolIdentifier.UA_SECURITY_PROTOCOL_3GPP_TLS_DEFAULT);
sDefaults.putInt(KEY_GBA_UA_TLS_CIPHER_SUITE_INT, TlsParams.TLS_NULL_WITH_NULL_NULL)10456         sDefaults.putInt(KEY_GBA_UA_TLS_CIPHER_SUITE_INT, TlsParams.TLS_NULL_WITH_NULL_NULL);
10457 
sDefaults.putBoolean(KEY_SHOW_FORWARDED_NUMBER_BOOL, false)10458         sDefaults.putBoolean(KEY_SHOW_FORWARDED_NUMBER_BOOL, false);
sDefaults.putLong(KEY_DATA_SWITCH_VALIDATION_MIN_INTERVAL_MILLIS_LONG, TimeUnit.DAYS.toMillis(1))10459         sDefaults.putLong(KEY_DATA_SWITCH_VALIDATION_MIN_INTERVAL_MILLIS_LONG,
10460                 TimeUnit.DAYS.toMillis(1));
sDefaults.putStringArray(KEY_MISSED_INCOMING_CALL_SMS_ORIGINATOR_STRING_ARRAY, new String[0])10461         sDefaults.putStringArray(KEY_MISSED_INCOMING_CALL_SMS_ORIGINATOR_STRING_ARRAY,
10462                 new String[0]);
sDefaults.putStringArray(KEY_APN_PRIORITY_STRING_ARRAY, new String[] { R, R, R, R, R, R, R, R, R, R, R, R, R })10463         sDefaults.putStringArray(KEY_APN_PRIORITY_STRING_ARRAY, new String[] {
10464                 "enterprise:0", "default:1", "mms:2", "supl:2", "dun:2", "hipri:3", "fota:2",
10465                 "ims:2", "cbs:2", "ia:2", "emergency:2", "mcx:3", "xcap:3"
10466         });
10467 
10468         // Do not modify the priority unless you know what you are doing. This will have significant
10469         // impacts on the order of data network setup.
sDefaults.putStringArray( KEY_TELEPHONY_NETWORK_CAPABILITY_PRIORITIES_STRING_ARRAY, new String[] { R, R, R, R, R, R, R, R, R, R, R })10470         sDefaults.putStringArray(
10471                 KEY_TELEPHONY_NETWORK_CAPABILITY_PRIORITIES_STRING_ARRAY, new String[] {
10472                         "eims:90", "supl:80", "mms:70", "xcap:70", "cbs:50", "mcx:50", "fota:50",
10473                         "ims:40", "dun:30", "enterprise:20", "internet:20"
10474                 });
sDefaults.putStringArray( KEY_TELEPHONY_DATA_SETUP_RETRY_RULES_STRING_ARRAY, new String[] { R, R + R, R, R + R + R })10475         sDefaults.putStringArray(
10476                 KEY_TELEPHONY_DATA_SETUP_RETRY_RULES_STRING_ARRAY, new String[] {
10477                         "capabilities=eims, retry_interval=1000, maximum_retries=20",
10478                         // Permanent fail causes. When setup data call fails with the following
10479                         // fail causes, telephony data frameworks will stop timer-based retry on
10480                         // the failed APN until power cycle, APM, or some special events. Note that
10481                         // even timer-based retry is not performed, condition-based (RAT changes,
10482                         // registration state changes) retry can still happen.
10483                         "permanent_fail_causes=8|27|28|29|30|32|33|35|50|51|111|-5|-6|65537|65538|"
10484                                 + "-3|65543|65547|2252|2253|2254, retry_interval=2500",
10485                         "capabilities=mms|supl|cbs, retry_interval=2000",
10486                         "capabilities=internet|enterprise|dun|ims|fota, retry_interval=2500|3000|"
10487                                 + "5000|10000|15000|20000|40000|60000|120000|240000|"
10488                                 + "600000|1200000|1800000, maximum_retries=20"
10489                 });
sDefaults.putStringArray( KEY_TELEPHONY_DATA_HANDOVER_RETRY_RULES_STRING_ARRAY, new String[] { R })10490         sDefaults.putStringArray(
10491                 KEY_TELEPHONY_DATA_HANDOVER_RETRY_RULES_STRING_ARRAY, new String[] {
10492                         "retry_interval=1000|2000|4000|8000|16000, maximum_retries=5"
10493                 });
sDefaults.putBoolean(KEY_DELAY_IMS_TEAR_DOWN_UNTIL_CALL_END_BOOL, false)10494         sDefaults.putBoolean(KEY_DELAY_IMS_TEAR_DOWN_UNTIL_CALL_END_BOOL, false);
sDefaults.putStringArray(KEY_MISSED_INCOMING_CALL_SMS_PATTERN_STRING_ARRAY, new String[0])10495         sDefaults.putStringArray(KEY_MISSED_INCOMING_CALL_SMS_PATTERN_STRING_ARRAY, new String[0]);
sDefaults.putPersistableBundle( KEY_CARRIER_SUPPORTED_SATELLITE_SERVICES_PER_PROVIDER_BUNDLE, PersistableBundle.EMPTY)10496         sDefaults.putPersistableBundle(
10497                 KEY_CARRIER_SUPPORTED_SATELLITE_SERVICES_PER_PROVIDER_BUNDLE,
10498                 PersistableBundle.EMPTY);
sDefaults.putBoolean(KEY_DISABLE_DUN_APN_WHILE_ROAMING_WITH_PRESET_APN_BOOL, false)10499         sDefaults.putBoolean(KEY_DISABLE_DUN_APN_WHILE_ROAMING_WITH_PRESET_APN_BOOL, false);
sDefaults.putString(KEY_DEFAULT_PREFERRED_APN_NAME_STRING, R)10500         sDefaults.putString(KEY_DEFAULT_PREFERRED_APN_NAME_STRING, "");
sDefaults.putBoolean(KEY_SUPPORTS_CALL_COMPOSER_BOOL, false)10501         sDefaults.putBoolean(KEY_SUPPORTS_CALL_COMPOSER_BOOL, false);
sDefaults.putString(KEY_CALL_COMPOSER_PICTURE_SERVER_URL_STRING, R)10502         sDefaults.putString(KEY_CALL_COMPOSER_PICTURE_SERVER_URL_STRING, "");
sDefaults.putBoolean(KEY_USE_ACS_FOR_RCS_BOOL, false)10503         sDefaults.putBoolean(KEY_USE_ACS_FOR_RCS_BOOL, false);
sDefaults.putBoolean(KEY_NETWORK_TEMP_NOT_METERED_SUPPORTED_BOOL, true)10504         sDefaults.putBoolean(KEY_NETWORK_TEMP_NOT_METERED_SUPPORTED_BOOL, true);
sDefaults.putInt(KEY_DEFAULT_RTT_MODE_INT, 0)10505         sDefaults.putInt(KEY_DEFAULT_RTT_MODE_INT, 0);
sDefaults.putBoolean(KEY_STORE_SIM_PIN_FOR_UNATTENDED_REBOOT_BOOL, true)10506         sDefaults.putBoolean(KEY_STORE_SIM_PIN_FOR_UNATTENDED_REBOOT_BOOL, true);
sDefaults.putBoolean(KEY_HIDE_ENABLE_2G, false)10507         sDefaults.putBoolean(KEY_HIDE_ENABLE_2G, false);
sDefaults.putStringArray(KEY_ALLOWED_INITIAL_ATTACH_APN_TYPES_STRING_ARRAY, new String[]{R, R})10508         sDefaults.putStringArray(KEY_ALLOWED_INITIAL_ATTACH_APN_TYPES_STRING_ARRAY,
10509                 new String[]{"ia", "default"});
sDefaults.putBoolean(KEY_CARRIER_PROVISIONS_WIFI_MERGED_NETWORKS_BOOL, false)10510         sDefaults.putBoolean(KEY_CARRIER_PROVISIONS_WIFI_MERGED_NETWORKS_BOOL, false);
sDefaults.putBoolean(KEY_USE_IP_FOR_CALLING_INDICATOR_BOOL, false)10511         sDefaults.putBoolean(KEY_USE_IP_FOR_CALLING_INDICATOR_BOOL, false);
sDefaults.putBoolean(KEY_DISPLAY_CALL_STRENGTH_INDICATOR_BOOL, true)10512         sDefaults.putBoolean(KEY_DISPLAY_CALL_STRENGTH_INDICATOR_BOOL, true);
sDefaults.putString(KEY_CARRIER_PROVISIONING_APP_STRING, R)10513         sDefaults.putString(KEY_CARRIER_PROVISIONING_APP_STRING, "");
sDefaults.putBoolean(KEY_DISPLAY_NO_DATA_NOTIFICATION_ON_PERMANENT_FAILURE_BOOL, false)10514         sDefaults.putBoolean(KEY_DISPLAY_NO_DATA_NOTIFICATION_ON_PERMANENT_FAILURE_BOOL, false);
sDefaults.putBoolean(KEY_UNTHROTTLE_DATA_RETRY_WHEN_TAC_CHANGES_BOOL, false)10515         sDefaults.putBoolean(KEY_UNTHROTTLE_DATA_RETRY_WHEN_TAC_CHANGES_BOOL, false);
sDefaults.putBoolean(KEY_VONR_SETTING_VISIBILITY_BOOL, true)10516         sDefaults.putBoolean(KEY_VONR_SETTING_VISIBILITY_BOOL, true);
sDefaults.putBoolean(KEY_VONR_ENABLED_BOOL, false)10517         sDefaults.putBoolean(KEY_VONR_ENABLED_BOOL, false);
sDefaults.putBoolean(KEY_VONR_ON_BY_DEFAULT_BOOL, true)10518         sDefaults.putBoolean(KEY_VONR_ON_BY_DEFAULT_BOOL, true);
sDefaults.putIntArray(KEY_SUPPORTED_PREMIUM_CAPABILITIES_INT_ARRAY, new int[0])10519         sDefaults.putIntArray(KEY_SUPPORTED_PREMIUM_CAPABILITIES_INT_ARRAY, new int[0]);
sDefaults.putLong(KEY_PREMIUM_CAPABILITY_NOTIFICATION_DISPLAY_TIMEOUT_MILLIS_LONG, TimeUnit.MINUTES.toMillis(30))10520         sDefaults.putLong(KEY_PREMIUM_CAPABILITY_NOTIFICATION_DISPLAY_TIMEOUT_MILLIS_LONG,
10521                 TimeUnit.MINUTES.toMillis(30));
sDefaults.putLong(KEY_PREMIUM_CAPABILITY_NOTIFICATION_BACKOFF_HYSTERESIS_TIME_MILLIS_LONG, TimeUnit.MINUTES.toMillis(30))10522         sDefaults.putLong(KEY_PREMIUM_CAPABILITY_NOTIFICATION_BACKOFF_HYSTERESIS_TIME_MILLIS_LONG,
10523                 TimeUnit.MINUTES.toMillis(30));
sDefaults.putInt(KEY_PREMIUM_CAPABILITY_MAXIMUM_DAILY_NOTIFICATION_COUNT_INT, 2)10524         sDefaults.putInt(KEY_PREMIUM_CAPABILITY_MAXIMUM_DAILY_NOTIFICATION_COUNT_INT, 2);
sDefaults.putInt(KEY_PREMIUM_CAPABILITY_MAXIMUM_MONTHLY_NOTIFICATION_COUNT_INT, 10)10525         sDefaults.putInt(KEY_PREMIUM_CAPABILITY_MAXIMUM_MONTHLY_NOTIFICATION_COUNT_INT, 10);
sDefaults.putLong( KEY_PREMIUM_CAPABILITY_PURCHASE_CONDITION_BACKOFF_HYSTERESIS_TIME_MILLIS_LONG, TimeUnit.MINUTES.toMillis(30))10526         sDefaults.putLong(
10527                 KEY_PREMIUM_CAPABILITY_PURCHASE_CONDITION_BACKOFF_HYSTERESIS_TIME_MILLIS_LONG,
10528                 TimeUnit.MINUTES.toMillis(30));
sDefaults.putLong(KEY_PREMIUM_CAPABILITY_NETWORK_SETUP_TIME_MILLIS_LONG, TimeUnit.MINUTES.toMillis(5))10529         sDefaults.putLong(KEY_PREMIUM_CAPABILITY_NETWORK_SETUP_TIME_MILLIS_LONG,
10530                 TimeUnit.MINUTES.toMillis(5));
sDefaults.putString(KEY_PREMIUM_CAPABILITY_PURCHASE_URL_STRING, null)10531         sDefaults.putString(KEY_PREMIUM_CAPABILITY_PURCHASE_URL_STRING, null);
sDefaults.putBoolean(KEY_PREMIUM_CAPABILITY_SUPPORTED_ON_LTE_BOOL, false)10532         sDefaults.putBoolean(KEY_PREMIUM_CAPABILITY_SUPPORTED_ON_LTE_BOOL, false);
sDefaults.putStringArray(KEY_IWLAN_HANDOVER_POLICY_STRING_ARRAY, new String[]{ R + R})10533         sDefaults.putStringArray(KEY_IWLAN_HANDOVER_POLICY_STRING_ARRAY, new String[]{
10534                 "source=GERAN|UTRAN|EUTRAN|NGRAN|IWLAN, "
10535                         + "target=GERAN|UTRAN|EUTRAN|NGRAN|IWLAN, type=allowed"});
10536         PersistableBundle auto_data_switch_rat_signal_score_string_bundle = new PersistableBundle();
10537         auto_data_switch_rat_signal_score_string_bundle.putIntArray(
10538                 "NR_SA_MMWAVE", new int[]{10000, 13227, 16000, 18488, 20017});
10539         auto_data_switch_rat_signal_score_string_bundle.putIntArray(
10540                 "NR_NSA_MMWAVE", new int[]{8000, 10227, 12488, 15017, 15278});
10541         auto_data_switch_rat_signal_score_string_bundle.putIntArray(
10542                 "LTE", new int[]{3731, 5965, 8618, 11179, 13384});
10543         auto_data_switch_rat_signal_score_string_bundle.putIntArray(
10544                 "NR_SA", new int[]{5288, 6795, 6955, 7562, 9713});
10545         auto_data_switch_rat_signal_score_string_bundle.putIntArray(
10546                 "NR_NSA", new int[]{5463, 6827, 8029, 9007, 9428});
10547         auto_data_switch_rat_signal_score_string_bundle.putIntArray(
10548                 "UMTS", new int[]{100, 169, 183, 192, 300});
10549         auto_data_switch_rat_signal_score_string_bundle.putIntArray(
10550                 "eHRPD", new int[]{10, 400, 600, 800, 1000});
10551         auto_data_switch_rat_signal_score_string_bundle.putIntArray(
10552                 "TD_SCDMA", new int[]{1, 100, 500, 1000});
10553         auto_data_switch_rat_signal_score_string_bundle.putIntArray(
10554                 "iDEN", new int[]{1, 2, 10, 50, 100});
10555         auto_data_switch_rat_signal_score_string_bundle.putIntArray(
10556                 "EvDo_B", new int[]{1000, 1495, 2186, 2532, 2600});
10557         auto_data_switch_rat_signal_score_string_bundle.putIntArray(
10558                 "HSPA+", new int[]{1619, 2500, 3393, 4129, 4212});
10559         auto_data_switch_rat_signal_score_string_bundle.putIntArray(
10560                 "HSPA", new int[]{1000, 1495, 2186, 2532, 2544});
10561         auto_data_switch_rat_signal_score_string_bundle.putIntArray(
10562                 "HSUPA", new int[]{1500, 1919, 2132, 2362, 2704});
10563         auto_data_switch_rat_signal_score_string_bundle.putIntArray(
10564                 "HSDPA", new int[]{1500, 1732, 4000, 7000, 8000});
10565         auto_data_switch_rat_signal_score_string_bundle.putIntArray(
10566                 "EvDo_A", new int[]{600, 840, 1200, 1300, 1400});
10567         auto_data_switch_rat_signal_score_string_bundle.putIntArray(
10568                 "EvDo_0", new int[]{300, 600, 1000, 1500, 2000});
10569         auto_data_switch_rat_signal_score_string_bundle.putIntArray(
10570                 "1xRTT", new int[]{50, 60, 70, 80});
10571         auto_data_switch_rat_signal_score_string_bundle.putIntArray(
10572                 "EDGE", new int[]{154, 169, 183, 192, 267});
10573         auto_data_switch_rat_signal_score_string_bundle.putIntArray(
10574                 "GPRS", new int[]{15, 30, 40, 45, 50});
10575         auto_data_switch_rat_signal_score_string_bundle.putIntArray(
10576                 "CDMA", new int[]{1, 50, 100, 300, 2000});
10577         auto_data_switch_rat_signal_score_string_bundle.putIntArray(
10578                 "GSM", new int[]{1, 2, 10, 50, 100});
sDefaults.putPersistableBundle(KEY_AUTO_DATA_SWITCH_RAT_SIGNAL_SCORE_BUNDLE, auto_data_switch_rat_signal_score_string_bundle)10579         sDefaults.putPersistableBundle(KEY_AUTO_DATA_SWITCH_RAT_SIGNAL_SCORE_BUNDLE,
10580                 auto_data_switch_rat_signal_score_string_bundle);
sDefaults.putInt(KEY_CELLULAR_USAGE_SETTING_INT, SubscriptionManager.USAGE_SETTING_UNKNOWN)10581         sDefaults.putInt(KEY_CELLULAR_USAGE_SETTING_INT,
10582                 SubscriptionManager.USAGE_SETTING_UNKNOWN);
10583         // Default data stall recovery configurations.
sDefaults.putLongArray(KEY_DATA_STALL_RECOVERY_TIMERS_LONG_ARRAY, new long[] {180000, 180000, 180000, 180000})10584         sDefaults.putLongArray(KEY_DATA_STALL_RECOVERY_TIMERS_LONG_ARRAY,
10585                 new long[] {180000, 180000, 180000, 180000});
sDefaults.putBooleanArray(KEY_DATA_STALL_RECOVERY_SHOULD_SKIP_BOOL_ARRAY, new boolean[] {false, false, true, false, false})10586         sDefaults.putBooleanArray(KEY_DATA_STALL_RECOVERY_SHOULD_SKIP_BOOL_ARRAY,
10587                 new boolean[] {false, false, true, false, false});
sDefaults.putStringArray(KEY_CARRIER_SERVICE_NAME_STRING_ARRAY, new String[0])10588         sDefaults.putStringArray(KEY_CARRIER_SERVICE_NAME_STRING_ARRAY, new String[0]);
sDefaults.putStringArray(KEY_CARRIER_SERVICE_NUMBER_STRING_ARRAY, new String[0])10589         sDefaults.putStringArray(KEY_CARRIER_SERVICE_NUMBER_STRING_ARRAY, new String[0]);
10590     }
10591 
10592     /**
10593      * Wi-Fi configs used in WiFi Module.
10594      *
10595      * @hide
10596      */
10597     @SystemApi
10598     public static final class Wifi {
10599         /** Prefix of all Wifi.KEY_* constants. */
10600         public static final String KEY_PREFIX = "wifi.";
10601         /**
10602         * It contains the maximum client count definition that the carrier sets.
10603         * The default is 0, which means that the carrier hasn't set a requirement.
10604         */
10605         public static final String KEY_HOTSPOT_MAX_CLIENT_COUNT =
10606                 KEY_PREFIX + "hotspot_maximum_client_count";
10607 
10608         /**
10609          * This configuration is intended to be a narrow exception for provisioning
10610          * {@link android.net.wifi.WifiNetworkSuggestion} of widely-known carrier networks that do
10611          * not support using randomized MAC address.
10612          * Carrier provisioned {@link android.net.wifi.WifiNetworkSuggestion} with SSIDs included
10613          * in this list will have MAC randomization disabled.
10614          *
10615          * Note: the SSIDs in the list are expected to be interpreted as is - do not add double
10616          * quotes to the SSIDs.
10617          */
10618         public static final String KEY_SUGGESTION_SSID_LIST_WITH_MAC_RANDOMIZATION_DISABLED =
10619                 KEY_PREFIX + "suggestion_ssid_list_with_mac_randomization_disabled";
10620 
10621         /**
10622          * Avoid SoftAp in 5GHz if cellular is on unlicensed 5Ghz using License Assisted Access
10623          * (LAA).
10624          */
10625         public static final String KEY_AVOID_5GHZ_SOFTAP_FOR_LAA_BOOL =
10626                 KEY_PREFIX + "avoid_5ghz_softap_for_laa_bool";
10627 
10628         /**
10629          * Avoid Wifi Direct in 5GHz if cellular is on unlicensed 5Ghz using License Assisted
10630          * Access (LAA).
10631          */
10632         public static final String KEY_AVOID_5GHZ_WIFI_DIRECT_FOR_LAA_BOOL =
10633                 KEY_PREFIX + "avoid_5ghz_wifi_direct_for_laa_bool";
10634 
getDefaults()10635         private static PersistableBundle getDefaults() {
10636             PersistableBundle defaults = new PersistableBundle();
10637             defaults.putInt(KEY_HOTSPOT_MAX_CLIENT_COUNT, 0);
10638             defaults.putStringArray(KEY_SUGGESTION_SSID_LIST_WITH_MAC_RANDOMIZATION_DISABLED,
10639                     new String[0]);
10640             defaults.putBoolean(KEY_AVOID_5GHZ_SOFTAP_FOR_LAA_BOOL, false);
10641             defaults.putBoolean(KEY_AVOID_5GHZ_WIFI_DIRECT_FOR_LAA_BOOL, false);
10642 
10643             return defaults;
10644         }
10645 
Wifi()10646         private Wifi() {}
10647     }
10648 
10649     /**
10650      * Gets the configuration values for a particular subscription, which is associated with a
10651      * specific SIM card. If an invalid subId is used, the returned config will contain default
10652      * values. After using this method to get the configuration bundle,
10653      * {@link #isConfigForIdentifiedCarrier(PersistableBundle)} should be called to confirm whether
10654      * any carrier specific configuration has been applied.
10655      *
10656      * <p>Requires Permission:
10657      * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}, or the calling app
10658      * has carrier privileges (see {@link TelephonyManager#hasCarrierPrivileges()}).
10659      *
10660      * @param subId the subscription ID, normally obtained from {@link SubscriptionManager}.
10661      * @return A {@link PersistableBundle} containing the config for the given subId, or default
10662      *         values for an invalid subId.
10663      *
10664      * @deprecated Use {@link #getConfigForSubId(int, String...)} instead.
10665      */
10666     @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
10667     @RequiresPermission(Manifest.permission.READ_PHONE_STATE)
10668     @Nullable
10669     @Deprecated
getConfigForSubId(int subId)10670     public PersistableBundle getConfigForSubId(int subId) {
10671         try {
10672             ICarrierConfigLoader loader = getICarrierConfigLoader();
10673             if (loader == null) {
10674                 Rlog.w(TAG, "Error getting config for subId " + subId
10675                         + " ICarrierConfigLoader is null");
10676                 return null;
10677             }
10678             return loader.getConfigForSubIdWithFeature(subId, mContext.getOpPackageName(),
10679                     mContext.getAttributionTag());
10680         } catch (RemoteException ex) {
10681             Rlog.e(TAG, "Error getting config for subId " + subId + ": " + ex);
10682         }
10683         return null;
10684     }
10685 
10686     /**
10687      * Gets the configuration values of the specified keys for a particular subscription.
10688      *
10689      * <p>If an invalid subId is used, the returned configuration will contain default values for
10690      * the specified keys. If the value for the key can't be found, the returned configuration will
10691      * filter the key out.
10692      *
10693      * <p>After using this method to get the configuration bundle,
10694      * {@link #isConfigForIdentifiedCarrier(PersistableBundle)} should be called to confirm whether
10695      * any carrier specific configuration has been applied.
10696      *
10697      * <p>Note that on success, the key/value for {@link #KEY_CARRIER_CONFIG_VERSION_STRING} and
10698      * {@link #KEY_CARRIER_CONFIG_APPLIED_BOOL} are always in the returned bundle, no matter if they
10699      * were explicitly requested.
10700      *
10701      * <p>Requires Permission:
10702      * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}, or the calling app
10703      * has carrier privileges on the specified subscription (see
10704      * {@link TelephonyManager#hasCarrierPrivileges()}).
10705      *
10706      * @param subId The subscription ID on which the carrier config should be retrieved.
10707      * @param keys The carrier config keys to retrieve values.
10708      * @return A {@link PersistableBundle} with key/value mapping for the specified configuration
10709      * on success, or an empty (but never null) bundle on failure (for example, when the calling app
10710      * has no permission).
10711      */
10712     @RequiresPermission(anyOf = {
10713             Manifest.permission.READ_PHONE_STATE,
10714             "carrier privileges",
10715     })
10716     @NonNull
getConfigForSubId(int subId, @NonNull String... keys)10717     public PersistableBundle getConfigForSubId(int subId, @NonNull String... keys) {
10718         Objects.requireNonNull(keys, "Config keys should be non-null");
10719         for (String key : keys) {
10720             Objects.requireNonNull(key, "Config key should be non-null");
10721         }
10722 
10723         try {
10724             ICarrierConfigLoader loader = getICarrierConfigLoader();
10725             if (loader == null) {
10726                 Rlog.w(TAG, "Error getting config for subId " + subId
10727                         + " ICarrierConfigLoader is null");
10728                 throw new IllegalStateException("Carrier config loader is not available.");
10729             }
10730             return loader.getConfigSubsetForSubIdWithFeature(subId, mContext.getOpPackageName(),
10731                     mContext.getAttributionTag(), keys);
10732         } catch (RemoteException ex) {
10733             Rlog.e(TAG, "Error getting config for subId " + subId + ": " + ex);
10734             ex.rethrowAsRuntimeException();
10735         }
10736         return new PersistableBundle();
10737     }
10738 
10739     /**
10740      * Overrides the carrier config of the provided subscription ID with the provided values.
10741      *
10742      * Any further queries to carrier config from any process will return the overridden values
10743      * after this method returns. The overrides are effective for the lifetime of the phone process
10744      * until the user passes in {@code null} for {@code overrideValues}. This removes all previous
10745      * overrides and sets the carrier config back to production values.
10746      *
10747      * May throw an {@link IllegalArgumentException} if {@code overrideValues} contains invalid
10748      * values for the specified config keys.
10749      *
10750      * NOTE: This API is meant for testing purposes only.
10751      *
10752      * @param subscriptionId The subscription ID for which the override should be done.
10753      * @param overrideValues Key-value pairs of the values that are to be overridden. If set to
10754      *                       {@code null}, this will remove all previous overrides and set the
10755      *                       carrier configuration back to production values.
10756      * @hide
10757      */
10758     @RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE)
10759     @SystemApi
overrideConfig(int subscriptionId, @Nullable PersistableBundle overrideValues)10760     public void overrideConfig(int subscriptionId, @Nullable PersistableBundle overrideValues) {
10761         overrideConfig(subscriptionId, overrideValues, false);
10762     }
10763 
10764     /**
10765      * Overrides the carrier config of the provided subscription ID with the provided values.
10766      *
10767      * Any further queries to carrier config from any process will return the overridden values
10768      * after this method returns. The overrides are effective until the user passes in {@code null}
10769      * for {@code overrideValues}. This removes all previous overrides and sets the carrier config
10770      * back to production values.
10771      *
10772      * The overrides is stored persistently and will survive a reboot if {@code persistent} is true.
10773      *
10774      * May throw an {@link IllegalArgumentException} if {@code overrideValues} contains invalid
10775      * values for the specified config keys.
10776      *
10777      * NOTE: This API is meant for testing purposes only.
10778      *
10779      * @param subscriptionId The subscription ID for which the override should be done.
10780      * @param overrideValues Key-value pairs of the values that are to be overridden. If set to
10781      *                       {@code null}, this will remove all previous overrides and set the
10782      *                       carrier configuration back to production values.
10783      * @param persistent     Determines whether the override should be persistent.
10784      * @hide
10785      */
10786     @RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE)
overrideConfig(int subscriptionId, @Nullable PersistableBundle overrideValues, boolean persistent)10787     public void overrideConfig(int subscriptionId, @Nullable PersistableBundle overrideValues,
10788             boolean persistent) {
10789         try {
10790             ICarrierConfigLoader loader = getICarrierConfigLoader();
10791             if (loader == null) {
10792                 Rlog.w(TAG, "Error setting config for subId " + subscriptionId
10793                         + " ICarrierConfigLoader is null");
10794                 return;
10795             }
10796             loader.overrideConfig(subscriptionId, overrideValues, persistent);
10797         } catch (RemoteException ex) {
10798             Rlog.e(TAG, "Error setting config for subId " + subscriptionId + ": " + ex);
10799         }
10800     }
10801 
10802     /**
10803      * Gets the configuration values for the default subscription. After using this method to get
10804      * the configuration bundle, {@link #isConfigForIdentifiedCarrier(PersistableBundle)} should be
10805      * called to confirm whether any carrier specific configuration has been applied.
10806      *
10807      * <p>Requires Permission:
10808      * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}, or the calling app
10809      * has carrier privileges (see {@link TelephonyManager#hasCarrierPrivileges()}).
10810      *
10811      * @see #getConfigForSubId
10812      * @see #getConfig(String...)
10813      * @deprecated use {@link #getConfig(String...)} instead.
10814      */
10815     @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
10816     @RequiresPermission(Manifest.permission.READ_PHONE_STATE)
10817     @Nullable
10818     @Deprecated
getConfig()10819     public PersistableBundle getConfig() {
10820         return getConfigForSubId(SubscriptionManager.getDefaultSubscriptionId());
10821     }
10822 
10823     /**
10824      * Gets the configuration values of the specified config keys applied for the default
10825      * subscription.
10826      *
10827      * <p>If the value for the key can't be found, the returned bundle will filter the key out.
10828      *
10829      * <p>After using this method to get the configuration bundle, {@link
10830      * #isConfigForIdentifiedCarrier(PersistableBundle)} should be called to confirm whether any
10831      * carrier specific configuration has been applied.
10832      *
10833      * <p>Note that on success, the key/value for {@link #KEY_CARRIER_CONFIG_VERSION_STRING} and
10834      * {@link #KEY_CARRIER_CONFIG_APPLIED_BOOL} are always in the returned bundle, no matter if
10835      * they were explicitly requested.
10836      *
10837      * <p>Requires Permission:
10838      * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}, or the calling app
10839      * has carrier privileges for the default subscription (see
10840      * {@link TelephonyManager#hasCarrierPrivileges()}).
10841      *
10842      * @param keys The config keys to retrieve values
10843      * @return A {@link PersistableBundle} with key/value mapping for the specified carrier
10844      * configs on success, or an empty (but never null) bundle on failure.
10845      * @see #getConfigForSubId(int, String...)
10846      * @see SubscriptionManager#getDefaultSubscriptionId()
10847      */
10848     @RequiresPermission(anyOf = {
10849             Manifest.permission.READ_PHONE_STATE,
10850             "carrier privileges",
10851     })
10852     @NonNull
getConfig(@onNull String... keys)10853     public PersistableBundle getConfig(@NonNull String... keys) {
10854         return getConfigForSubId(SubscriptionManager.getDefaultSubscriptionId(), keys);
10855     }
10856 
10857     /**
10858      * Determines whether a configuration {@link PersistableBundle} obtained from
10859      * {@link #getConfig()} or {@link #getConfigForSubId(int)} corresponds to an identified carrier.
10860      *
10861      * <p>When an app receives the {@link CarrierConfigManager#ACTION_CARRIER_CONFIG_CHANGED}
10862      * broadcast which informs it that the carrier configuration has changed, it is possible
10863      * that another reload of the carrier configuration has begun since the intent was sent.
10864      * In this case, the carrier configuration the app fetches (e.g. via {@link #getConfig()})
10865      * may not represent the configuration for the current carrier. It should be noted that it
10866      * does not necessarily mean the configuration belongs to current carrier when this function
10867      * return true because it may belong to another previous identified carrier. Users should
10868      * always call {@link #getConfig()} or {@link #getConfigForSubId(int)} after receiving the
10869      * broadcast {@link #ACTION_CARRIER_CONFIG_CHANGED}.
10870      *
10871      * <p>After using {@link #getConfig()} or {@link #getConfigForSubId(int)} an app should always
10872      * use this method to confirm whether any carrier specific configuration has been applied.
10873      * Especially when an app misses the broadcast {@link #ACTION_CARRIER_CONFIG_CHANGED} but it
10874      * still needs to get the current configuration, it must use this method to verify whether the
10875      * configuration is default or carrier overridden.
10876      *
10877      * @param bundle the configuration bundle to be checked.
10878      * @return boolean true if any carrier specific configuration bundle has been applied, false
10879      * otherwise or the bundle is null.
10880      */
isConfigForIdentifiedCarrier(PersistableBundle bundle)10881     public static boolean isConfigForIdentifiedCarrier(PersistableBundle bundle) {
10882         return bundle != null && bundle.getBoolean(KEY_CARRIER_CONFIG_APPLIED_BOOL);
10883     }
10884 
10885     /**
10886      * Calling this method triggers telephony services to fetch the current carrier configuration.
10887      *
10888      * <p>Normally this does not need to be called because the platform reloads config on its own.
10889      * This should be called by a carrier service app if it wants to update config at an arbitrary
10890      * moment.
10891      *
10892      * <p>Requires Permission:
10893      * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}, or the calling app
10894      * has carrier privileges (see {@link TelephonyManager#hasCarrierPrivileges()}).
10895      *
10896      * <p>This method returns before the reload has completed, and {@link
10897      * android.service.carrier.CarrierService#onLoadConfig} will be called from an arbitrary thread.
10898      */
10899     @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
10900     @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
notifyConfigChangedForSubId(int subId)10901     public void notifyConfigChangedForSubId(int subId) {
10902         try {
10903             ICarrierConfigLoader loader = getICarrierConfigLoader();
10904             if (loader == null) {
10905                 Rlog.w(TAG, "Error reloading config for subId=" + subId
10906                         + " ICarrierConfigLoader is null");
10907                 return;
10908             }
10909             loader.notifyConfigChangedForSubId(subId);
10910         } catch (RemoteException ex) {
10911             Rlog.e(TAG, "Error reloading config for subId=" + subId + ": " + ex);
10912         }
10913     }
10914 
10915     /**
10916      * Request the carrier config loader to update the config for phoneId.
10917      *
10918      * <p>Depending on simState, the config may be cleared or loaded from config app. This is only
10919      * used by SubscriptionInfoUpdater.
10920      *
10921      * @hide
10922      */
10923     @SystemApi
10924     @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
updateConfigForPhoneId(int phoneId, String simState)10925     public void updateConfigForPhoneId(int phoneId, String simState) {
10926         try {
10927             ICarrierConfigLoader loader = getICarrierConfigLoader();
10928             if (loader == null) {
10929                 Rlog.w(TAG, "Error updating config for phoneId=" + phoneId
10930                         + " ICarrierConfigLoader is null");
10931                 return;
10932             }
10933             loader.updateConfigForPhoneId(phoneId, simState);
10934         } catch (RemoteException ex) {
10935             Rlog.e(TAG, "Error updating config for phoneId=" + phoneId + ": " + ex);
10936         }
10937     }
10938 
10939     /**
10940      * Gets the package name for a default carrier service.
10941      * @return the package name for a default carrier service; empty string if not available.
10942      *
10943      * @hide
10944      */
10945     @NonNull
10946     @SystemApi
10947     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
getDefaultCarrierServicePackageName()10948     public String getDefaultCarrierServicePackageName() {
10949         try {
10950             ICarrierConfigLoader loader = getICarrierConfigLoader();
10951             if (loader == null) {
10952                 Rlog.w(TAG, "getDefaultCarrierServicePackageName ICarrierConfigLoader is null");
10953                 return "";
10954             }
10955             return loader.getDefaultCarrierServicePackageName();
10956         } catch (RemoteException ex) {
10957             Rlog.e(TAG, "getDefaultCarrierServicePackageName ICarrierConfigLoader is null" + ex);
10958             ex.rethrowAsRuntimeException();
10959         }
10960         return "";
10961     }
10962 
10963     /**
10964      * Returns a new bundle with the default value for every supported configuration variable.
10965      *
10966      * @hide
10967      */
10968     @NonNull
10969     @SystemApi
10970     @SuppressLint("RequiresPermission")
getDefaultConfig()10971     public static PersistableBundle getDefaultConfig() {
10972         return new PersistableBundle(sDefaults);
10973     }
10974 
10975     /** @hide */
10976     @Nullable
getICarrierConfigLoader()10977     private ICarrierConfigLoader getICarrierConfigLoader() {
10978         return ICarrierConfigLoader.Stub.asInterface(
10979                 TelephonyFrameworkInitializer
10980                         .getTelephonyServiceManager()
10981                         .getCarrierConfigServiceRegisterer()
10982                         .get());
10983     }
10984 
10985     /**
10986      * Gets the configuration values for a component using its prefix.
10987      *
10988      * <p>Requires Permission:
10989      * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}, or the calling app
10990      * has carrier privileges (see {@link TelephonyManager#hasCarrierPrivileges()}).
10991      *
10992      * @param prefix prefix of the component.
10993      * @param subId the subscription ID, normally obtained from {@link SubscriptionManager}.
10994      *
10995      * @see #getConfigForSubId
10996      */
10997     @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
10998     @RequiresPermission(Manifest.permission.READ_PHONE_STATE)
10999     @Nullable
getConfigByComponentForSubId(@onNull String prefix, int subId)11000     public PersistableBundle getConfigByComponentForSubId(@NonNull String prefix, int subId) {
11001         PersistableBundle configs = getConfigForSubId(subId);
11002 
11003         if (configs == null) {
11004             return null;
11005         }
11006 
11007         PersistableBundle ret = new PersistableBundle();
11008         for (String configKey : configs.keySet()) {
11009             if (configKey.startsWith(prefix)) {
11010                 addConfig(configKey, configs.get(configKey), ret);
11011             }
11012         }
11013 
11014         return ret;
11015     }
11016 
addConfig(String key, Object value, PersistableBundle configs)11017     private void addConfig(String key, Object value, PersistableBundle configs) {
11018         if (value instanceof String) {
11019             configs.putString(key, (String) value);
11020         } else if (value instanceof String[]) {
11021             configs.putStringArray(key, (String[]) value);
11022         } else if (value instanceof Integer) {
11023             configs.putInt(key, (Integer) value);
11024         } else if (value instanceof Long) {
11025             configs.putLong(key, (Long) value);
11026         } else if (value instanceof Double) {
11027             configs.putDouble(key, (Double) value);
11028         } else if (value instanceof Boolean) {
11029             configs.putBoolean(key, (Boolean) value);
11030         } else if (value instanceof int[]) {
11031             configs.putIntArray(key, (int[]) value);
11032         } else if (value instanceof double[]) {
11033             configs.putDoubleArray(key, (double[]) value);
11034         } else if (value instanceof boolean[]) {
11035             configs.putBooleanArray(key, (boolean[]) value);
11036         } else if (value instanceof long[]) {
11037             configs.putLongArray(key, (long[]) value);
11038         } else if (value instanceof PersistableBundle) {
11039             configs.putPersistableBundle(key, (PersistableBundle) value);
11040         }
11041     }
11042 
11043     /**
11044      * Listener interface to get a notification when the carrier configurations have changed.
11045      *
11046      * Use this listener to receive timely updates when the carrier configuration changes. System
11047      * components should prefer this listener over {@link #ACTION_CARRIER_CONFIG_CHANGED}
11048      * whenever possible.
11049      *
11050      * To register the listener, call
11051      * {@link #registerCarrierConfigChangeListener(Executor, CarrierConfigChangeListener)}.
11052      * To unregister, call
11053      * {@link #unregisterCarrierConfigChangeListener(CarrierConfigChangeListener)}.
11054      *
11055      * Note that on registration, registrants will NOT receive a notification on last carrier config
11056      * change. Only carrier configs change AFTER the registration will be sent to registrants. And
11057      * unlike {@link #ACTION_CARRIER_CONFIG_CHANGED}, notification wouldn't send when the device is
11058      * unlocked. Registrants only receive the notification when there has been real carrier config
11059      * changes.
11060      *
11061      * @see #registerCarrierConfigChangeListener(Executor, CarrierConfigChangeListener)
11062      * @see #unregisterCarrierConfigChangeListener(CarrierConfigChangeListener)
11063      * @see #ACTION_CARRIER_CONFIG_CHANGED
11064      * @see #getConfig(String...)
11065      * @see #getConfigForSubId(int, String...)
11066      */
11067     public interface CarrierConfigChangeListener {
11068         /**
11069          * Called when carrier configurations have changed.
11070          *
11071          * @param logicalSlotIndex  The logical SIM slot index on which to monitor and get
11072          *                          notification. It is guaranteed to be valid.
11073          * @param subscriptionId    The subscription on the SIM slot. May be
11074          *                          {@link SubscriptionManager#INVALID_SUBSCRIPTION_ID}.
11075          * @param carrierId         The optional carrier Id, may be
11076          *                          {@link TelephonyManager#UNKNOWN_CARRIER_ID}.
11077          *                          See {@link TelephonyManager#getSimCarrierId()}.
11078          * @param specificCarrierId The optional fine-grained carrierId, may be {@link
11079          *                          TelephonyManager#UNKNOWN_CARRIER_ID}. A specific carrierId may
11080          *                          be different from the carrierId above in a MVNO scenario. See
11081          *                          detail in {@link TelephonyManager#getSimSpecificCarrierId()}.
11082          */
onCarrierConfigChanged(int logicalSlotIndex, int subscriptionId, int carrierId, int specificCarrierId)11083         void onCarrierConfigChanged(int logicalSlotIndex, int subscriptionId, int carrierId,
11084                 int specificCarrierId);
11085     }
11086 
11087     /**
11088      * Register a {@link CarrierConfigChangeListener} to get a notification when carrier
11089      * configurations have changed.
11090      *
11091      * @param executor The executor on which the listener will be called.
11092      * @param listener The CarrierConfigChangeListener called when carrier configs has changed.
11093      */
registerCarrierConfigChangeListener(@onNull @allbackExecutor Executor executor, @NonNull CarrierConfigChangeListener listener)11094     public void registerCarrierConfigChangeListener(@NonNull @CallbackExecutor Executor executor,
11095             @NonNull CarrierConfigChangeListener listener) {
11096         Objects.requireNonNull(executor, "Executor should be non-null.");
11097         Objects.requireNonNull(listener, "Listener should be non-null.");
11098 
11099         TelephonyRegistryManager trm = mContext.getSystemService(TelephonyRegistryManager.class);
11100         if (trm == null) {
11101             throw new IllegalStateException("Telephony registry service is null");
11102         }
11103         trm.addCarrierConfigChangedListener(executor, listener);
11104     }
11105 
11106     /**
11107      * Unregister the {@link CarrierConfigChangeListener} to stop notification on carrier
11108      * configurations change.
11109      *
11110      * @param listener The CarrierConfigChangeListener which was registered with method
11111      * {@link #registerCarrierConfigChangeListener(Executor, CarrierConfigChangeListener)}.
11112      */
unregisterCarrierConfigChangeListener( @onNull CarrierConfigChangeListener listener)11113     public void unregisterCarrierConfigChangeListener(
11114             @NonNull CarrierConfigChangeListener listener) {
11115         Objects.requireNonNull(listener, "Listener should be non-null.");
11116 
11117         TelephonyRegistryManager trm = mContext.getSystemService(TelephonyRegistryManager.class);
11118         if (trm == null) {
11119             throw new IllegalStateException("Telephony registry service is null");
11120         }
11121         trm.removeCarrierConfigChangedListener(listener);
11122     }
11123 
11124     /**
11125      * Get subset of specified carrier configuration if available or empty bundle, without throwing
11126      * {@link RuntimeException} to caller.
11127      *
11128      * <p>This is a system internally used only utility to reduce the repetitive logic.
11129      *
11130      * <p>Requires Permission:
11131      * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}, or the calling app
11132      * has carrier privileges on the specified subscription (see
11133      * {@link TelephonyManager#hasCarrierPrivileges()}).
11134      *
11135      * @param context Context used to get the CarrierConfigManager service.
11136      * @param subId The subscription ID to get the config from.
11137      * @param keys The config keys the client is interested in.
11138      * @return Config bundle with key/value for the specified keys or empty bundle when failed
11139      * @hide
11140      */
11141     @RequiresPermission(anyOf = {
11142             Manifest.permission.READ_PHONE_STATE,
11143             "carrier privileges",
11144     })
11145     @NonNull
getCarrierConfigSubset( @onNull Context context, int subId, @NonNull String... keys)11146     public static PersistableBundle getCarrierConfigSubset(
11147             @NonNull Context context, int subId, @NonNull String... keys) {
11148         PersistableBundle configs = null;
11149         CarrierConfigManager ccm = context.getSystemService(CarrierConfigManager.class);
11150         try {
11151             configs = ccm.getConfigForSubId(subId, keys);
11152         } catch (RuntimeException exception) {
11153             Rlog.w(TAG, "CarrierConfigLoader is not available.");
11154         }
11155         return configs != null ? configs : new PersistableBundle();
11156     }
11157 }
11158