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_options); 29 30 mButtonVoicePrivacy = (CheckBoxPreference) findPreference(BUTTON_VP_KEY); 31 if (PhoneFactory.getDefaultPhone().getPhoneType() != Phone.PHONE_TYPE_CDMA) { 32 //disable the entire screen 33 getPreferenceScreen().setEnabled(false); 34 } 35 } 36 37 @Override 38 public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { 39 if (preference.getKey().equals(BUTTON_VP_KEY)) { 40 return true; 41 } 42 return false; 43 } 44 45 } 46