From fb39c5de57023eb36741d39ffdff80593a13570c Mon Sep 17 00:00:00 2001 From: Quang Luong Date: Tue, 19 Jan 2021 11:30:58 -0800 Subject: [PATCH] [WifiCoex] Add carrier config flags for 5GHz Wifi/LAA coex Add carrier config flags to enable coex avoidance of 5GHz Wifi channels if LAA is active. Bug: 153651001 Test: build Change-Id: I83b2182a7ee22462fca49ac559ab2418d55b9b3f --- core/api/system-current.txt | 2 ++ .../android/telephony/CarrierConfigManager.java | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 5bb3e05170329..e09a397de610a 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -11039,6 +11039,8 @@ package android.telephony { } public static final class CarrierConfigManager.Wifi { + field public static final String KEY_AVOID_5GHZ_SOFTAP_FOR_LAA_BOOL = "wifi.avoid_5ghz_softap_for_laa_bool"; + field public static final String KEY_AVOID_5GHZ_WIFI_DIRECT_FOR_LAA_BOOL = "wifi.avoid_5ghz_wifi_direct_for_laa_bool"; field public static final String KEY_HOTSPOT_MAX_CLIENT_COUNT = "wifi.hotspot_maximum_client_count"; field public static final String KEY_PREFIX = "wifi."; field public static final String KEY_SUGGESTION_SSID_LIST_WITH_MAC_RANDOMIZATION_DISABLED = "wifi.suggestion_ssid_list_with_mac_randomization_disabled"; diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index ac584c175c59d..463197e165f2e 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -5335,11 +5335,28 @@ public class CarrierConfigManager { public static final String KEY_SUGGESTION_SSID_LIST_WITH_MAC_RANDOMIZATION_DISABLED = KEY_PREFIX + "suggestion_ssid_list_with_mac_randomization_disabled"; + /** + * Avoid SoftAp in 5GHz if cellular is on unlicensed 5Ghz using License Assisted Access + * (LAA). + */ + public static final String KEY_AVOID_5GHZ_SOFTAP_FOR_LAA_BOOL = + KEY_PREFIX + "avoid_5ghz_softap_for_laa_bool"; + + /** + * Avoid Wifi Direct in 5GHz if cellular is on unlicensed 5Ghz using License Assisted + * Access (LAA). + */ + public static final String KEY_AVOID_5GHZ_WIFI_DIRECT_FOR_LAA_BOOL = + KEY_PREFIX + "avoid_5ghz_wifi_direct_for_laa_bool"; + + private static PersistableBundle getDefaults() { PersistableBundle defaults = new PersistableBundle(); defaults.putInt(KEY_HOTSPOT_MAX_CLIENT_COUNT, 0); defaults.putStringArray(KEY_SUGGESTION_SSID_LIST_WITH_MAC_RANDOMIZATION_DISABLED, new String[0]); + defaults.putBoolean(KEY_AVOID_5GHZ_SOFTAP_FOR_LAA_BOOL, false); + defaults.putBoolean(KEY_AVOID_5GHZ_WIFI_DIRECT_FOR_LAA_BOOL, false); return defaults; }