diff options
author | lesl <lesl@google.com> | 2020-06-19 17:47:13 +0800 |
---|---|---|
committer | lesl <lesl@google.com> | 2020-06-19 20:56:52 +0800 |
commit | 231eea1a1d10e0e23b4a86241b2464c4c36cd7f1 (patch) | |
tree | 9d398d50a644d6de5ff42a7323e86b61854dd985 /tests | |
parent | bb47b319352980ed1f65336cece756707ccc7e1b (diff) |
wifi: Add new overlay to control reset channel config.
The device might not support SAP channel customization (UI)
or forced channel might not work in some countries.
Add overlay to let OEM to decide to reset it during cloud restore.
Note: Default will reset channel configuration
Bug: 159325231
Test: atest FrameworksWifiTests
Change-Id: Id9db5bca469a98c555223c26ad9b37ead7389f9e
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiApConfigStoreTest.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiApConfigStoreTest.java b/tests/wifitests/src/com/android/server/wifi/WifiApConfigStoreTest.java index 50fd4d8c1..bc646c1eb 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiApConfigStoreTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiApConfigStoreTest.java @@ -661,16 +661,21 @@ public class WifiApConfigStoreTest extends WifiBaseTest { public void testResetToDefaultForUnsupportedConfig() throws Exception { mResources.setBoolean(R.bool.config_wifiSofapClientForceDisconnectSupported, false); mResources.setBoolean(R.bool.config_wifi_softap_sae_supported, false); + mResources.setBoolean(R.bool.config_wifiSoftapResetChannelConfig, true); SoftApConfiguration sae_config = new SoftApConfiguration.Builder() .setPassphrase("secretsecret", SoftApConfiguration.SECURITY_TYPE_WPA3_SAE) .setMaxNumberOfClients(10) .setClientControlByUserEnabled(true) + .setChannel(149, SoftApConfiguration.BAND_5GHZ) .build(); WifiApConfigStore store = createWifiApConfigStore(); SoftApConfiguration resetedConfig = store.resetToDefaultForUnsupportedConfig(sae_config); assertEquals(resetedConfig.getMaxNumberOfClients(), 0); assertFalse(resetedConfig.isClientControlByUserEnabled()); + assertEquals(resetedConfig.getChannel(), 0); + assertEquals(resetedConfig.getBand(), + SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ); verify(mWifiMetrics).noteSoftApConfigReset(sae_config, resetedConfig); } |