1 package com.android.phone; 2 3 import com.android.internal.telephony.Phone; 4 import com.android.internal.telephony.PhoneFactory; 5 6 import android.content.DialogInterface; 7 import android.os.AsyncResult; 8 import android.os.Bundle; 9 import android.os.Handler; 10 import android.os.Message; 11 import android.preference.CheckBoxPreference; 12 import android.preference.Preference; 13 import android.preference.PreferenceActivity; 14 import android.preference.PreferenceScreen; 15 import android.util.Log; 16 17 public class CdmaCallOptions extends PreferenceActivity { 18 private static final String LOG_TAG = "CdmaCallOptions"; 19 private final boolean DBG = (PhoneApp.DBG_LEVEL >= 2); 20 21 private static final String BUTTON_VP_KEY = "button_voice_privacy_key"; 22 private CheckBoxPreference mButtonVoicePrivacy; 23 24 @Override 25 protected void onCreate(Bundle icicle) { 26 super.onCreate(icicle); 27 28 addPreferencesFromResource(R.xml.cdma_call_privacy); 29 30 mButtonVoicePrivacy = (CheckBoxPreference) findPreference(BUTTON_VP_KEY); 31 if (PhoneFactory.getDefaultPhone().getPhoneType() != Phone.PHONE_TYPE_CDMA 32 || getResources().getBoolean(R.bool.config_voice_privacy_disable)) { 33 //disable the entire screen 34 getPreferenceScreen().setEnabled(false); 35 } 36 } 37 38 @Override 39 public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { 40 if (preference.getKey().equals(BUTTON_VP_KEY)) { 41 return true; 42 } 43 return false; 44 } 45 46 } 47