diff options
| author | 2018-09-24 17:45:23 +0200 | |
|---|---|---|
| committer | 2018-10-19 09:03:17 +0000 | |
| commit | a765a470506928cf4d20284da46e9cd3bfbfdf7c (patch) | |
| tree | c1aa0617ac013cf23c6b11eb4355e7d55e70dc76 | |
| parent | 2417859fa5322ee8238d1650e39c6a950eac3710 (diff) | |
Add possibility to configure SPN during Wi-Fi Calling and Flight mode
Adds carrier config setting KEY_WFC_FLIGHT_MODE_SPN_FORMAT_IDX_INT
which controls the spn text when flight mode is enabled and
Wi-Fi Calling is registred.
Expands wfcSpnFormats with more options, in order to add suitable
options without %s during flight mode.
Four new options are added in this patch. The list of available options
becomes:
0: %s
1: %s Wi-Fi Calling
2: WLAN Call>
3: %s WLAN Call
4: %s Wi-Fi
5: WiFi Calling | %s
6: %s VoWifi
7: Wi-Fi Calling (New)
8: Wi-Fi (New)
9: WiFi Calling (New)
10: VoWifi (New)
Bug: 117953115
Test: Manual
Change-Id: Icf4e0214d52599d850c20e4cf7841b06862386fe
| -rw-r--r-- | core/res/res/values/strings.xml | 12 | ||||
| -rw-r--r-- | telephony/java/android/telephony/CarrierConfigManager.java | 39 |
2 files changed, 42 insertions, 9 deletions
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 2549dd0ed3b0..67f767887b84 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -248,6 +248,10 @@ <item>@string/wfcSpnFormat_spn_wifi</item> <item>@string/wfcSpnFormat_wifi_calling_bar_spn</item> <item>@string/wfcSpnFormat_spn_vowifi</item> + <item>@string/wfcSpnFormat_wifi_calling</item> + <item>@string/wfcSpnFormat_wifi</item> + <item>@string/wfcSpnFormat_wifi_calling_wo_hyphen</item> + <item>@string/wfcSpnFormat_vowifi</item> </string-array> <!-- Spn during Wi-Fi Calling: "<operator>" --> @@ -264,6 +268,14 @@ <string name="wfcSpnFormat_wifi_calling_bar_spn">WiFi Calling | <xliff:g id="spn" example="Operator">%s</xliff:g></string> <!-- Spn during Wi-Fi Calling: "<operator> VoWifi" --> <string name="wfcSpnFormat_spn_vowifi"><xliff:g id="spn" example="Operator">%s</xliff:g> VoWifi</string> + <!-- Spn during Wi-Fi Calling: "Wi-Fi Calling" --> + <string name="wfcSpnFormat_wifi_calling">Wi-Fi Calling</string> + <!-- Spn during Wi-Fi Calling: "Wi-Fi" --> + <string name="wfcSpnFormat_wifi">Wi-Fi</string> + <!-- Spn during Wi-Fi Calling: "WiFi Calling" (without hyphen) --> + <string name="wfcSpnFormat_wifi_calling_wo_hyphen">WiFi Calling</string> + <!-- Spn during Wi-Fi Calling: "VoWifi" --> + <string name="wfcSpnFormat_vowifi">VoWifi</string> <!-- WFC, summary for Disabled --> <string name="wifi_calling_off_summary">Off</string> diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 8bc5dfddd818..ec5af5b8b561 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -1077,24 +1077,44 @@ public class CarrierConfigManager { "wfc_operator_error_codes_string_array"; /** - * Indexes of SPN format strings in wfcSpnFormats and wfcDataSpnFormats. + * Indexes of SPN format strings in wfcSpnFormats. * * <p>Available options are: * <ul> - * <li> 0: %s</li> - * <li> 1: %s Wi-Fi Calling</li> - * <li> 2: WLAN Call</li> - * <li> 3: %s WLAN Call</li> - * <li> 4: %s Wi-Fi</li> - * <li> 5: WiFi Calling | %s</li> - * <li> 6: %s VoWifi</li> + * <li> 0: %s</li> + * <li> 1: %s Wi-Fi Calling</li> + * <li> 2: WLAN Call</li> + * <li> 3: %s WLAN Call</li> + * <li> 4: %s Wi-Fi</li> + * <li> 5: WiFi Calling | %s</li> + * <li> 6: %s VoWifi</li> + * <li> 7: Wi-Fi Calling</li> + * <li> 8: Wi-Fi</li> + * <li> 9: WiFi Calling</li> + * <li> 10: VoWifi</li> * @hide */ public static final String KEY_WFC_SPN_FORMAT_IDX_INT = "wfc_spn_format_idx_int"; - /** @hide */ + + /** + * Indexes of data SPN format strings in wfcSpnFormats. + * + * @see KEY_WFC_SPN_FORMAT_IDX_INT for available options. + * @hide + */ public static final String KEY_WFC_DATA_SPN_FORMAT_IDX_INT = "wfc_data_spn_format_idx_int"; /** + * Indexes of SPN format strings in wfcSpnFormats used during flight mode. + * + * Set to -1 to use the value from KEY_WFC_SPN_FORMAT_IDX_INT also in this case. + * @see KEY_WFC_SPN_FORMAT_IDX_INT for other available options. + * @hide + */ + public static final String KEY_WFC_FLIGHT_MODE_SPN_FORMAT_IDX_INT = + "wfc_flight_mode_spn_format_idx_int"; + + /** * Use root locale when reading wfcSpnFormats. * * If true, then the root locale will always be used when reading wfcSpnFormats. This means the @@ -2362,6 +2382,7 @@ public class CarrierConfigManager { sDefaults.putStringArray(KEY_WFC_OPERATOR_ERROR_CODES_STRING_ARRAY, null); sDefaults.putInt(KEY_WFC_SPN_FORMAT_IDX_INT, 0); sDefaults.putInt(KEY_WFC_DATA_SPN_FORMAT_IDX_INT, 0); + sDefaults.putInt(KEY_WFC_FLIGHT_MODE_SPN_FORMAT_IDX_INT, -1); sDefaults.putBoolean(KEY_WFC_SPN_USE_ROOT_LOCALE, false); sDefaults.putString(KEY_WFC_EMERGENCY_ADDRESS_CARRIER_APP_STRING, ""); sDefaults.putBoolean(KEY_CONFIG_WIFI_DISABLE_IN_ECBM, false); |