Migrating more code to read config from CarrierConfigManager.

The following variables are now being read through the carrier config API.
config_voice_privacy_disable
config_show_onscreen_dial_button
config_enable_dialer_key_vibration
sim_network_unlock_allow_dismiss
voicemail_notification_persistent

Bug: 20270007
Change-Id: I4dc909ae32c23fc3f62c5d151ac2b19ef49dffe5
diff --git a/src/com/android/phone/CdmaCallOptions.java b/src/com/android/phone/CdmaCallOptions.java
index 8f7b1b1..9247173 100644
--- a/src/com/android/phone/CdmaCallOptions.java
+++ b/src/com/android/phone/CdmaCallOptions.java
@@ -28,6 +28,7 @@
 import android.preference.Preference;
 import android.preference.PreferenceActivity;
 import android.preference.PreferenceScreen;
+import android.telephony.CarrierConfigManager;
 import android.util.Log;
 import android.view.MenuItem;
 
@@ -49,9 +50,16 @@
                 getActionBar(), getResources(), R.string.labelCdmaMore_with_label);
 
         mButtonVoicePrivacy = (CheckBoxPreference) findPreference(BUTTON_VP_KEY);
+        Bundle carrierConfig;
+        if (subInfoHelper.hasSubId()) {
+            carrierConfig = PhoneGlobals.getInstance().getCarrierConfigForSubId(
+                    subInfoHelper.getSubId());
+        } else {
+            carrierConfig = PhoneGlobals.getInstance().getCarrierConfig();
+        }
         if (subInfoHelper.getPhone().getPhoneType() != PhoneConstants.PHONE_TYPE_CDMA
-                || getResources().getBoolean(R.bool.config_voice_privacy_disable)) {
-            //disable the entire screen
+                || carrierConfig.getBoolean(CarrierConfigManager.BOOL_VOICE_PRIVACY_DISABLE)) {
+            // disable the entire screen
             getPreferenceScreen().setEnabled(false);
         }
     }