summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorRebecca Silberstein <silberst@google.com>2016-08-05 11:55:39 -0700
committerRebecca Silberstein <silberst@google.com>2016-08-05 12:12:16 -0700
commit173dae04272c1b40488292f6392a922b4c4b2949 (patch)
tree472e2dee88771d1020c8dc19275f1603882ce860 /service
parent01dafe766c969517561dd9fd733ec475bc8eee5d (diff)
WifiStateMachine: update new mode in initial state
When WifiController calls setOperationalMode a CMD_SET_OPERATIONAL_MODE message is sent to WifiStateMachine. When this message is received in the InitialState, it is not handled where it is then dropped in the default state. Dropping this message causes WifiController and WifiStateMachine to get out of sync on the operating mode. BUG:29938263 Change-Id: I8481af8d6826f3da18f5762833a7b145d81b74dd TEST:runtest frameworks-wifi
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiStateMachine.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java
index 0e3ed542f..d89594f1f 100644
--- a/service/java/com/android/server/wifi/WifiStateMachine.java
+++ b/service/java/com/android/server/wifi/WifiStateMachine.java
@@ -1884,6 +1884,14 @@ public class WifiStateMachine extends StateMachine implements WifiNative.WifiRss
}
/**
+ * Allow tests to confirm the operational mode for WSM.
+ */
+ @VisibleForTesting
+ protected int getOperationalModeForTest() {
+ return mOperationalMode;
+ }
+
+ /**
* TODO: doc
*/
public List<ScanResult> syncGetScanResultsList() {
@@ -4334,6 +4342,9 @@ public class WifiStateMachine extends StateMachine implements WifiNative.WifiRss
transitionTo(mInitialState);
}
break;
+ case CMD_SET_OPERATIONAL_MODE:
+ mOperationalMode = message.arg1;
+ break;
default:
return NOT_HANDLED;
}