This repository has been archived by the owner on Nov 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
/
CarrierConfigManager.java
11394 lines (10326 loc) · 522 KB
/
CarrierConfigManager.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright (C) 2015 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.telephony;
import android.Manifest;
import android.annotation.CallbackExecutor;
import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresFeature;
import android.annotation.RequiresPermission;
import android.annotation.SuppressAutoDoc;
import android.annotation.SuppressLint;
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.PackageManager;
import android.net.NetworkCapabilities;
import android.net.ipsec.ike.SaProposal;
import android.os.Build;
import android.os.Handler;
import android.os.PersistableBundle;
import android.os.RemoteException;
import android.service.carrier.CarrierService;
import android.telecom.TelecomManager;
import android.telephony.AccessNetworkConstants.AccessNetworkType;
import android.telephony.data.ApnSetting;
import android.telephony.gba.TlsParams;
import android.telephony.gba.UaSecurityProtocolIdentifier;
import android.telephony.ims.ImsReasonInfo;
import android.telephony.ims.ImsRegistrationAttributes;
import android.telephony.ims.ImsSsData;
import android.telephony.ims.MediaQualityStatus;
import android.telephony.ims.RcsUceAdapter;
import android.telephony.ims.feature.MmTelFeature;
import android.telephony.ims.feature.RcsFeature;
import com.android.internal.telephony.ICarrierConfigLoader;
import com.android.internal.telephony.flags.Flags;
import com.android.telephony.Rlog;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.Executor;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
/**
* Provides access to telephony configuration values that are carrier-specific.
*/
@SystemService(Context.CARRIER_CONFIG_SERVICE)
@RequiresFeature(PackageManager.FEATURE_TELEPHONY_SUBSCRIPTION)
public class CarrierConfigManager {
private static final String TAG = "CarrierConfigManager";
/**
* Extra included in {@link #ACTION_CARRIER_CONFIG_CHANGED} to indicate the slot index that the
* broadcast is for.
*/
public static final String EXTRA_SLOT_INDEX = "android.telephony.extra.SLOT_INDEX";
/**
* {@link #ACTION_CARRIER_CONFIG_CHANGED} is broadcast once on device bootup and then again when
* the device is unlocked. Direct-Boot-aware applications may use the first broadcast as an
* early signal that the carrier config has been loaded, but other applications will only
* receive the second broadcast, when the device is unlocked.
*
* This extra is included in {@link #ACTION_CARRIER_CONFIG_CHANGED} to indicate whether this is
* a rebroadcast on unlock.
*/
public static final String EXTRA_REBROADCAST_ON_UNLOCK =
"android.telephony.extra.REBROADCAST_ON_UNLOCK";
/**
* Optional extra included in {@link #ACTION_CARRIER_CONFIG_CHANGED} to indicate the
* subscription index that the broadcast is for, if a valid one is available.
*/
public static final String EXTRA_SUBSCRIPTION_INDEX =
SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX;
/**
* Service class flag if no specific service class is specified.
* Reference: 3GPP TS 27.007 Section 7.4 Facility lock +CLCK
*/
public static final int SERVICE_CLASS_NONE = ImsSsData.SERVICE_CLASS_NONE;
/**
* Service class flag for voice telephony.
* Reference: 3GPP TS 27.007 Section 7.4 Facility lock +CLCK
*/
public static final int SERVICE_CLASS_VOICE = ImsSsData.SERVICE_CLASS_VOICE;
/**
* Only send USSD over IMS while CS is out of service, otherwise send USSD over CS.
* {@link #KEY_CARRIER_USSD_METHOD_INT}
*/
public static final int USSD_OVER_CS_PREFERRED = 0;
/**
* Send USSD over IMS or CS while IMS is out of service or silent redial over CS if needed.
* {@link #KEY_CARRIER_USSD_METHOD_INT}
*/
public static final int USSD_OVER_IMS_PREFERRED = 1;
/**
* Only send USSD over CS.
* {@link #KEY_CARRIER_USSD_METHOD_INT}
*/
public static final int USSD_OVER_CS_ONLY = 2;
/**
* Only send USSD over IMS and disallow silent redial over CS.
* {@link #KEY_CARRIER_USSD_METHOD_INT}
*/
public static final int USSD_OVER_IMS_ONLY = 3;
/**
* Indicates CARRIER_NR_AVAILABILITY_NSA determine that the carrier enable the non-standalone
* (NSA) mode of 5G NR.
*/
public static final int CARRIER_NR_AVAILABILITY_NSA = 1;
/**
* Indicates CARRIER_NR_AVAILABILITY_SA determine that the carrier enable the standalone (SA)
* mode of 5G NR.
*/
public static final int CARRIER_NR_AVAILABILITY_SA = 2;
private final Context mContext;
/**
* @hide
*/
public CarrierConfigManager(Context context) {
mContext = context;
}
/**
* This intent is broadcast by the system when carrier config changes. An int is specified in
* {@link #EXTRA_SLOT_INDEX} to indicate the slot index that this is for. An optional int extra
* {@link #EXTRA_SUBSCRIPTION_INDEX} is included to indicate the subscription index if a valid
* one is available for the slot index. An optional int extra
* {@link TelephonyManager#EXTRA_CARRIER_ID} is included to indicate the carrier id for the
* changed carrier configuration. An optional int extra
* {@link TelephonyManager#EXTRA_SPECIFIC_CARRIER_ID} is included to indicate the precise
* carrier id for the changed carrier configuration.
* @see TelephonyManager#getSimCarrierId()
* @see TelephonyManager#getSimSpecificCarrierId()
*/
public static final String ACTION_CARRIER_CONFIG_CHANGED =
"android.telephony.action.CARRIER_CONFIG_CHANGED";
// Below are the keys used in carrier config bundles. To add a new variable, define the key and
// give it a default value in sDefaults. If you need to ship a per-network override in the
// system image, that can be added in packages/apps/CarrierConfig.
/**
* Specifies a value that identifies the version of the carrier configuration that is
* currently in use. This string is displayed on the UI.
* The format of the string is not specified.
*/
public static final String KEY_CARRIER_CONFIG_VERSION_STRING =
"carrier_config_version_string";
/**
* This flag specifies whether VoLTE availability is based on provisioning. By default this is
* false.
* Used for UCE to determine if EAB provisioning checks should be based on provisioning.
* @deprecated Use {@link Ims#KEY_CARRIER_RCS_PROVISIONING_REQUIRED_BOOL} instead.
*/
@Deprecated
public static final String KEY_CARRIER_VOLTE_PROVISIONED_BOOL =
"carrier_volte_provisioned_bool";
/**
* Boolean indicating the Supplementary Services(SS) is disable when airplane mode on in the
* Call Settings menu.
* {@code true}: SS is disable when airplane mode on.
* {@code false}: SS is enable when airplane mode on.
* The default value for this key is {@code false}
*/
public static final String KEY_DISABLE_SUPPLEMENTARY_SERVICES_IN_AIRPLANE_MODE_BOOL =
"disable_supplementary_services_in_airplane_mode_bool";
/**
* Boolean indicating if the "Call forwarding" item is visible in the Call Settings menu.
* true means visible. false means gone.
* @hide
*/
public static final String KEY_CALL_FORWARDING_VISIBILITY_BOOL =
"call_forwarding_visibility_bool";
/**
* Boolean indicating if carrier supports call forwarding option "When unreachable".
*
* {@code true}: Call forwarding option "When unreachable" is supported.
* {@code false}: Call forwarding option "When unreachable" is not supported. Option will be
* removed in the UI.
*
* By default this value is true.
* @hide
*/
public static final String KEY_CALL_FORWARDING_WHEN_UNREACHABLE_SUPPORTED_BOOL =
"call_forwarding_when_unreachable_supported_bool";
/**
* Boolean indicating if carrier supports call forwarding option "When unanswered".
*
* {@code true}: Call forwarding option "When unanswered" is supported.
* {@code false}: Call forwarding option "When unanswered" is not supported. Option will be
* removed in the UI.
*
* By default this value is true.
* @hide
*/
public static final String KEY_CALL_FORWARDING_WHEN_UNANSWERED_SUPPORTED_BOOL =
"call_forwarding_when_unanswered_supported_bool";
/**
* Boolean indicating if carrier supports call forwarding option "When busy".
*
* {@code true}: Call forwarding option "When busy" is supported.
* {@code false}: Call forwarding option "When busy" is not supported. Option will be
* removed in the UI.
*
* By default this value is true.
* @hide
*/
public static final String KEY_CALL_FORWARDING_WHEN_BUSY_SUPPORTED_BOOL =
"call_forwarding_when_busy_supported_bool";
/**
* Boolean indicating if the "Caller ID" item is visible in the Additional Settings menu.
* true means visible. false means gone.
*
* The default value is true.
*/
@FlaggedApi(Flags.FLAG_SHOW_CALL_ID_AND_CALL_WAITING_IN_ADDITIONAL_SETTINGS_MENU)
public static final String KEY_ADDITIONAL_SETTINGS_CALLER_ID_VISIBILITY_BOOL =
"additional_settings_caller_id_visibility_bool";
/**
* Boolean indicating if the "Call Waiting" item is visible in the Additional Settings menu.
* true means visible. false means gone.
*
* The default value is true.
*/
@FlaggedApi(Flags.FLAG_SHOW_CALL_ID_AND_CALL_WAITING_IN_ADDITIONAL_SETTINGS_MENU)
public static final String KEY_ADDITIONAL_SETTINGS_CALL_WAITING_VISIBILITY_BOOL =
"additional_settings_call_waiting_visibility_bool";
/**
* Boolean indicating if the "Call barring" item is visible in the Call Settings menu.
* If true, the "Call Barring" menu will be visible. If false, the menu will be gone.
*
* Disabled by default.
*/
public static final String KEY_CALL_BARRING_VISIBILITY_BOOL =
"call_barring_visibility_bool";
/**
* Flag indicating whether or not changing the call barring password via the "Call Barring"
* settings menu is supported. If true, the option will be visible in the "Call
* Barring" settings menu. If false, the option will not be visible.
*
* Enabled by default.
*/
public static final String KEY_CALL_BARRING_SUPPORTS_PASSWORD_CHANGE_BOOL =
"call_barring_supports_password_change_bool";
/**
* Flag indicating whether or not deactivating all call barring features via the "Call Barring"
* settings menu is supported. If true, the option will be visible in the "Call
* Barring" settings menu. If false, the option will not be visible.
*
* Enabled by default.
*/
public static final String KEY_CALL_BARRING_SUPPORTS_DEACTIVATE_ALL_BOOL =
"call_barring_supports_deactivate_all_bool";
/**
* Specifies the service class for call barring service. Default value is
* {@link #SERVICE_CLASS_VOICE}.
* The value set as below:
* <ul>
* <li>0: {@link #SERVICE_CLASS_NONE}</li>
* <li>1: {@link #SERVICE_CLASS_VOICE}</li>
* </ul>
*/
public static final String KEY_CALL_BARRING_DEFAULT_SERVICE_CLASS_INT =
"call_barring_default_service_class_int";
/**
* This carrier supports dialing USSD codes to enable/disable supplementary services such as
* call forwarding and call waiting over CDMA.
* <p>
* The supplementary service menu will still need to be set as visible, see
* {@link #KEY_CALL_FORWARDING_VISIBILITY_BOOL} and
* {@link #KEY_ADDITIONAL_SETTINGS_CALL_WAITING_VISIBILITY_BOOL}.
* <p>
* If this is set as false and the supplementary service menu is visible, the associated setting
* will be enabled and disabled based on the availability of supplementary services over UT. See
* {@link #KEY_CARRIER_SUPPORTS_SS_OVER_UT_BOOL}.
* @hide
*/
public static final String KEY_SUPPORT_SS_OVER_CDMA_BOOL = "support_ss_over_cdma_bool";
/**
* Flag indicating whether the Phone app should ignore EVENT_SIM_NETWORK_LOCKED
* events from the Sim.
* If true, this will prevent the IccNetworkDepersonalizationPanel from being shown, and
* effectively disable the "Sim network lock" feature.
*/
public static final String KEY_IGNORE_SIM_NETWORK_LOCKED_EVENTS_BOOL =
"ignore_sim_network_locked_events_bool";
/**
* When checking if a given number is the voicemail number, if this flag is true
* then in addition to comparing the given number to the voicemail number, we also compare it
* to the mdn. If this flag is false, the given number is only compared to the voicemail number.
* By default this value is false.
*/
public static final String KEY_MDN_IS_ADDITIONAL_VOICEMAIL_NUMBER_BOOL =
"mdn_is_additional_voicemail_number_bool";
/**
* Flag indicating whether the Phone app should provide a "Dismiss" button on the SIM network
* unlock screen. The default value is true. If set to false, there will be *no way* to dismiss
* the SIM network unlock screen if you don't enter the correct unlock code. (One important
* consequence: there will be no way to make an Emergency Call if your SIM is network-locked and
* you don't know the PIN.)
*/
public static final String KEY_SIM_NETWORK_UNLOCK_ALLOW_DISMISS_BOOL =
"sim_network_unlock_allow_dismiss_bool";
/**
* Flag indicating whether or not sending emergency SMS messages over IMS
* is supported when in LTE/limited LTE (Emergency only) service mode..
*/
public static final String KEY_SUPPORT_EMERGENCY_SMS_OVER_IMS_BOOL =
"support_emergency_sms_over_ims_bool";
/** Flag indicating if the phone is a world phone */
public static final String KEY_WORLD_PHONE_BOOL = "world_phone_bool";
/**
* Flag to require or skip entitlement checks.
* If true, entitlement checks will be executed if device has been configured for it,
* If false, entitlement checks will be skipped.
*/
public static final String KEY_REQUIRE_ENTITLEMENT_CHECKS_BOOL =
"require_entitlement_checks_bool";
/**
* Flag indicating if the carrier supports tethering of mobile data.
*/
public static final String KEY_CARRIER_SUPPORTS_TETHERING_BOOL =
"carrier_supports_tethering_bool";
/**
* Flag indicating whether radio is to be restarted on error PDP_FAIL_REGULAR_DEACTIVATION
* This is false by default.
*
* @deprecated Use {@link #KEY_RADIO_RESTART_FAILURE_CAUSES_INT_ARRAY} instead
*/
@Deprecated
public static final String KEY_RESTART_RADIO_ON_PDP_FAIL_REGULAR_DEACTIVATION_BOOL =
"restart_radio_on_pdp_fail_regular_deactivation_bool";
/**
* A list of failure cause codes that will trigger a modem restart when telephony receiving
* one of those during data setup. The cause codes are defined in 3GPP TS 24.008 Annex I and
* TS 24.301 Annex B.
*/
public static final String KEY_RADIO_RESTART_FAILURE_CAUSES_INT_ARRAY =
"radio_restart_failure_causes_int_array";
/**
* If true, enable vibration (haptic feedback) for key presses in the EmergencyDialer activity.
* The pattern is set on a per-platform basis using config_virtualKeyVibePattern. To be
* consistent with the regular Dialer, this value should agree with the corresponding values
* from config.xml under apps/Contacts.
*/
public static final String KEY_ENABLE_DIALER_KEY_VIBRATION_BOOL =
"enable_dialer_key_vibration_bool";
/** Flag indicating if dtmf tone type is enabled */
public static final String KEY_DTMF_TYPE_ENABLED_BOOL = "dtmf_type_enabled_bool";
/** Flag indicating if auto retry is enabled */
public static final String KEY_AUTO_RETRY_ENABLED_BOOL = "auto_retry_enabled_bool";
/**
* Determine whether we want to play local DTMF tones in a call, or just let the radio/BP handle
* playing of the tones.
*/
public static final String KEY_ALLOW_LOCAL_DTMF_TONES_BOOL = "allow_local_dtmf_tones_bool";
/**
* Determines if the carrier requires that a tone be played to the remote party when an app is
* recording audio during a call (e.g. using a call recording app).
* <p>
* Note: This requires the Telephony config_supports_telephony_audio_device overlay to be true
* in order to work.
* @hide
*/
public static final String KEY_PLAY_CALL_RECORDING_TONE_BOOL = "play_call_recording_tone_bool";
/**
* Determines if the carrier requires converting the destination number before sending out an
* SMS. Certain networks and numbering plans require different formats.
*/
public static final String KEY_SMS_REQUIRES_DESTINATION_NUMBER_CONVERSION_BOOL =
"sms_requires_destination_number_conversion_bool";
/**
* If true, show an onscreen "Dial" button in the dialer. In practice this is used on all
* platforms, even the ones with hard SEND/END keys, but for maximum flexibility it's controlled
* by a flag here (which can be overridden on a per-product basis.)
*/
public static final String KEY_SHOW_ONSCREEN_DIAL_BUTTON_BOOL =
"show_onscreen_dial_button_bool";
/** Determines if device implements a noise suppression device for in call audio. */
public static final String
KEY_HAS_IN_CALL_NOISE_SUPPRESSION_BOOL = "has_in_call_noise_suppression_bool";
/**
* Determines if the current device should allow emergency numbers to be logged in the Call Log.
* (Some carriers require that emergency calls *not* be logged, presumably to avoid the risk of
* accidental redialing from the call log UI. This is a good idea, so the default here is
* false.)
*/
public static final String KEY_ALLOW_EMERGENCY_NUMBERS_IN_CALL_LOG_BOOL =
"allow_emergency_numbers_in_call_log_bool";
/**
* A string array containing numbers that shouldn't be included in the call log.
*/
public static final String KEY_UNLOGGABLE_NUMBERS_STRING_ARRAY =
"unloggable_numbers_string_array";
/** If true, removes the Voice Privacy option from Call Settings */
public static final String KEY_VOICE_PRIVACY_DISABLE_UI_BOOL = "voice_privacy_disable_ui_bool";
/** Control whether users can reach the carrier portions of Cellular Network Settings. */
public static final String
KEY_HIDE_CARRIER_NETWORK_SETTINGS_BOOL = "hide_carrier_network_settings_bool";
/**
* Only allow auto selection in Advanced Network Settings when in home network.
* Manual selection is allowed when in roaming network.
*/
public static final String KEY_ONLY_AUTO_SELECT_IN_HOME_NETWORK_BOOL =
"only_auto_select_in_home_network";
/**
* Flag indicating whether to show single operator row in the choose network setting.
*
* The device configuration value {@code config_enableNewAutoSelectNetworkUI} ultimately
* controls whether this carrier configuration option is used.
* Where {@code config_enableNewAutoSelectNetworkUI} is false, the value of this
* carrier configuration is ignored.
*
* If {@code true}, default value, merge the duplicate networks which with the same plmn, keep
* the one that with the higher signal strength level.
* If {@code false}, show all operators without merging.
* @hide
*/
public static final String KEY_SHOW_SINGLE_OPERATOR_ROW_IN_CHOOSE_NETWORK_SETTING_BOOL =
"show_single_operator_row_in_choose_network_setting_bool";
/**
* Flag indicating whether to display SPN as network name for home network in choose
* network setting.
*
* If {@code true}, display SPN as network name in choose network setting.
* If {@code false}, display PLMN in choose network setting.
* @hide
*/
public static final String KEY_SHOW_SPN_FOR_HOME_IN_CHOOSE_NETWORK_SETTING_BOOL =
"show_spn_for_home_in_choose_network_setting_bool";
/**
* Control whether users receive a simplified network settings UI and improved network
* selection.
*
* @deprecated Never implemented. Has no behavior impact when override. DO NOT USE.
*/
@Deprecated
public static final String KEY_SIMPLIFIED_NETWORK_SETTINGS_BOOL =
"simplified_network_settings_bool";
/** Control whether users can reach the SIM lock settings. */
public static final String KEY_HIDE_SIM_LOCK_SETTINGS_BOOL = "hide_sim_lock_settings_bool";
/** Control whether users can edit APNs in Settings. */
public static final String KEY_APN_EXPAND_BOOL = "apn_expand_bool";
/** Control whether users can choose a network operator. */
public static final String KEY_OPERATOR_SELECTION_EXPAND_BOOL =
"operator_selection_expand_bool";
/**
* Used in the Preferred Network Types menu to determine if the 2G option is displayed.
* Value defaults to false as of Android T to discourage the use of insecure 2G protocols.
*/
public static final String KEY_PREFER_2G_BOOL = "prefer_2g_bool";
/**
* Used in Cellular Network Settings for preferred network type to show 4G only mode.
* @hide
*/
public static final String KEY_4G_ONLY_BOOL = "4g_only_bool";
/** Show cdma network mode choices 1x, 3G, global etc. */
public static final String KEY_SHOW_CDMA_CHOICES_BOOL = "show_cdma_choices_bool";
/** CDMA activation goes through HFA */
public static final String KEY_USE_HFA_FOR_PROVISIONING_BOOL = "use_hfa_for_provisioning_bool";
/**
* CDMA activation goes through OTASP.
*/
// TODO: This should be combined with config_use_hfa_for_provisioning and implemented as an enum
// (NONE, HFA, OTASP).
public static final String KEY_USE_OTASP_FOR_PROVISIONING_BOOL =
"use_otasp_for_provisioning_bool";
/** Display carrier settings menu if true */
public static final String KEY_CARRIER_SETTINGS_ENABLE_BOOL = "carrier_settings_enable_bool";
/** Does not display additional call setting for IMS phone based on GSM Phone */
public static final String KEY_ADDITIONAL_CALL_SETTING_BOOL = "additional_call_setting_bool";
/** Show APN Settings for some CDMA carriers */
public static final String KEY_SHOW_APN_SETTING_CDMA_BOOL = "show_apn_setting_cdma_bool";
/** After a CDMA conference call is merged, the swap button should be displayed. */
public static final String KEY_SUPPORT_SWAP_AFTER_MERGE_BOOL = "support_swap_after_merge_bool";
/**
* Determine whether user can edit voicemail number in Settings.
*/
public static final String KEY_EDITABLE_VOICEMAIL_NUMBER_SETTING_BOOL =
"editable_voicemail_number_setting_bool";
/**
* Since the default voicemail number is empty, if a SIM card does not have a voicemail number
* available the user cannot use voicemail. This flag allows the user to edit the voicemail
* number in such cases, and is false by default.
*/
public static final String KEY_EDITABLE_VOICEMAIL_NUMBER_BOOL =
"editable_voicemail_number_bool";
/**
* Determine whether the voicemail number in Settings is hidden.
* @hide
*/
public static final String KEY_HIDE_VOICEMAIL_NUMBER_SETTING_BOOL =
"hide_voicemail_number_setting_bool";
/**
* Determine whether the voicemail notification is persistent in the notification bar. If true,
* the voicemail notifications cannot be dismissed from the notification bar.
*/
public static final String KEY_VOICEMAIL_NOTIFICATION_PERSISTENT_BOOL =
"voicemail_notification_persistent_bool";
/** For IMS video over LTE calls, determines whether video pause signalling is supported. */
public static final String KEY_SUPPORT_PAUSE_IMS_VIDEO_CALLS_BOOL =
"support_pause_ims_video_calls_bool";
/**
* Disables dialing "*228" (OTASP provisioning) on CDMA carriers where it is not supported or is
* potentially harmful by locking the SIM to 3G.
*/
public static final String KEY_DISABLE_CDMA_ACTIVATION_CODE_BOOL =
"disable_cdma_activation_code_bool";
/**
* List of network type constants which support only a single data connection at a time.
* Some carriers do not support multiple PDP on UMTS.
* @see TelephonyManager NETWORK_TYPE_*
* @see #KEY_ONLY_SINGLE_DC_ALLOWED_INT_ARRAY
*/
public static final String KEY_ONLY_SINGLE_DC_ALLOWED_INT_ARRAY =
"only_single_dc_allowed_int_array";
/**
* Only apply if {@link #KEY_ONLY_SINGLE_DC_ALLOWED_INT_ARRAY} specifies the network types that
* support a single data connection at a time. This key defines a list of network capabilities
* which, if requested, will exempt the request from single data connection checks.
* @see NetworkCapabilities NET_CAPABILITY_*
*/
public static final String KEY_CAPABILITIES_EXEMPT_FROM_SINGLE_DC_CHECK_INT_ARRAY =
"capabilities_exempt_from_single_dc_check_int_array";
/**
* Override the platform's notion of a network operator being considered roaming.
* Value is string array of MCCMNCs to be considered roaming for 3GPP RATs.
*/
public static final String KEY_GSM_ROAMING_NETWORKS_STRING_ARRAY =
"gsm_roaming_networks_string_array";
/**
* Override the platform's notion of a network operator being considered not roaming.
* Value is string array of MCCMNCs to be considered not roaming for 3GPP RATs.
*/
public static final String KEY_GSM_NONROAMING_NETWORKS_STRING_ARRAY =
"gsm_nonroaming_networks_string_array";
/**
* The package name containing the ImsService that will be bound to the telephony framework to
* support both IMS MMTEL and RCS feature functionality instead of the device default
* ImsService for this subscription.
* @deprecated Use {@link #KEY_CONFIG_IMS_MMTEL_PACKAGE_OVERRIDE_STRING} and
* {@link #KEY_CONFIG_IMS_RCS_PACKAGE_OVERRIDE_STRING} instead to configure these values
* separately. If any of those values are not empty, they will override this value.
*/
@Deprecated
public static final String KEY_CONFIG_IMS_PACKAGE_OVERRIDE_STRING =
"config_ims_package_override_string";
/**
* The package name containing the ImsService that will be bound to the telephony framework to
* support IMS MMTEL feature functionality instead of the device default ImsService for this
* subscription.
*/
public static final String KEY_CONFIG_IMS_MMTEL_PACKAGE_OVERRIDE_STRING =
"config_ims_mmtel_package_override_string";
/**
* The package name containing the ImsService that will be bound to the telephony framework to
* support IMS RCS feature functionality instead of the device default ImsService for this
* subscription.
*/
public static final String KEY_CONFIG_IMS_RCS_PACKAGE_OVERRIDE_STRING =
"config_ims_rcs_package_override_string";
/**
* Override the package that will manage {@link SubscriptionPlan}
* information instead of the {@link CarrierService} that defines this
* value.
*
* @see SubscriptionManager#getSubscriptionPlans(int)
* @see SubscriptionManager#setSubscriptionPlans(int, java.util.List)
*/
public static final String KEY_CONFIG_PLANS_PACKAGE_OVERRIDE_STRING =
"config_plans_package_override_string";
/**
* Override the platform's notion of a network operator being considered roaming.
* Value is string array of SIDs to be considered roaming for 3GPP2 RATs.
*/
public static final String
KEY_CDMA_ROAMING_NETWORKS_STRING_ARRAY = "cdma_roaming_networks_string_array";
/**
* Override the platform's notion of a network operator being considered non roaming.
* Value is string array of SIDs to be considered not roaming for 3GPP2 RATs.
*/
public static final String
KEY_CDMA_NONROAMING_NETWORKS_STRING_ARRAY = "cdma_nonroaming_networks_string_array";
/**
* Override the platform's notion of a network operator being considered non roaming.
* If true all networks are considered as home network a.k.a. non-roaming. When false,
* the 2 pairs of CMDA and GSM roaming/non-roaming arrays are consulted.
*
* @see #KEY_GSM_ROAMING_NETWORKS_STRING_ARRAY
* @see #KEY_GSM_NONROAMING_NETWORKS_STRING_ARRAY
* @see #KEY_CDMA_ROAMING_NETWORKS_STRING_ARRAY
* @see #KEY_CDMA_NONROAMING_NETWORKS_STRING_ARRAY
*/
public static final String
KEY_FORCE_HOME_NETWORK_BOOL = "force_home_network_bool";
/**
* Flag specifying whether VoLTE should be available for carrier, independent of carrier
* provisioning. If false: hard disabled. If true: then depends on carrier provisioning,
* availability, etc.
*/
public static final String KEY_CARRIER_VOLTE_AVAILABLE_BOOL = "carrier_volte_available_bool";
/**
* Flag specifying whether video telephony is available for carrier. If false: hard disabled.
* If true: then depends on carrier provisioning, availability, etc.
*/
public static final String KEY_CARRIER_VT_AVAILABLE_BOOL = "carrier_vt_available_bool";
/**
* Specify the method of selection for UE sending USSD requests. The default value is
* {@link #USSD_OVER_CS_PREFERRED}.
* <p> Available options:
* <ul>
* <li>0: {@link #USSD_OVER_CS_PREFERRED} </li>
* <li>1: {@link #USSD_OVER_IMS_PREFERRED} </li>
* <li>2: {@link #USSD_OVER_CS_ONLY} </li>
* <li>3: {@link #USSD_OVER_IMS_ONLY} </li>
* </ul>
*/
public static final String KEY_CARRIER_USSD_METHOD_INT = "carrier_ussd_method_int";
/**
* Flag specifying whether to show an alert dialog for 5G disable when the user disables VoLTE.
* By default this value is {@code false}.
*
* @hide
*/
public static final String KEY_VOLTE_5G_LIMITED_ALERT_DIALOG_BOOL =
"volte_5g_limited_alert_dialog_bool";
/**
* Flag specifying whether the carrier wants to notify the user when a VT call has been handed
* over from WIFI to LTE.
* <p>
* The handover notification is sent as a
* {@link TelephonyManager#EVENT_HANDOVER_VIDEO_FROM_WIFI_TO_LTE}
* {@link android.telecom.Connection} event, which an {@link android.telecom.InCallService}
* should use to trigger the display of a user-facing message.
* <p>
* The Connection event is sent to the InCallService only once, the first time it occurs.
* @hide
*/
public static final String KEY_NOTIFY_HANDOVER_VIDEO_FROM_WIFI_TO_LTE_BOOL =
"notify_handover_video_from_wifi_to_lte_bool";
/**
* Flag specifying whether the carrier supports merging a RTT call with a voice call,
* downgrading the call in the process.
* @hide
*/
public static final String KEY_ALLOW_MERGING_RTT_CALLS_BOOL = "allow_merging_rtt_calls_bool";
/**
* Flag specifying whether the carrier wants to notify the user when a VT call has been handed
* over from LTE to WIFI.
* <p>
* The handover notification is sent as a
* {@link TelephonyManager#EVENT_HANDOVER_VIDEO_FROM_LTE_TO_WIFI}
* {@link android.telecom.Connection} event, which an {@link android.telecom.InCallService}
* should use to trigger the display of a user-facing message.
* @hide
*/
public static final String KEY_NOTIFY_HANDOVER_VIDEO_FROM_LTE_TO_WIFI_BOOL =
"notify_handover_video_from_lte_to_wifi_bool";
/**
* Flag specifying whether the carrier supports downgrading a video call (tx, rx or tx/rx)
* directly to an audio call.
* @hide
*/
public static final String KEY_SUPPORT_DOWNGRADE_VT_TO_AUDIO_BOOL =
"support_downgrade_vt_to_audio_bool";
/**
* Where there is no preloaded voicemail number on a SIM card, specifies the carrier's default
* voicemail number.
* When empty string, no default voicemail number is specified.
*/
public static final String KEY_DEFAULT_VM_NUMBER_STRING = "default_vm_number_string";
/**
* Where there is no preloaded voicemail number on a SIM card, specifies the carrier's default
* voicemail number for roaming network.
* When empty string, no default voicemail number is specified for roaming network.
* @hide
*/
public static final String KEY_DEFAULT_VM_NUMBER_ROAMING_STRING =
"default_vm_number_roaming_string";
/**
* Where there is no preloaded voicemail number on a SIM card, specifies the carrier's default
* voicemail number while the device is both roaming and not registered for IMS.
* When empty string, no default voicemail number is specified for roaming network and
* unregistered state in IMS.
*/
public static final String KEY_DEFAULT_VM_NUMBER_ROAMING_AND_IMS_UNREGISTERED_STRING =
"default_vm_number_roaming_and_ims_unregistered_string";
/**
* Flag that specifies to use the user's own phone number as the voicemail number when there is
* no pre-loaded voicemail number on the SIM card.
* <p>
* {@link #KEY_DEFAULT_VM_NUMBER_STRING} takes precedence over this flag.
* <p>
* If false, the system default (*86) will be used instead.
*/
public static final String KEY_CONFIG_TELEPHONY_USE_OWN_NUMBER_FOR_VOICEMAIL_BOOL =
"config_telephony_use_own_number_for_voicemail_bool";
/**
* When {@code true}, changes to the mobile data enabled switch will not cause the VT
* registration state to change. That is, turning on or off mobile data will not cause VT to be
* enabled or disabled.
* When {@code false}, disabling mobile data will cause VT to be de-registered.
*/
public static final String KEY_IGNORE_DATA_ENABLED_CHANGED_FOR_VIDEO_CALLS =
"ignore_data_enabled_changed_for_video_calls";
/**
* Flag indicating whether data used for a video call over LTE is metered or not.
* <p>
* When {@code true}, if the device hits the data limit or data is disabled during a ViLTE call,
* the call will be downgraded to audio-only (or paused if
* {@link #KEY_SUPPORT_PAUSE_IMS_VIDEO_CALLS_BOOL} is {@code true}).
*
* @hide
*/
public static final String KEY_VILTE_DATA_IS_METERED_BOOL = "vilte_data_is_metered_bool";
/**
* Flag specifying whether WFC over IMS should be available for carrier: independent of
* carrier provisioning. If false: hard disabled. If true: then depends on carrier
* provisioning, availability etc.
*/
public static final String KEY_CARRIER_WFC_IMS_AVAILABLE_BOOL =
"carrier_wfc_ims_available_bool";
/**
* Flag specifying whether Cross SIM over IMS should be available for carrier.
* When {@code false} the carrier does not support cross SIM calling.
* When {@code true} the carrier does support cross sim calling, where available
*/
public static final String KEY_CARRIER_CROSS_SIM_IMS_AVAILABLE_BOOL =
"carrier_cross_sim_ims_available_bool";
/**
* Flag specifying whether cross sim calling on opportunistic data is supported for carrier.
* When {@code false} the carrier does not support cross sim calling on opportunistic data.
* When {@code true} the carrier does support cross sim calling on opportunistic data.
*/
public static final String KEY_ENABLE_CROSS_SIM_CALLING_ON_OPPORTUNISTIC_DATA_BOOL =
"enable_cross_sim_calling_on_opportunistic_data_bool";
/**
* Specifies a map from dialstrings to replacements for roaming network service numbers which
* cannot be replaced on the carrier side.
* <p>
* Individual entries have the format:
* [dialstring to replace]:[replacement]
*/
public static final String KEY_DIAL_STRING_REPLACE_STRING_ARRAY =
"dial_string_replace_string_array";
/**
* Specifies a map from dialstrings to replacements for international roaming network service
* numbers which cannot be replaced on the carrier side.
* <p>
* Individual entries have the format:
* [dialstring to replace]:[replacement]
* @hide
*/
public static final String KEY_INTERNATIONAL_ROAMING_DIAL_STRING_REPLACE_STRING_ARRAY =
"international_roaming_dial_string_replace_string_array";
/**
* Flag specifying whether WFC over IMS supports the "wifi only" option. If false, the wifi
* calling settings will not include an option for "wifi only". If true, the wifi calling
* settings will include an option for "wifi only"
* <p>
* By default, it is assumed that WFC supports "wifi only".
*/
public static final String KEY_CARRIER_WFC_SUPPORTS_WIFI_ONLY_BOOL =
"carrier_wfc_supports_wifi_only_bool";
/**
* Default mode for WFC over IMS on home network:
* <ul>
* <li>0: Wi-Fi only
* <li>1: prefer mobile network
* <li>2: prefer Wi-Fi
* </ul>
*/
public static final String KEY_CARRIER_DEFAULT_WFC_IMS_MODE_INT =
"carrier_default_wfc_ims_mode_int";
/**
* Default mode for WFC over IMS on roaming network.
* See {@link #KEY_CARRIER_DEFAULT_WFC_IMS_MODE_INT} for meaning of values.
*/
public static final String KEY_CARRIER_DEFAULT_WFC_IMS_ROAMING_MODE_INT =
"carrier_default_wfc_ims_roaming_mode_int";
/**
* Default WFC_IMS_enabled: true VoWiFi by default is on
* false VoWiFi by default is off
*/
public static final String KEY_CARRIER_DEFAULT_WFC_IMS_ENABLED_BOOL =
"carrier_default_wfc_ims_enabled_bool";
/**
* Default WFC_IMS_roaming_enabled: true VoWiFi roaming by default is on
* false VoWiFi roaming by default is off
* @hide
*/
public static final String KEY_CARRIER_DEFAULT_WFC_IMS_ROAMING_ENABLED_BOOL =
"carrier_default_wfc_ims_roaming_enabled_bool";
/**
* Flag indicating whether failed calls due to no service should prompt the user to enable
* WIFI calling. When {@code true}, if the user attempts to establish a call when there is no
* service available, they are connected to WIFI, and WIFI calling is disabled, a different
* call failure message will be used to encourage the user to enable WIFI calling.
* @hide
*/
public static final String KEY_CARRIER_PROMOTE_WFC_ON_CALL_FAIL_BOOL =
"carrier_promote_wfc_on_call_fail_bool";
/**
* Flag specifying whether provisioning is required for RCS.
*/
public static final String KEY_CARRIER_RCS_PROVISIONING_REQUIRED_BOOL =
"carrier_rcs_provisioning_required_bool";
/**
* Flag specifying whether provisioning is required for VoLTE, Video Telephony, and WiFi
* Calling.
* Combines VoLTE, VT, VoWiFI calling provisioning into one parameter.
* @deprecated Use {@link Ims#KEY_MMTEL_REQUIRES_PROVISIONING_BUNDLE} instead for
* finer-grained control.
* changing carrier_volte_provisioning_required_bool requires changes to
* mmtel_requires_provisioning_bundle and vice versa
* {@link Ims#KEY_MMTEL_REQUIRES_PROVISIONING_BUNDLE}
*/
@Deprecated
public static final String KEY_CARRIER_VOLTE_PROVISIONING_REQUIRED_BOOL =
"carrier_volte_provisioning_required_bool";
/**
* Flag indicating whether or not the IMS MmTel UT capability requires carrier provisioning
* before it can be set as enabled.
*
* If true, the UT capability will be set to false for the newly loaded subscription
* and will require the carrier provisioning app to set the persistent provisioning result.
* If false, the platform will not wait for provisioning status updates for the UT capability
* and enable the UT over IMS capability for the subscription when the subscription is loaded.
*
* The default value for this key is {@code false}.
*
* @deprecated Use {@link Ims#KEY_MMTEL_REQUIRES_PROVISIONING_BUNDLE} instead for
* determining if UT requires provisioning.
*/
@Deprecated
public static final String KEY_CARRIER_UT_PROVISIONING_REQUIRED_BOOL =
"carrier_ut_provisioning_required_bool";
/**
* Flag indicating whether or not the carrier supports Supplementary Services over the UT
* interface for this subscription.
*
* If true, the device will use Supplementary Services over UT when provisioned (see
* {@link #KEY_CARRIER_UT_PROVISIONING_REQUIRED_BOOL}). If false, this device will fallback to
* circuit switch for supplementary services and will disable this capability for IMS entirely.
*
* The default value for this key is {@code false}.
*/
public static final String KEY_CARRIER_SUPPORTS_SS_OVER_UT_BOOL =
"carrier_supports_ss_over_ut_bool";
/**
* Flag specifying if WFC provisioning depends on VoLTE provisioning.
*
* {@code false}: default value; honor actual WFC provisioning state.
* {@code true}: when VoLTE is not provisioned, treat WFC as not provisioned; when VoLTE is
* provisioned, honor actual WFC provisioning state.
*
* As of now, Verizon is the only carrier enforcing this dependency in their
* WFC awareness and activation requirements.
*/
public static final String KEY_CARRIER_VOLTE_OVERRIDE_WFC_PROVISIONING_BOOL =
"carrier_volte_override_wfc_provisioning_bool";
/**
* Override the device's configuration for the cellular data service to use for this SIM card.
* @hide
*/
public static final String KEY_CARRIER_DATA_SERVICE_WWAN_PACKAGE_OVERRIDE_STRING =
"carrier_data_service_wwan_package_override_string";
/**