Android wifi触发回连ap的过程

涉及文件位置:

Android\frameworks\opt\net\wifi\service\java\com\android\server\wifi\WifiMonitor.java

Android\frameworks\opt\net\wifi\service\java\com\android\server\wifi\WifiStateMachine.java

Android\frameworks\opt\net\wifi\service\java\com\android\server\wifi\WifiAutoJoinController.java

 

从MonitorThread->run线程监听supplicant事件开始:

MonitorThread.run()

->mWifiMonitorSingleton.dispatchEvent()

->WifiMonitor.dispatchEvent()

->handleEvent()  /* mStateMachine.sendMessage(SCAN_RESULTS_EVENT) */

->SupplicantStartedState. processMessage(WifiMonitor.SCAN_RESULTS_EVENT)

->setScanResults()

->newSupplicantResults()

->attemptAutoJoin()  /* mWifiStateMachine.sendMessage(CMD_AUTO_CONNECT)*/

->ConnectModeState.processMessage(WifiStateMachine.CMD_AUTO_CONNECT)

->mWifiNative.reconnect()

你可能感兴趣的:(wifi,Android)