summaryrefslogtreecommitdiffstats
path: root/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
diff options
context:
space:
mode:
authorRebecca Silberstein <silberst@google.com>2017-01-07 01:42:51 -0800
committerRebecca Silberstein <silberst@google.com>2017-01-12 17:51:40 +0000
commitf826a412709e7e30bd993440fa8174596cc384e7 (patch)
treea0b16e145e835bbdb3dcf835d6a5e9db51270291 /tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
parent50f36ec6fe906445db996bf3918e5cb3f170bc79 (diff)
downloadandroid_frameworks_opt_net_wifi-f826a412709e7e30bd993440fa8174596cc384e7.tar.gz
android_frameworks_opt_net_wifi-f826a412709e7e30bd993440fa8174596cc384e7.tar.bz2
android_frameworks_opt_net_wifi-f826a412709e7e30bd993440fa8174596cc384e7.zip
WifiStateMachine: remove service dependence
The constructor for WifiStateMachine currently depends on other wifi related services starting in a particular order (ex, p2p starting before wifi service). This CL removes this dependence and delays retrieval of other services until after the boot complete command. Setting the local WifiApConfigStore variable is also moved to the constructor for consistency with other locally stored state. This CL additionally alters the WifiStateMachineTest to send a different message to test log rec sizes when verbose logging settings are changed (this set of tests seems out of place for WSM, but this CL is not meant to address that problem). Bug: 34137732 Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh Test: frameworks/base/wifi/tests/runtests.sh Test: manually tested wifi connection Test: manually checked for Wifi Direct peers Change-Id: I50fcc378bbbcc98ab833a01b9dd6c044c5f85e3d
Diffstat (limited to 'tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java b/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
index 349f26983..5fb6513f4 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
@@ -837,7 +837,7 @@ public class WifiStateMachineTest {
@Test
public void normalLogRecSizeIsUsedByDefault() {
for (int i = 0; i < WifiStateMachine.NUM_LOG_RECS_NORMAL * 2; i++) {
- mWsm.sendMessage(WifiStateMachine.CMD_BOOT_COMPLETED);
+ mWsm.sendMessage(WifiStateMachine.CMD_DISCONNECT);
}
mLooper.dispatchAll();
assertEquals(WifiStateMachine.NUM_LOG_RECS_NORMAL, mWsm.getLogRecSize());
@@ -851,7 +851,7 @@ public class WifiStateMachineTest {
assertTrue(LOG_REC_LIMIT_IN_VERBOSE_MODE > WifiStateMachine.NUM_LOG_RECS_NORMAL);
mWsm.enableVerboseLogging(1);
for (int i = 0; i < LOG_REC_LIMIT_IN_VERBOSE_MODE * 2; i++) {
- mWsm.sendMessage(WifiStateMachine.CMD_BOOT_COMPLETED);
+ mWsm.sendMessage(WifiStateMachine.CMD_DISCONNECT);
}
mLooper.dispatchAll();
assertEquals(LOG_REC_LIMIT_IN_VERBOSE_MODE, mWsm.getLogRecSize());
@@ -865,7 +865,7 @@ public class WifiStateMachineTest {
public void disablingVerboseLoggingClearsRecordsAndDecreasesLogRecSize() {
mWsm.enableVerboseLogging(1);
for (int i = 0; i < LOG_REC_LIMIT_IN_VERBOSE_MODE; i++) {
- mWsm.sendMessage(WifiStateMachine.CMD_BOOT_COMPLETED);
+ mWsm.sendMessage(WifiStateMachine.CMD_DISCONNECT);
}
mLooper.dispatchAll();
assertEquals(LOG_REC_LIMIT_IN_VERBOSE_MODE, mWsm.getLogRecSize());
@@ -873,7 +873,7 @@ public class WifiStateMachineTest {
mWsm.enableVerboseLogging(0);
assertEquals(0, mWsm.getLogRecSize());
for (int i = 0; i < LOG_REC_LIMIT_IN_VERBOSE_MODE; i++) {
- mWsm.sendMessage(WifiStateMachine.CMD_BOOT_COMPLETED);
+ mWsm.sendMessage(WifiStateMachine.CMD_DISCONNECT);
}
mLooper.dispatchAll();
assertEquals(WifiStateMachine.NUM_LOG_RECS_NORMAL, mWsm.getLogRecSize());