Android MTK去除移动网络

处在网络高速发展的时代,竟然有人不用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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值