完善资料让更多小伙伴认识你,还能领取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 //断开连接后进入定期扫描 |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
458 浏览 0 评论
2244 浏览 1 评论
synopsys 的design ware:DW_fpv_div,浮点数除法器,默认32位下,想提升覆盖率(TMAX),如果用功能case去提升覆盖率呢?
2955 浏览 1 评论
RK3588 GStreamer调试四路鱼眼摄像头四宫格显示报错
5730 浏览 1 评论
【飞凌嵌入式OK3576-C开发板体验】RKNN神经网络-YOLO图像识别
254 浏览 0 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-4 01:33 , Processed in 0.691626 second(s), Total 73, Slave 54 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号