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

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

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

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

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>
相关推荐
能摆一天是一天19 小时前
JAVA stream().flatMap()
java·windows
颜如玉20 小时前
🤲🏻🤲🏻🤲🏻临时重定向一定要能重定向🤲🏻🤲🏻🤲🏻
java·http·源码
android_xc20 小时前
Android Studio国内仓库配置
android·ide·android studio
alexhilton20 小时前
runBlocking实践:哪里该使用,哪里不该用
android·kotlin·android jetpack
2501_9151063221 小时前
iOS 使用记录和能耗监控实战,如何查看电池电量消耗、App 使用时长与性能数据(uni-app 开发调试必备指南)
android·ios·小程序·uni-app·cocoa·iphone·webview
雨白21 小时前
深入解析 Android 多点触摸:从原理到实战
android
程序员的世界你不懂21 小时前
【Flask】测试平台开发,新增说明书编写和展示功能 第二十三篇
java·前端·数据库
星空寻流年21 小时前
设计模式第一章(建造者模式)
java·设计模式·建造者模式
gb42152871 天前
java中将租户ID包装为JSQLParser的StringValue表达式对象,JSQLParser指的是?
java·开发语言·python
曾经的三心草1 天前
Python2-工具安装使用-anaconda-jupyter-PyCharm-Matplotlib
android·java·服务器