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

Commit e58b23df authored by Jimi Chen's avatar Jimi Chen
Browse files

Add a key for displaying avoid bad Wi-Fi setting from carrier config

This change introduces a new key in the carrier configuration to decide
if the device's UI should present the "avoid bad Wi-Fi" option.

Flag: android.net.platform.flags.avoid_bad_wifi_from_carrier_config
Bug: 410976315
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.MultinetworkPolicyTrackerTest
Test: atest CtsNetTestCases:android.net.cts.ConnectivityManagerTest
Change-Id: Idcf49509c9e0c6cfc44fc4dc3bf70fe36b3d5309
parent 1baceb4c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -45329,6 +45329,7 @@ package android.telephony {
    field public static final String KEY_SHOW_4G_FOR_3G_DATA_ICON_BOOL = "show_4g_for_3g_data_icon_bool";
    field public static final String KEY_SHOW_4G_FOR_LTE_DATA_ICON_BOOL = "show_4g_for_lte_data_icon_bool";
    field @Deprecated @FlaggedApi("com.android.internal.telephony.flags.deprecate_cdma") public static final String KEY_SHOW_APN_SETTING_CDMA_BOOL = "show_apn_setting_cdma_bool";
    field @FlaggedApi("android.net.platform.flags.avoid_bad_wifi_from_carrier_config") public static final String KEY_SHOW_AVOID_BAD_WIFI_TOGGLE_BOOL = "show_avoid_bad_wifi_bool";
    field public static final String KEY_SHOW_BLOCKING_PAY_PHONE_OPTION_BOOL = "show_blocking_pay_phone_option_bool";
    field public static final String KEY_SHOW_CALL_BLOCKING_DISABLED_NOTIFICATION_ALWAYS_BOOL = "show_call_blocking_disabled_notification_always_bool";
    field @Deprecated @FlaggedApi("com.android.internal.telephony.flags.deprecate_cdma") public static final String KEY_SHOW_CDMA_CHOICES_BOOL = "show_cdma_choices_bool";
+11 −0
Original line number Diff line number Diff line
@@ -10732,6 +10732,16 @@ public class CarrierConfigManager {
    public static final String KEY_AVOID_BAD_WIFI_BOOL =
            "avoid_bad_wifi_bool";
    /**
     * Used to decide if the device's UI should present the "avoid bad Wi-Fi" from carrier config.
     * This method effectively enables or disables the display of the relevant setting toggle.
     * This is only used if KEY_AVOID_BAD_WIFI_BOOL is true.
     * When KEY_AVOID_BAD_WIFI_BOOL is false, the setting is always shown even if this is false.
     */
    @FlaggedApi(FLAG_AVOID_BAD_WIFI_FROM_CARRIER_CONFIG)
    public static final String KEY_SHOW_AVOID_BAD_WIFI_TOGGLE_BOOL =
            "show_avoid_bad_wifi_bool";
    /** The default value for every variable. */
    private static final PersistableBundle sDefaults;
@@ -11568,6 +11578,7 @@ public class CarrierConfigManager {
        sDefaults.putInt(KEY_SATELLITE_SOS_MAX_DATAGRAM_SIZE_BYTES_INT, 255);
        if (avoidBadWifiFromCarrierConfig()) {
            sDefaults.putBoolean(KEY_AVOID_BAD_WIFI_BOOL, true);
            sDefaults.putBoolean(KEY_SHOW_AVOID_BAD_WIFI_TOGGLE_BOOL, false);
        }
    }