Support CdmaVoicePrivacySwitchPreference for multi-sim.
Test: Manual
Bug: 131461840
Change-Id: I64ee1a4e8b97a72bfec52b9be6dcbe5154ea9600
Merged-In: I64ee1a4e8b97a72bfec52b9be6dcbe5154ea9600
diff --git a/src/com/android/phone/CallFeaturesSetting.java b/src/com/android/phone/CallFeaturesSetting.java
index 9faffa1..ef83ead 100644
--- a/src/com/android/phone/CallFeaturesSetting.java
+++ b/src/com/android/phone/CallFeaturesSetting.java
@@ -97,6 +97,7 @@
"phone_account_settings_preference_screen";
private static final String ENABLE_VIDEO_CALLING_KEY = "button_enable_video_calling";
+ private static final String BUTTON_VP_KEY = "button_voice_privacy_key";
private Phone mPhone;
private ImsManager mImsMgr;
@@ -397,6 +398,9 @@
if (phoneType == PhoneConstants.PHONE_TYPE_CDMA) {
prefSet.removePreference(fdnButton);
addPreferencesFromResource(R.xml.cdma_call_privacy);
+ CdmaVoicePrivacySwitchPreference buttonVoicePrivacy =
+ (CdmaVoicePrivacySwitchPreference) findPreference(BUTTON_VP_KEY);
+ buttonVoicePrivacy.setPhone(mPhone);
} else if (phoneType == PhoneConstants.PHONE_TYPE_GSM) {
if (mPhone.getIccCard() == null || !mPhone.getIccCard().getIccFdnAvailable()) {
prefSet.removePreference(fdnButton);