	public void onCreate(Bundle bundle) {
		super.onCreate(bundle);
		mContext = getActivity();
		if (getResources().getBoolean(R.bool.hide_accounts)) {	
			PreferenceCategory accounts = (PreferenceCategory) getPreferenceScreen().getPreference(ACCOUNTS_SETTINGS_ID);
			accounts.removeAll();
			accounts.setLayoutResource(R.layout.hidden);
		}
		if (getResources().getBoolean(R.bool.hide_wizard)) {
			Preference wizard = (Preference) getPreferenceScreen().getPreference(WIZARD_SETTINGS_ID);
			wizard.setLayoutResource(R.layout.hidden);
		} else {
			addWizardPreferenceButton();
		}
		if (getResources().getBoolean(R.bool.disable_animations)) {
			uncheckDisableAndHideCheckbox(R.string.pref_animation_enable_key);
		}
		if (!getResources().getBoolean(R.bool.enable_linphone_friends)) {
			PreferenceCategory friends = (PreferenceCategory) getPreferenceScreen().getPreference(FRIENDS_SETTINGS_ID);
			friends.removeAll();
			friends.setLayoutResource(R.layout.hidden);
		}
		addTransportChecboxesListener();
		ecCalibratePref = findPreference(pref_echo_canceller_calibration_key);
		ecCalibratePref.setOnPreferenceClickListener(new OnPreferenceClickListener() {
			public boolean onPreferenceClick(Preference preference) {
				startEcCalibration();
				return false;
			}
		});
		ecPref = (CheckBoxPreference) findPreference(pref_echo_cancellation_key);
		mencPref = (ListPreference) findPreference(pref_media_encryption_key);
		boolean fastCpu = Version.hasFastCpu();
		if (fastCpu) {
			detectAudioCodec(pref_codec_ilbc_key, "iLBC", 8000, 1, false);
			findPreference(pref_codec_speex16_key).setEnabled(true);
		}
		initializeMediaEncryptionPreferences();
		detectAudioCodec(pref_codec_amr_key,"AMR", 8000, 1, false);
		detectAudioCodec(pref_codec_amrwb_key,"AMR-WB", 16000, 1, false);
		detectAudioCodec(R.string.pref_codec_silk16_key,"SILK",16000, 1, true);
		detectAudioCodec(R.string.pref_codec_silk24_key,"SILK",24000, 1, true);
		detectAudioCodec(R.string.pref_codec_g729_key,"G729",8000, 1, true);
		if (!Version.isVideoCapable()) {
			uncheckAndDisableCheckbox(pref_video_enable_key);
		} else {
			if (!AndroidCameraConfiguration.hasFrontCamera()) {
				uncheckDisableAndHideCheckbox(R.string.pref_video_use_front_camera_key);
			}
		}
		if (prefs().getBoolean(LinphoneActivity.PREF_FIRST_LAUNCH,true)) {
			doOnFirstLaunch();
		}
		if (Hacks.hasBuiltInEchoCanceller()) {
			uncheckDisableAndHideCheckbox(R.string.pref_echo_cancellation_key);
			uncheckDisableAndHideCheckbox(R.string.pref_echo_canceller_calibration_key);
		}
		detectVideoCodec(R.string.pref_video_codec_h264_key, "H264");
		if (!Version.hasNeon())
		{
			findPreference(R.string.pref_video_codec_h264_key).setEnabled(false);
			findPreference(R.string.pref_video_codec_h264_key).setDefaultValue(false);
		}
		addEchoPrefsListener();
		if (Hacks.needSoftvolume()) {
			Log.w("Using Audio Hack");
			checkAndDisableCheckbox(R.string.pref_audio_hacks_use_galaxys_hack_key);
		}
		if (!LinphoneManager.getLc().isTunnelAvailable()) {
			hidePreferenceCategory(R.string.pref_tunnel_key);
		}
		if (getResources().getBoolean(R.bool.hide_camera_settings)) {
			PreferenceScreen screen = getPreferenceScreen();
			PreferenceCategory videoSettings = (PreferenceCategory) screen.getPreference(CAMERA_SETTINGS_ID);
			videoSettings.removeAll();
			videoSettings.setLayoutResource(R.layout.hidden);
			Preference enableVideo = findPreference(R.string.pref_video_enable_key);
			enableVideo.setLayoutResource(R.layout.hidden);
		}
		if (getResources().getBoolean(R.bool.display_about_in_settings)) {
			getPreferenceScreen().getPreference(ABOUT_SETTINGS_ID).setOnPreferenceClickListener(new OnPreferenceClickListener() {
				@Override
				public boolean onPreferenceClick(Preference preference) {
					if (LinphoneActivity.isInstanciated()) {
						LinphoneActivity.instance().displayAbout();
						return true;
					}
					return false;
				}
			});
		} else {
			getPreferenceScreen().getPreference(ABOUT_SETTINGS_ID).setLayoutResource(R.layout.hidden);
		}
	}

	public void onCreate(Bundle bundle) {
		super.onCreate(bundle);
		mContext = getActivity();
		if (getResources().getBoolean(R.bool.hide_accounts)) {	
			PreferenceCategory accounts = (PreferenceCategory) getPreferenceScreen().getPreference(ACCOUNTS_SETTINGS_ID);
			accounts.removeAll();
			accounts.setLayoutResource(R.layout.hidden);
		}
		if (getResources().getBoolean(R.bool.hide_wizard)) {
			Preference wizard = (Preference) getPreferenceScreen().getPreference(WIZARD_SETTINGS_ID);
			wizard.setLayoutResource(R.layout.hidden);
		} else {
			addWizardPreferenceButton();
		}
		if (getResources().getBoolean(R.bool.disable_animations)) {
			uncheckDisableAndHideCheckbox(R.string.pref_animation_enable_key);
		}
		if (!getResources().getBoolean(R.bool.enable_linphone_friends)) {
			PreferenceCategory friends = (PreferenceCategory) getPreferenceScreen().getPreference(FRIENDS_SETTINGS_ID);
			friends.removeAll();
			friends.setLayoutResource(R.layout.hidden);
		}
		addTransportChecboxesListener();
		ecCalibratePref = findPreference(pref_echo_canceller_calibration_key);
		ecCalibratePref.setOnPreferenceClickListener(new OnPreferenceClickListener() {
			public boolean onPreferenceClick(Preference preference) {
				startEcCalibration();
				return false;
			}
		});
		ecPref = (CheckBoxPreference) findPreference(pref_echo_cancellation_key);
		mencPref = (ListPreference) findPreference(pref_media_encryption_key);
		boolean fastCpu = Version.hasFastCpu();
		if (fastCpu) {
			detectAudioCodec(pref_codec_ilbc_key, "iLBC", 8000, 1, false);
			findPreference(pref_codec_speex16_key).setEnabled(true);
		}
		initializeMediaEncryptionPreferences();
		detectAudioCodec(pref_codec_amr_key,"AMR", 8000, 1, false);
		detectAudioCodec(pref_codec_amrwb_key,"AMR-WB", 16000, 1, false);
		detectAudioCodec(R.string.pref_codec_silk16_key,"SILK",16000, 1, true);
		detectAudioCodec(R.string.pref_codec_silk24_key,"SILK",24000, 1, true);
		detectAudioCodec(R.string.pref_codec_g729_key,"G729",8000, 1, true);
		if (!Version.isVideoCapable()) {
			uncheckAndDisableCheckbox(pref_video_enable_key);
		} else {
			if (!AndroidCameraConfiguration.hasFrontCamera()) {
				uncheckDisableAndHideCheckbox(R.string.pref_video_use_front_camera_key);
			}
		}
		if (prefs().getBoolean(LinphoneActivity.PREF_FIRST_LAUNCH,true)) {
			doOnFirstLaunch();
		}
		if (Hacks.hasBuiltInEchoCanceller()) {
			uncheckDisableAndHideCheckbox(R.string.pref_echo_cancellation_key);
			findPreference(R.string.pref_echo_canceller_calibration_key).setLayoutResource(R.layout.hidden);
		}
		detectVideoCodec(R.string.pref_video_codec_h264_key, "H264");
		if (!Version.hasNeon())
		{
			findPreference(R.string.pref_video_codec_h264_key).setEnabled(false);
			findPreference(R.string.pref_video_codec_h264_key).setDefaultValue(false);
		}
		addEchoPrefsListener();
		if (Hacks.needSoftvolume()) {
			Log.w("Using Audio Hack");
			checkAndDisableCheckbox(R.string.pref_audio_hacks_use_galaxys_hack_key);
		}
		if (!LinphoneManager.getLc().isTunnelAvailable()) {
			hidePreferenceCategory(R.string.pref_tunnel_key);
		}
		if (getResources().getBoolean(R.bool.hide_camera_settings)) {
			PreferenceScreen screen = getPreferenceScreen();
			PreferenceCategory videoSettings = (PreferenceCategory) screen.getPreference(CAMERA_SETTINGS_ID);
			videoSettings.removeAll();
			videoSettings.setLayoutResource(R.layout.hidden);
			Preference enableVideo = findPreference(R.string.pref_video_enable_key);
			enableVideo.setLayoutResource(R.layout.hidden);
		}
		if (getResources().getBoolean(R.bool.display_about_in_settings)) {
			getPreferenceScreen().getPreference(ABOUT_SETTINGS_ID).setOnPreferenceClickListener(new OnPreferenceClickListener() {
				@Override
				public boolean onPreferenceClick(Preference preference) {
					if (LinphoneActivity.isInstanciated()) {
						LinphoneActivity.instance().displayAbout();
						return true;
					}
					return false;
				}
			});
		} else {
			getPreferenceScreen().getPreference(ABOUT_SETTINGS_ID).setLayoutResource(R.layout.hidden);
		}
	}
