am 7a40def1
: am 47963424
: Merge "Remove Manage Mobile Plan when config_show_mobile_plan is set to false" into klp-dev
* commit '7a40def17c40279faf8ad01d730c88498cd2f549': Remove Manage Mobile Plan when config_show_mobile_plan is set to false
This commit is contained in:
@@ -32,4 +32,7 @@
|
|||||||
|
|
||||||
<!-- Whether to show a preference item for regulatory information in About phone -->
|
<!-- Whether to show a preference item for regulatory information in About phone -->
|
||||||
<bool name="config_show_regulatory_info">false</bool>
|
<bool name="config_show_regulatory_info">false</bool>
|
||||||
|
|
||||||
|
<!-- Whether to show a preference item for mobile plan -->
|
||||||
|
<bool name="config_show_mobile_plan">true</bool>
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -333,6 +333,16 @@ public class WirelessSettings extends RestrictedSettingsFragment
|
|||||||
removePreference(KEY_MOBILE_NETWORK_SETTINGS);
|
removePreference(KEY_MOBILE_NETWORK_SETTINGS);
|
||||||
removePreference(KEY_MANAGE_MOBILE_PLAN);
|
removePreference(KEY_MANAGE_MOBILE_PLAN);
|
||||||
}
|
}
|
||||||
|
// Remove Mobile Network Settings and Manage Mobile Plan
|
||||||
|
// if config_show_mobile_plan sets false.
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
protectByRestrictions(KEY_MOBILE_NETWORK_SETTINGS);
|
protectByRestrictions(KEY_MOBILE_NETWORK_SETTINGS);
|
||||||
protectByRestrictions(KEY_MANAGE_MOBILE_PLAN);
|
protectByRestrictions(KEY_MANAGE_MOBILE_PLAN);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user