summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2017-03-24 11:36:10 -0700
committerRoshan Pius <rpius@google.com>2017-03-27 10:15:21 -0700
commitcdd56a55709407c9efe2a24b4ed25666e2e8318e (patch)
treecf0349058b2d38f876dd318bb0ecb615f8576065 /tests
parent790a767cc340069ce4d8f76410889199c1beaf01 (diff)
WSM: Reconnect on network credential change
Currently, we ignore connect request if we're already connected to the same network. This is not correct for network modifications. Hence, trigger a reconnect in this case. Changes in the CL: 1. Add a new |hasCredentialChanged| param in NetworkUpdateResult. 2. Use that in WSM to determine if we need to trigger a reconnect. While there, Removed a couple of unused setters in NetworkUpdateResult. Fixed WifiConfigManager unit test failure due to mockito change. Bug: 36505419 Bug: 36020928 Test: Unit tests and manual tests via settings UI. Test: Will send for regression tests. Change-Id: I1adaac58108c2f65fb36173a468dff000f5372c8
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java
index 615f61190..951f8e114 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java
@@ -1325,6 +1325,7 @@ public class WifiConfigManagerTest {
mWifiConfigManager.getConfiguredNetwork(result.getNetworkId());
assertTrue("Updating network non-credentials config should not clear hasEverConnected.",
retrievedNetwork.getNetworkSelectionStatus().getHasEverConnected());
+ assertFalse(result.hasCredentialChanged());
}
/**
@@ -3790,6 +3791,7 @@ public class WifiConfigManagerTest {
mWifiConfigManager.getConfiguredNetwork(result.getNetworkId());
assertFalse("Updating network credentials config should clear hasEverConnected.",
retrievedNetwork.getNetworkSelectionStatus().getHasEverConnected());
+ assertTrue(result.hasCredentialChanged());
}
/**