当前位置: 首页 > article >正文

Android 10.0 移除wifi功能及相关菜单

介绍

客户的机器没有wifi功能,所以需要删除wifi相关的菜单,主要有设置-网络和互联网-WLAN,长按桌面设置弹出的WALN快捷方式,长按桌面-微件-设置-WLAN。

修改

Android10 上直接将config_show_wifi_settings改为false,这样wifi菜单的入口就隐藏了

路径:vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values/config.xml

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

移除长按设置弹出的WALN菜单项

路径:vendor/mediatek/proprietary/packages/apps/MtkSettings/res/xml/shortcuts.xml

<!--Soda Water.20250217 rm wifi
    <shortcut
        android:shortcutId="manifest-shortcut-wifi"
        android:icon="@drawable/ic_shortcut_wireless"
        android:shortcutShortLabel="@string/wifi_settings" >
        <intent android:action="android.settings.WIFI_SETTINGS" />
    </shortcut>
-->

移除长按桌面微件设置中的WALN

路径:vendor/mediatek/proprietary/packages/apps/MtkSettings/AndroidManifest.xml

        <activity
            android:name="Settings$WifiSettingsActivity"
            android:label="@string/wifi_settings"
            android:icon="@drawable/ic_settings_wireless"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:parentActivityName="Settings">
<!--Soda Water.2025021 rm wifi
            <intent-filter android:priority="1">
                <action android:name="android.settings.WIFI_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter android:priority="1">
                <action android:name="android.intent.action.MAIN" />
                <category android:name="com.android.settings.SHORTCUT" />
            </intent-filter>
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.wifi.WifiSettings" />
            <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
                android:value="true" />
-->
        </activity>

最后移除下拉栏中的wifi入口

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

    <string name="quick_settings_tiles_default" translatable="false">
        bt,dnd,flashlight,rotation,battery,cell,airplane,cast,location,screenrecord,supershot,custom(com.google.android.gms/.nearby.sharing.SharingTileService)
    </string>

    <string name="quick_settings_tiles_stock" translatable="false">
        cell,battery,dnd,flashlight,rotation,bt,airplane,location,screenrecord,supershot,hotspot,inversion,saver,dark,work,cast,night,custom(com.google.android.gms/.nearby.sharing.SharingTileService)
    </string>

http://www.kler.cn/a/551449.html

相关文章:

  • Android中kotlin的Map简单使用方法
  • 【现代深度学习技术】深度学习计算 | GPU
  • STM32 ADC介绍(硬件原理篇)
  • Linux的SSH无法连接(shell request failed on channel 0)
  • Dockerfile 详解:构建自定义镜像
  • AUTO TECH China 2025 广州国际汽车技术展览会:引领汽车科技新潮流
  • 日常问题-pnpm install执行没有node_modules生成
  • OpenHarmony 系统性能优化——默认关闭全局动画
  • DeepSeek教unity------Dotween
  • 网络安全学习笔记之Internet基本知识
  • 开发一个交易所需要哪些技术
  • 算法-栈括号匹配
  • Go语言的游戏开发
  • 视点坐标及鼠标交点坐标的信息显示(七)
  • HBuilderX中uni-app打开页面时,如何用URL传递参数,Query参数传递
  • docker拉取失败received unexpected Http status:500 Internal Server Error
  • HTML之JavaScript对象
  • Ubuntu 22.04.5 LTS 安装企业微信,(2025-02-17安装可行)
  • 后端开发:高效数据库查询优化实战指南
  • TensorFlow 和 PyTorch 哪个更适合新手学习?