• Android 9.0 屏蔽设备的WLAN功能


    Android 9.0 屏蔽设备的WLAN功能

    最近接到需求反馈,想要屏蔽设备的WLAN功能,具体修改参照如下:

    /vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values/bools.xml

    1. <!-- Whether Wi-Fi settings should be shown or not.
    2. This also controls whether Wi-fi related sub-settings (e.g. Wi-Fi preferences) will
    3. surface in search results or not.-->
    4. - <bool name="config_show_wifi_settings">true</bool>
    5. + <bool name="config_show_wifi_settings">false</bool>

    另外一级菜单“网络和互联网”的 summary 也要调整,将WLAN字样去除,具体修改参照如下:

    /vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/network/NetworkDashboardFragment.java

    1. public void setListening(boolean listening) {
    2. if (listening) {
    3. /*/
    4. String summary = BidiFormatter.getInstance()
    5. .unicodeWrap(mContext.getString(R.string.wifi_settings_title));
    6. if (mMobileNetworkPreferenceController.isAvailable()) {
    7. final String mobileSettingSummary = mContext.getString(
    8. R.string.network_dashboard_summary_mobile);
    9. //*/
    10. String summary = BidiFormatter.getInstance()
    11. .unicodeWrap(mContext.getString(R.string.network_dashboard_summary_mobile));
    12. //}
    13. //*/

    下拉状态栏中对应WLAN功能的quick setting图标也需要屏蔽掉:

    /vendor/mediatek/proprietary/packages/apps/SystemUI/res/values/config.xml

    1. <string name="quick_settings_tiles_default" translatable="false">
    2. - wifi,bt,dnd,flashlight,rotation,cell,airplane,cast,location,screenrecord
    3. + bt,dnd,flashlight,rotation,cell,airplane,cast,location,screenrecord
    4. </string>
    5. <string name="quick_settings_tiles_stock" translatable="false">
    6. - wifi,cell,dnd,flashlight,rotation,bt,airplane,location,screenrecord,hotspot,inversion,saver,work,cast,night
    7. + cell,dnd,flashlight,rotation,bt,airplane,location,screenrecord,hotspot,inversion,saver,work,cast,night
    8. </string>

    重新编译验证,修改生效,设备WLAN功能已屏蔽

  • 相关阅读:
    pandas_bokeh:投资量化平台可视化的利器
    Python案例实战,gopup模块,Python3行代码就能获取海量数据
    ElasticSearch的集群、节点、索引、分片和副本
    Java 与 Go:可变数组
    notepad++快捷键和宏录制
    java中的Properties配置文件操作[61]
    MYSQL 主从复制与读写分离
    Kernel Memory 入门系列:生成并获取文档摘要
    九、Delay函数
    WxJava使用lettuce的redis实现access_token的共享
  • 原文地址:https://blog.csdn.net/Jeffries_C/article/details/134423900