Android CarrierConfigManager和CarrierService

将运营商 ID 与 CarrierConfig 集成
从 Android 10 开始,运营商配置支持将运营商 ID 用作密钥,从 CarrierService 获取运营商专属配置。

将运营商 ID 与 CarrierConfig 集成具有以下优势:

将每个运营商的所有 MCC/MNC 对整合到一个位置,从而移除重复或不一致的数据。
为每个运营商创建规范标识符并消除歧义。

允许使用单个 ID 标识移动虚拟网络运营商 (MVNO),而不是将配置作为移动网络运营商 (MNO) 的一部分。

final CarrierConfigManager configManager = (CarrierConfigManager) mContext.getSystemService(Context.CARRIER_CONFIG_SERVICE);

PersistableBundle b = configManager.getConfig();
b.putBoolean(KEY_PREFER_2G_BOOL, false);

b.putBoolean(KEY_DISPLAY_HD_AUDIO_PROPERTY_BOOL, true);

v4.putBoolean(“prefer_2g_bool”, false);
v4.putBoolean(“carrier_settings_enable_bool”, true);
v4.putBoolean(“carrier_allow_turnoff_ims_bool”, false);
v4.putBoolean(“carrier_wfc_ims_available_bool”, true);
v4.putBoolean(“display_hd_audio_property_bool”, true);
v4.putBoolean(“editable_enhanced_4g_lte_bool”, true);
v4.putBoolean(“carrier_volte_available_bool”, true);
v4.putBoolean(“carrier_volte_provisioning_required_bool”, false);
v4.putBoolean(“carrier_volte_provisioned_bool”, true);
v4.putBoolean(“carrier_vt_available_bool”, true);
v4.putBoolean(“carrier_volte_tty_supported_bool”, false);
v4.putBoolean(“hide_enhanced_4g_lte_bool”, false);
v4.putBoolean(“carrier_wfc_supports_wifi_only_bool”, true);
v4.putBoolean(“allow_adding_apns_bool”, true);
v4.putBoolean(“apn_expand_bool”, true);
v4.putBoolean(“carrier_ims_gba_required_bool”, false);
v4.putBoolean(“require_entitlement_checks_bool”, false);
v4.putBoolean(“hide_ims_apn_bool”, false);
v4.putInt(“volte_replacement_rat_int”, 0);
v4.putBoolean(“carrier_use_ims_first_for_emergency_bool”, true);
v4.putBoolean(“auto_retry_enabled_bool”, true);
v4.putBoolean(“world_phone_bool”, true);
v4.putBoolean(“carrier_ut_provisioning_required_bool”, false);
v4.putBoolean(“carrier_supports_ss_over_ut_bool”, false);
v4.putBoolean(“carrier_volte_default_enabled_bool”, true);
v4.putBoolean(“show_ims_registration_status_bool”, true);
v4.putBoolean(“support_manage_ims_conference_call_bool”, true);
v4.putBoolean(“support_ims_conference_call_bool”, true);
v4.putBoolean(“support_video_conference_call_bool”, true);
v4.putBoolean(“enhanced_4g_lte_on_by_default_bool”, true);
v4.putBoolean(“editable_wfc_mode_bool”, true);
v4.putBoolean(“emergency_sms_support_bool”, false);
v4.putBoolean(“notify_handover_video_from_wifi_to_lte_bool”, true);
v4.putBoolean(“notify_handover_video_from_lte_to_wifi_bool”, true);
v4.putBoolean(“support_downgrade_vt_to_audio_bool”, true);
v4.putInt(“carrier_default_wfc_ims_mode_int”, 1);
v4.putInt(“carrier_default_wfc_ims_roaming_mode_int”, 1);
v4.putBoolean(“carrier_default_wfc_ims_enabled_bool”, true);
v4.putBoolean(“carrier_default_wfc_ims_roaming_enabled_bool”, true);
v4.putBoolean(“carrier_promote_wfc_on_call_fail_bool”, true);
v4.putBoolean(“carrier_volte_override_wfc_provisioning_bool”, true);
v4.putBoolean(“allow_emergency_video_calls_bool”, false);
v4.putBoolean(“editable_wfc_roaming_mode_bool”, true);
v4.putBoolean(“carrier_config_applied_bool”, true);
v4.putStringArray(“carrier_wlan_disallowed_apn_types_string_array”, new String[]{“”});
v4.putStringArray(“carrier_wwan_disallowed_apn_types_string_array”, new String[]{“”});
v4.putBoolean(“hide_preset_apn_details_bool”, false);
v4.putStringArray(“read_only_apn_types_string_array”, new String[]{“”});
v4.putStringArray(“read_only_apn_fields_string_array”, new String[]{“”});
v4.putStringArray(“apn_settings_default_apn_types_string_array”, new String[]{“”});

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注