介绍
在某些机器中客户不希望带热点功能,我们需要删除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>