版权声明:本文为博主原创文章,未经博主允许不得转载。

Android 8.0 Hostap流程(也叫Softap)

1)从Android 7.0开始,google已经从原先直接调用WifiManager.setWifiApEnabled()的方式,直接改成调用ConnectivityManager.startTethering()的方式了。
2)当修改AP配置时,也不用原先像mWifiManager.setWifiApEnabled(null, false),再mWifiManager.setWifiApEnabled(mWifiConfig, true)的方式。改成了当hostap关闭后,接收hostap的广播,再进行打开操作,这样避免了开关过快导致hostap不能再次打开的问题

修改的commit如下:
https://github.com/aosp-mirror/platform_packages_apps_settings/commit/ffb4fbb1a7a8df82fb8425321244cda4be5b76c2#diff-b5bd2dc5ae07339804903e3fccb75613

commit ffb4fbb1a7a8df82fb8425321244cda4be5b76c2Author: Rebecca Silberstein @google.com>Rebecca Silberstein committed on 5 Mar 2016     Save WifiAp config changes when hotspot is enabled    We need to properly handle asynchronous events when WifiAp for hotspot    is enabled and the user changes the config.  This CL changes the    behavior to:    1 - mark local boolean indicating a restart is needed    2 - trigger the WifiAp to stop    3 - save the new config    4 - when the stop is complete (and the boolean is set), restart the    WifiAp.    Also fix a few style issues in the file.    BUG:27460194    Change-Id: I7e49ab9c49e125017cf83866a396701e440bf383

Hostap/Softap的流程如下:

更多相关文章

  1. android打开系统相册的一些方法
  2. Mac OS 安装 Android(安卓)Studio
  3. [sg] Android(安卓)4.4 屏幕旋转的两种方式
  4. Android(安卓)Google购买PHP服务器端验证(订阅购买和一次性购买)
  5. Android中实现部分字体颜色改变的方式
  6. 序列化的两种方式
  7. Android(安卓)双开沙箱 VirtualApp 源码分析(四)启动插件 Service
  8. android 中ids.xml资源的使用
  9. Android(安卓)Launcher源码研究(二) 加载app流程1

随机推荐

  1. Android消息通信之无所不能的第三方开源
  2. Android中shape定义控件的使用
  3. Android数据推送实现方案
  4. Android中String资源文件的format方法
  5. android初级
  6. Android 开机图片/文字/动画 修改
  7. Android震动---启动、循环、取消控制
  8. Android(安卓)Studio 快捷键
  9. Android(一) 安卓概述
  10. Android Mac开发Android推荐软件