--- WirelessSettings.java 2019-02-21 12:35:52.799396077 +0800
+++ WirelessSettings1.java 2019-02-21 12:35:37.547952400 +0800
@@ -335,11 +335,15 @@ public class WirelessSettings extends Se
mNfcEnabler = null;
}
+ //MHR 隐藏移动网络
+ removePreference(KEY_MOBILE_NETWORK_SETTINGS);
+
// 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)) {
- removePreference(KEY_MOBILE_NETWORK_SETTINGS);
+ //MHR 隐藏移动网络
+ //removePreference(KEY_MOBILE_NETWORK_SETTINGS);
removePreference(KEY_MANAGE_MOBILE_PLAN);
}
// Remove Mobile Network Settings and Manage Mobile Plan
--- TetherSettings.java 2019-02-21 12:35:46.664148196 +0800
+++ TetherSettings1.java 2019-02-21 11:34:06.182644900 +0800
@@ -160,7 +160,13 @@ public class TetherSettings extends Sett
getPreferenceScreen().removePreference(mEnableWifiAp);
getPreferenceScreen().removePreference(wifiApSettings);
}
-
+
+ //MHR 隐藏 蓝牙网络共享设置项
+ if (bluetoothAvailable) {
+ getPreferenceScreen().removePreference(mBluetoothTether);
+ }
+
+/*
if (!bluetoothAvailable) {
getPreferenceScreen().removePreference(mBluetoothTether);
} else {
@@ -171,6 +177,7 @@ public class TetherSettings extends Sett
mBluetoothTether.setChecked(false);
}
}
+*/
mProvisionApp = getResources().getStringArray(
com.android.internal.R.array.config_mobile_hotspot_provision_app);
总结:搜索目标设置项layout字符串时,从目标设置项的上一层设置项开始查。