1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
|
|
相关推荐
1个回答
|
|
Platform: Rockchip
OS: Android 6.0 Kernel: 3.10.92 ,这里看一下它的移除过程是怎样的,当选择界面的FORGET时,会触发以下流程调用。 onForget -> forget -> mWifiManager.forget -> WiFiSettings.java //参数为当前选择forget的config的netid sAsyncChannel.sendMessage -> 异步通道发送给WifiStateMachine,cmd是FORGET_NETWORK processMessage -> WifiStateMachine.java //当前处于ConnectedState,调用父类的父类ConnectModeState mWifiConfigStore.getWifiConfiguration //根据netid得到对应的config mWifiConfigStore.canModifyNetwork //检查调用者是否有权限remove network mWifiConfigStore.forgetNetwork -> removeConfigAndSendBroadcastIfNeeded -> //执行清理操作 mConfiguredNetworks.remove //从ConfiguredNetworks中移除 mScanDetailCaches.remove sendConfiguredNetworksChangedBroadcast //发广播wifi状态变化: WifiManager.CONFIGURED_NETWORKS_CHANGED_ACTION mWifiNative.removeNetwork -> doBooleanCommand //通知WPAS移除network,命令是"REMOVE_NETWORK " + netId,这和用wpa_cli客户端的方法是一样的 mWifiNative.saveConfig -> doBooleanCommand //通知WPAS更新配置文件wpa_supplicant.conf handleEvent WifiMonitor.java -> WPAS移除完毕之后会发DISCONNECTED事件过来,由WifiMonitor负责接收 handleNetworkStateChange -> notifyNetworkStateChange -> mStateMachine.sendMessage -> //NETWORK_DISCONNECTION_EVENT, 发给WifiStateMachine processMessage -> //ConnectedState dispatchEvent -> 接着WifiMonitor又收到WPAS发来的STATE_CHANGE事件 handleSupplicantStateChange -> notifySupplicantStateChange -> // mStateMachine.sendMessage -> //SUPPLICANT_STATE_CHANGE_EVENT processMessage -> //当前处于ConnectedState,调用父类的父类ConnectModeState handleNetworkDisconnect -> stopRssiMonitoringOffload -> //通知HAL stop rssi mWifiNative.stopRssiMonitoring -> stopRssiMonitoringNative -> android_net_wifi_stop_rssi_monitoring_native -> hal_fn.wifi_stop_rssi_monitoring clearCurrentConfigBSSID -> //清理bssid clearConfigBSSID stopDhcp -> //关dchp,之前有分析过startdhcp的 handlePostDhcpSetup mDhcpStateMachine.sendMessage //DhcpStateMachine.CMD_STOP_DHCP processMessage -> //DhcpBoundState processMessage -> //DhcpHaveAddressState的父类DhcpState transitionTo(mStoppedState) -> exit -> //DhcpHaveAddressState setIpAddress -> mNMService.setInterfaceConfig //通知netd设置ip mNwService.clearInterfaceAddresses mNwService.disableIpv6 setNetworkDetailedState //这部分和ConnectionService有关,打算后面再细讲 mNetworkAgent.sendNetworkInfo sendNetworkStateChangeBroadcast //广播WifiManager.NETWORK_STATE_CHANGED_ACTION transitionTo(mDisconnectedState) -> exit -> //ConnectedState setScanAlarm //关闭周期性scan enter -> //DisconnectedState startScan //断开连接后进入定期扫描 |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
基于米尔瑞芯微RK3576核心板/开发板的人脸疲劳检测应用方案
498 浏览 0 评论
768 浏览 1 评论
667 浏览 1 评论
1893 浏览 1 评论
3138 浏览 1 评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-21 15:05 , Processed in 0.723599 second(s), Total 72, Slave 56 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号