From 8744fc01dd532c6431bd6e53046fa3ec6257cd23 Mon Sep 17 00:00:00 2001 From: danielwbhuang Date: Tue, 2 Mar 2021 18:30:05 +0800 Subject: [PATCH] Add configs for IMS Service Entitlement. 1. KEY_FCM_SENDER_ID_STRING 2. KEY_SHOW_VOWIFI_WEBVIEW_BOOL 3. KEY_IMS_PROVISIONING_BOOL Bug: 181634035 Test: make. Change-Id: Ife460f3bb4ec71bbce66733dd4a0049c4ab3a2a9 --- core/api/current.txt | 3 ++ .../telephony/CarrierConfigManager.java | 53 ++++++++++++++++++- 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/core/api/current.txt b/core/api/current.txt index 709032bb94eaa..bb9899c90f6e3 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -40461,7 +40461,10 @@ package android.telephony { public static final class CarrierConfigManager.ImsServiceEntitlement { field public static final String KEY_ENTITLEMENT_SERVER_URL_STRING = "imsserviceentitlement.entitlement_server_url_string"; + field public static final String KEY_FCM_SENDER_ID_STRING = "imsserviceentitlement.fcm_sender_id_string"; + field public static final String KEY_IMS_PROVISIONING_BOOL = "imsserviceentitlement.ims_provisioning_bool"; field public static final String KEY_PREFIX = "imsserviceentitlement."; + field public static final String KEY_SHOW_VOWIFI_WEBVIEW_BOOL = "imsserviceentitlement.show_vowifi_webview_bool"; } public static final class CarrierConfigManager.Iwlan { diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index b52f49190679f..e2279fc38c4a4 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -3676,13 +3676,64 @@ public class CarrierConfigManager { /** Prefix of all ImsServiceEntitlement.KEY_* constants. */ public static final String KEY_PREFIX = "imsserviceentitlement."; - /** The address of the entitlement configuration server. */ + /** + * The address of the entitlement configuration server. + * + * Reference: GSMA TS.43-v5, section 2.1 Default Entitlement Configuration Server. + */ public static final String KEY_ENTITLEMENT_SERVER_URL_STRING = KEY_PREFIX + "entitlement_server_url_string"; + /** + * For some carriers, end-users may be presented with a web portal of the carrier before + * being allowed to use the VoWiFi service. + * To support this feature, the app hosts a {@link android.webkit.WebView} in the foreground + * VoWiFi entitlement configuration flow to show the web portal. + * + * {@code true} - show the VoWiFi portal in a webview. + * + * Note: this is effective only if the {@link #KEY_WFC_EMERGENCY_ADDRESS_CARRIER_APP_STRING} + * is set to this app. + * + * Reference: GSMA TS.43-v5, section 3, VoWiFi entitlement configuration. + */ + public static final String KEY_SHOW_VOWIFI_WEBVIEW_BOOL = + KEY_PREFIX + "show_vowifi_webview_bool"; + + /** + * For some carriers, the network is not provisioned by default to support + * IMS (VoLTE/VoWiFi/SMSoIP) service for all end users. Some type of network-side + * provisioning must then take place before offering the IMS service to the end-user. + * + * {@code true} - need this ImsServiceEntitlement app to do IMS (VoLTE/VoWiFi/SMSoIP) + * provisioning in the background before offering the IMS service to the end-user. + * + * Note: this is effective only if the carrier needs IMS provisioning, i.e. + * {@link #KEY_CARRIER_VOLTE_PROVISIONING_REQUIRED_BOOL} is set to true. + * + * Reference: GSMA TS.43-v5, section 3 - 5, VoWiFi/VoLTE/SMSoIP entitlement configuration. + */ + public static final String KEY_IMS_PROVISIONING_BOOL = KEY_PREFIX + "ims_provisioning_bool"; + + /** + * The FCM sender ID for the carrier. + * Used to trigger a carrier network requested entitlement configuration + * via Firebase Cloud Messaging (FCM). Do not set if the carrier doesn't use FCM for network + * requested entitlement configuration. + * + * Reference: GSMA TS.43-v5, section 2.4, Network Requested Entitlement Configuration. + * + * @see + * About FCM messages - Credentials + */ + public static final String KEY_FCM_SENDER_ID_STRING = KEY_PREFIX + "fcm_sender_id_string"; + private static PersistableBundle getDefaults() { PersistableBundle defaults = new PersistableBundle(); defaults.putString(KEY_ENTITLEMENT_SERVER_URL_STRING, ""); + defaults.putString(KEY_FCM_SENDER_ID_STRING, ""); + defaults.putBoolean(KEY_SHOW_VOWIFI_WEBVIEW_BOOL, false); + defaults.putBoolean(KEY_IMS_PROVISIONING_BOOL, false); return defaults; } }