Android对飞行模式下Wifi和蓝牙的控制通过如下两个数据库中的值控制,airplane_mode_radios、airplane_mode_toggleable_radios,其值保存在Setting数据库Global表中

/** * A comma separated list of radios that need to be disabled when airplane mode * is on. This overrides WIFI_ON and BLUETOOTH_ON, if Wi-Fi and bluetooth are * included in the comma separated list. */public static final String AIRPLANE_MODE_RADIOS = "airplane_mode_radios";

通过如上注释,可以看出,该值表示在打开飞行模式的时候需要关闭的radios,以逗号分隔。
若需要在打开飞行模式的时候关闭wifi和bluetooth,这该值为”wifi,bluetooth”

/** * A comma separated list of radios that should to be disabled when airplane mode * is on, but can be manually reenabled by the user. For example, if RADIO_WIFI is * added to both AIRPLANE_MODE_RADIOS and AIRPLANE_MODE_TOGGLEABLE_RADIOS, then Wifi * will be turned off when entering airplane mode, but the user will be able to reenable * Wifi in the Settings app. * * {@hide} */public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS = "airplane_mode_toggleable_radios";

通过如上注释,可以看出,该值表示在飞行模式下还能打开的radios,以逗号分隔。
若需要在飞行模式下仍能够开启wifi和bluetooth,这该值为”wifi,bluetooth”

更多相关文章

  1. Xposed: 勾住(Hook) Android应用程序对象的方法,实现AOP
  2. android 连接指定wifi
  3. Android(安卓)MenuItem 设置文字颜色-TextColor的设置
  4. android蓝牙开发入门到精通4------通信标准
  5. Android(安卓)打开TextView中的超链接
  6. Android根据URL下载文件保存到SD卡
  7. android打开文件
  8. Android(安卓)USB通讯(完整版)
  9. android软键盘开关

随机推荐

  1. 影响RPA云部署总持成本的7大因素
  2. shell脚本之灵活调用函数技巧
  3. 分布式链路追踪 SkyWalking 源码分析 —
  4. 给用户一个否减弱动画效果的选择[每日前
  5. Shell脚本高效检测主机存活
  6. 分布式链路追踪 SkyWalking 源码分析 —
  7. 分布式链路追踪 SkyWalking 源码分析 —
  8. 分布式链路追踪 SkyWalking 源码分析 —
  9. 阿里最新开源配置中心和注册中心: Nacos
  10. 分布式链路追踪 SkyWalking 源码分析 —