WifiManagerTest: Set key mgmt field in testWifiManagerNetWork
By default |allowedKeyMgmt| is set to WPA_PSK, however the |preSharedKey| is not set for this WifiConfiguration. So, the new |validate| method added in ag/2339612, will reject the network update (rightly so, because it's an invalid configuration). So, set the key mgmt to |NONE| to indicate that this is an open network and hence does not need the |preSharedKey| field. Bug: 62418044 Test: Failing test passes now. Change-Id: If979b909f2fb7d7b4e2626b57eff407ba6a019ab
This commit is contained in:
@@ -385,6 +385,7 @@ public class WifiManagerTest extends AndroidTestCase {
|
||||
|
||||
wifiConfiguration = new WifiConfiguration();
|
||||
wifiConfiguration.SSID = SSID1;
|
||||
wifiConfiguration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
|
||||
int netId = mWifiManager.addNetwork(wifiConfiguration);
|
||||
assertTrue(existSSID(SSID1));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user