packages/apps/Settings: Add logic and strings to support WPA3 and OWE
Add and update Wi-Fi security strings, and add logic to enable WPA3 and OWE. Modified WPA2-PSK to WPA2-Personal, and added WPA3-Personal, Enhanced Open and WPA3-Enterprise. Bug: 112195778 Test: Basic functional tests Change-Id: Ia97761a7f0a9e2fee768dfaf3578a2f1090d29c6
This commit is contained in:
@@ -66,7 +66,7 @@ public class WifiTetherSecurityPreferenceControllerTest {
|
||||
public void onPreferenceChange_securityValueUpdated() {
|
||||
mController.onPreferenceChange(mPreference, WPA2_PSK);
|
||||
assertThat(mController.getSecurityType()).isEqualTo(WifiConfiguration.KeyMgmt.WPA2_PSK);
|
||||
assertThat(mPreference.getSummary()).isEqualTo("WPA2 PSK");
|
||||
assertThat(mPreference.getSummary()).isEqualTo("WPA2-Personal");
|
||||
|
||||
mController.onPreferenceChange(mPreference, NONE);
|
||||
assertThat(mController.getSecurityType()).isEqualTo(WifiConfiguration.KeyMgmt.NONE);
|
||||
@@ -75,11 +75,11 @@ public class WifiTetherSecurityPreferenceControllerTest {
|
||||
|
||||
@Test
|
||||
public void updateDisplay_preferenceUpdated() {
|
||||
// test defaulting to WPA2 PSK on new config
|
||||
// test defaulting to WPA2-Personal on new config
|
||||
when(mWifiManager.getWifiApConfiguration()).thenReturn(null);
|
||||
mController.updateDisplay();
|
||||
assertThat(mController.getSecurityType()).isEqualTo(WifiConfiguration.KeyMgmt.WPA2_PSK);
|
||||
assertThat(mPreference.getSummary()).isEqualTo("WPA2 PSK");
|
||||
assertThat(mPreference.getSummary()).isEqualTo("WPA2-Personal");
|
||||
|
||||
// test open tether network
|
||||
when(mWifiManager.getWifiApConfiguration()).thenReturn(mConfig);
|
||||
@@ -89,11 +89,11 @@ public class WifiTetherSecurityPreferenceControllerTest {
|
||||
assertThat(mController.getSecurityType()).isEqualTo(WifiConfiguration.KeyMgmt.NONE);
|
||||
assertThat(mPreference.getSummary()).isEqualTo("None");
|
||||
|
||||
// test WPA2 PSK tether network
|
||||
// test WPA2-Personal tether network
|
||||
mConfig.allowedKeyManagement.clear();
|
||||
mConfig.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA2_PSK);
|
||||
mController.updateDisplay();
|
||||
assertThat(mController.getSecurityType()).isEqualTo(WifiConfiguration.KeyMgmt.WPA2_PSK);
|
||||
assertThat(mPreference.getSummary()).isEqualTo("WPA2 PSK");
|
||||
assertThat(mPreference.getSummary()).isEqualTo("WPA2-Personal");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user