Android(安卓)MTK去除移动网络
16lz
2021-01-26
处在网络高速发展的时代,竟然有人不用SIM卡移动网络,需要去掉所有关于移动网络的设置,0.0,所以只能按需求改喽。
首先,去掉下拉菜单状态栏的SIM选项
frameworks\base\packages\SystemUI\res\values\config.xml文件中的quick_settings_tiles_default特定选项
其次,是去掉设置->更多中的移动网络选项
packages\apps\Settings\src\com\android\settings\WirelessSettings.java文件中修改此源码
// Remove Mobile Network Settings and Manage Mobile Plan for secondary users, // if it's a wifi-only device, or if the settings are restricted. if (isSecondaryUser || Utils.isWifiOnly(getActivity()) || mUm.hasUserRestriction(UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS)) { /// M: remove preference getPreferenceScreen().removePreference(mNetworkSettingsPreference); removePreference(KEY_MANAGE_MOBILE_PLAN); } // Remove Mobile Network Settings and Manage Mobile Plan // if config_show_mobile_plan sets false. final boolean isMobilePlanEnabled = this.getResources().getBoolean( R.bool.config_show_mobile_plan); if (!isMobilePlanEnabled) { Preference pref = findPreference(KEY_MANAGE_MOBILE_PLAN); if (pref != null) { removePreference(KEY_MANAGE_MOBILE_PLAN); } }
个人比较粗暴直接干掉,只走移除
再次,就是关闭config中默认开启网络的宏MTK_DEFAULT_DATA_OFF
更多相关文章
- 如何去掉Android(安卓)6.0 UI界面上的搜索框
- Android(安卓)Volley框架
- Android(安卓)Do not keep activities选项分析
- android网络通信
- Android:窗口的Flag设置作用
- 在代码中为选项卡添加内容
- Cocos Creator 使用 Android(安卓)Studio 打包 APK 遇到的坑
- Android(安卓)请求网络loading 结果显示error empty界面
- android一个小网络图片查看器