diff options
author | sy310.choi <sy310.choi@samsung.com> | 2011-03-26 17:09:13 +0900 |
---|---|---|
committer | Simon Wilson <simonwilson@google.com> | 2011-06-09 13:43:45 -0700 |
commit | d7af9733265c48d659b0584a0bc80fc457ad6b32 (patch) | |
tree | cd2a14588b06f2263073bd37cbf493d3781bb897 | |
parent | 11ae53b607436c801abe8b6aa25b8c5c7fc267e6 (diff) | |
download | Phone-d7af9733265c48d659b0584a0bc80fc457ad6b32.tar.gz |
Allow Voice Privacy option to be disabled for CDMA devices
Change-Id: I59a5504b49c7a02103e7a1e3c49ad8bcf1b9fa74
-rw-r--r-- | res/values/config.xml | 2 | ||||
-rw-r--r-- | res/xml/cdma_call_privacy.xml (renamed from res/xml/cdma_call_options.xml) | 0 | ||||
-rw-r--r-- | src/com/android/phone/CallFeaturesSetting.java | 4 | ||||
-rw-r--r-- | src/com/android/phone/CdmaCallOptions.java | 5 |
4 files changed, 8 insertions, 3 deletions
diff --git a/res/values/config.xml b/res/values/config.xml index 0b821c43..d82a9a3f 100644 --- a/res/values/config.xml +++ b/res/values/config.xml @@ -119,4 +119,6 @@ <!-- Determines if device implements a noise suppression device for in call audio--> <bool name="has_in_call_noise_suppression">false</bool> + <!-- If true, removes the Voice Privacy option from Call Settings --> + <bool name="config_voice_privacy_disable">false</bool> </resources> diff --git a/res/xml/cdma_call_options.xml b/res/xml/cdma_call_privacy.xml index f1a4c94a..f1a4c94a 100644 --- a/res/xml/cdma_call_options.xml +++ b/res/xml/cdma_call_privacy.xml diff --git a/src/com/android/phone/CallFeaturesSetting.java b/src/com/android/phone/CallFeaturesSetting.java index 76175249..f985e791 100644 --- a/src/com/android/phone/CallFeaturesSetting.java +++ b/src/com/android/phone/CallFeaturesSetting.java @@ -1422,7 +1422,9 @@ public class CallFeaturesSetting extends PreferenceActivity Preference fdnButton = prefSet.findPreference(BUTTON_FDN_KEY); if (fdnButton != null) prefSet.removePreference(fdnButton); - addPreferencesFromResource(R.xml.cdma_call_options); + if (!getResources().getBoolean(R.bool.config_voice_privacy_disable)) { + addPreferencesFromResource(R.xml.cdma_call_privacy); + } } else if (phoneType == Phone.PHONE_TYPE_GSM) { addPreferencesFromResource(R.xml.gsm_umts_call_options); } else { diff --git a/src/com/android/phone/CdmaCallOptions.java b/src/com/android/phone/CdmaCallOptions.java index dc5c9d10..5b234c57 100644 --- a/src/com/android/phone/CdmaCallOptions.java +++ b/src/com/android/phone/CdmaCallOptions.java @@ -25,10 +25,11 @@ public class CdmaCallOptions extends PreferenceActivity { protected void onCreate(Bundle icicle) { super.onCreate(icicle); - addPreferencesFromResource(R.xml.cdma_call_options); + addPreferencesFromResource(R.xml.cdma_call_privacy); mButtonVoicePrivacy = (CheckBoxPreference) findPreference(BUTTON_VP_KEY); - if (PhoneFactory.getDefaultPhone().getPhoneType() != Phone.PHONE_TYPE_CDMA) { + if (PhoneFactory.getDefaultPhone().getPhoneType() != Phone.PHONE_TYPE_CDMA + || getResources().getBoolean(R.bool.config_voice_privacy_disable)) { //disable the entire screen getPreferenceScreen().setEnabled(false); } |