Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a765a470 authored by Torbjorn Eklund's avatar Torbjorn Eklund
Browse files

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
parent 2417859f
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -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>
+30 −9
Original line number Diff line number Diff line
@@ -1077,7 +1077,7 @@ 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>
@@ -1088,12 +1088,32 @@ public class CarrierConfigManager {
     * <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.
     *
@@ -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);