Android 10.0 Settings 移除热点功能

介绍

在某些机器中客户不希望带热点功能,我们需要删除setting中和热点相关的菜单和快捷方式

修改

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

    <string name="tether_settings_title_all">tethering</string>

路径:vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values-zh-rCN/strings.xml

    <string name="tether_settings_title_all" msgid="3058586928118801157">"网络共享"</string>

禁用长按settings中弹出热点快捷方式
路径:vendor/mediatek/proprietary/packages/apps/MtkSettings/AndroidManifest.xml

<!--soda water.20230919 Disabled hotspot
        <activity
            android:name="Settings$WifiTetherSettingsActivity"
            android:label="@string/wifi_hotspot_checkbox_text"
            android:icon="@drawable/ic_wifi_tethering"
            android:parentActivityName="Settings"
            android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="com.android.settings.WIFI_TETHER_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter android:priority="4">
                <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.tether.WifiTetherSettings" />
        </activity>
-->

移除settings中的菜单项

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

<!--soda water.20230919 Disabled hotspot
    <com.android.settings.widget.FixedLineSummaryPreference
        android:key="wifi_tether"
        android:title="@string/wifi_hotspot_checkbox_text"
        android:summary="@string/summary_two_lines_placeholder"
        android:fragment="com.android.settings.wifi.tether.WifiTetherSettings"
        settings:summaryLineCount="2" />-->

禁用通过搜索进入
路径:vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/wifi/tether/WifiTetherSettings.java

//@SearchIndexable soda water.20230919 Disabled hotspot

删除下拉栏中的热点快捷图标(quick_settings_tiles_default和quick_settings_tiles_stock)移除hotspot

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

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

    <!-- Tiles native to System UI. Order should match "quick_settings_tiles_default" -->
    <string name="quick_settings_tiles_stock" translatable="false">
        wifi,cell,battery,dnd,flashlight,rotation,bt,airplane,location,screenrecord,supershot,inversion,saver,dark,work,cast,night,custom(com.google.android.gms/.nearby.sharing.SharingTileService)
    </string>

  • 4
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

不太正常的移动开发工程师

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值