Fix not display the FDN menu if a SIM doesn't support FDN
The FDN menu is displayed even if a SIM doesn't support FDN function.
If user tries to enable it and add numbers in the FDN list in this case,
they fails. So, the FDN menu should be hidden.
Test: manual - Checked the FDN menu is not displayed if a SIM doesn't
support FDN
Test: auto - Passed CallFeaturesSettingTest
Bug: 65041818
Change-Id: I35ca072e2e420038c143bcd6941544b1c5276644
diff --git a/src/com/android/phone/CallFeaturesSetting.java b/src/com/android/phone/CallFeaturesSetting.java
index 8da980c..fd85585 100644
--- a/src/com/android/phone/CallFeaturesSetting.java
+++ b/src/com/android/phone/CallFeaturesSetting.java
@@ -281,7 +281,9 @@
addPreferencesFromResource(R.xml.cdma_call_privacy);
}
} else if (phoneType == PhoneConstants.PHONE_TYPE_GSM) {
-
+ if (mPhone.getIccCard() == null || !mPhone.getIccCard().getIccFdnAvailable()) {
+ prefSet.removePreference(fdnButton);
+ }
if (carrierConfig.getBoolean(
CarrierConfigManager.KEY_ADDITIONAL_CALL_SETTING_BOOL)) {
addPreferencesFromResource(R.xml.gsm_umts_call_options);