Separate resource file for settings default values

This commit is contained in:
Sylvain Berfini 2012-11-06 10:48:41 +01:00
parent 0690a29571
commit 9d565dcc9e
4 changed files with 96 additions and 42 deletions

View file

@ -13,6 +13,5 @@
<string name="about_text">Linphone %s SIP (rfc 3261) compatible phone under GNU Public License V2\n http://www.linphone.org\n\nInstructions\nhttp://www.linphone.org/m/help\n\n© 2011 Belledonne Communications</string>
<string name="tunnel_host"></string>
<string name="default_tunnel_mode_entry_value">@string/tunnel_mode_entry_value_disabled</string>
</resources>

View file

@ -6,7 +6,6 @@
<!--<string name="push_sender_id">622464153529</string>-->
<string name="default_domain">sip.linphone.org</string>
<string name="default_stun">stun.linphone.org</string>
<string name="wizard_url">https://www.linphone.org/wizard.php</string>
<string name="upload_url">https://www.linphone.org:444/upload.php</string>
@ -45,9 +44,6 @@
<bool name="forbid_self_call">false</bool>
<bool name="disable_chat">false</bool>
<string name="default_audio_port">7078</string>
<string name="default_video_port">9078</string>
<string name="about_bugreport_email">linphone-android@belledonne-communications.com</string>
</resources>

View file

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="pref_tunnel_host_default"></string>
<string name="pref_tunnel_port_default">443</string>
<string name="default_tunnel_mode_entry_value">@string/tunnel_mode_entry_value_disabled</string>
<bool name="pref_echo_canceller_default">false</bool>
<!-- Audio codecs -->
<bool name="pref_codec_speex16_default">true</bool>
<bool name="pref_codec_speex8_default">true</bool>
<bool name="pref_codec_ilbc_default">true</bool>
<bool name="pref_codec_amr_default">true</bool>
<bool name="pref_codec_g729_default">true</bool>
<bool name="pref_codec_amrwb_default">true</bool>
<bool name="pref_codec_gsm_default">true</bool>
<bool name="pref_codec_g722_default">true</bool>
<bool name="pref_codec_silk24_default">false</bool>
<bool name="pref_codec_silk16_default">false</bool>
<bool name="pref_codec_pcmu_default">true</bool>
<bool name="pref_codec_pcma_default">true</bool>
<!-- Video -->
<bool name="pref_video_enable_default">true</bool>
<bool name="pref_video_use_front_camera_default">true</bool>
<bool name="pref_video_initiate_call_with_video_default">true</bool>
<bool name="pref_video_automatically_share_my_video_default">true</bool>
<bool name="pref_video_automatically_accept_video_default">true</bool>
<!-- Video codecs -->
<bool name="pref_video_codec_vp8_default">true</bool>
<bool name="pref_video_codec_h264_default">false</bool>
<bool name="pref_video_codec_mpeg4_default">false</bool>
<bool name="pref_video_codec_h263_default">false</bool>
<!-- Network -->
<bool name="pref_wifi_only_default">false</bool>
<string name="default_stun">stun.linphone.org</string>
<bool name="pref_ice_enabled_default">false</bool>
<bool name="pref_transport_use_standard_ports_default">false</bool>
<string name="pref_transport_default">@string/pref_transport_udp_key</string>
<string name="default_audio_port">7078</string>
<string name="default_video_port">9078</string>
<string name="pref_media_encryption_default">@string/pref_media_encryption_key_none</string>
<bool name="pref_push_notification_default">false</bool>
<bool name="pref_ipv6_default">false</bool>
<!-- Advanced -->
<bool name="pref_debug_default">false</bool>
<bool name="pref_animation_enable_default">false</bool>
<bool name="pref_autostart_default">false</bool>
<string name="pref_incoming_call_timeout_default">30</string>
<string name="pref_audio_use_specific_mode_default">0</string>
<bool name="pref_auto_accept_friends_default">false</bool>
</resources>

View file

@ -19,12 +19,13 @@
<EditTextPreference
android:title="@string/pref_tunnel_host"
android:key="@string/pref_tunnel_host_key"/>
android:key="@string/pref_tunnel_host_key"
android:defaultValue="@string/pref_tunnel_host_default"/>
<EditTextPreference
android:title="@string/pref_tunnel_port"
android:key="@string/pref_tunnel_port_key"
android:defaultValue="443"/>
android:defaultValue="@string/pref_tunnel_port_default"/>
<ListPreference
android:title="@string/pref_tunnel_mode"
@ -39,7 +40,7 @@
android:title="@string/pref_preferences">
<CheckBoxPreference
android:defaultValue="true"
android:defaultValue="@bool/pref_video_enable_default"
android:title="@string/pref_video_enable_title"
android:key="@string/pref_video_enable_key" />
@ -48,7 +49,7 @@
<CheckBoxPreference
android:key="@string/pref_echo_cancellation_key"
android:defaultValue="false"
android:defaultValue="@bool/pref_echo_canceller_default"
android:title="@string/pref_echo_cancellation"
android:summary="@string/pref_echo_cancellation_summary"/>
@ -62,66 +63,66 @@
<CheckBoxPreference
android:key="@string/pref_codec_speex16_key"
android:defaultValue="true"
android:defaultValue="@bool/pref_codec_speex16_default"
android:title="@string/pref_codec_speex16"/>
<CheckBoxPreference
android:key="@string/pref_codec_speex8_key"
android:defaultValue="true"
android:defaultValue="@bool/pref_codec_speex8_default"
android:title="@string/pref_codec_speex8"/>
<CheckBoxPreference
android:key="@string/pref_codec_ilbc_key"
android:title="@string/pref_codec_ilbc"
android:shouldDisableView="true"
android:shouldDisableView="@bool/pref_codec_ilbc_default"
android:summary="@string/pref_ilbc_summary"/>
<CheckBoxPreference
android:key="@string/pref_codec_amr_key"
android:title="@string/pref_codec_amr"
android:defaultValue="true"
android:defaultValue="@bool/pref_codec_speex16_default"
android:shouldDisableView="true" />
<CheckBoxPreference
android:key="@string/pref_codec_g729_key"
android:title="@string/pref_codec_g729"
android:defaultValue="true"
android:defaultValue="@bool/pref_codec_g729_default"
android:shouldDisableView="true" />
<CheckBoxPreference
android:key="@string/pref_codec_amrwb_key"
android:title="@string/pref_codec_amrwb"
android:defaultValue="true"
android:defaultValue="@bool/pref_codec_amrwb_default"
android:shouldDisableView="true" />
<CheckBoxPreference
android:key="@string/pref_codec_gsm_key"
android:defaultValue="true"
android:defaultValue="@bool/pref_codec_gsm_default"
android:title="@string/pref_codec_gsm"/>
<CheckBoxPreference
android:key="@string/pref_codec_g722_key"
android:defaultValue="false"
android:defaultValue="@bool/pref_codec_g722_default"
android:title="@string/pref_codec_g722"/>
<CheckBoxPreference
android:key="@string/pref_codec_silk24_key"
android:defaultValue="false"
android:defaultValue="@bool/pref_codec_silk24_default"
android:title="@string/pref_codec_silk24"/>
<CheckBoxPreference
android:key="@string/pref_codec_silk16_key"
android:defaultValue="false"
android:defaultValue="@bool/pref_codec_silk16_default"
android:title="@string/pref_codec_silk16"/>
<CheckBoxPreference
android:key="@string/pref_codec_pcmu_key"
android:defaultValue="true"
android:defaultValue="@bool/pref_codec_pcmu_default"
android:title="@string/pref_codec_pcmu"/>
<CheckBoxPreference
android:key="@string/pref_codec_pcma_key"
android:defaultValue="true"
android:defaultValue="@bool/pref_codec_pcma_default"
android:title="@string/pref_codec_pcma"/>
</PreferenceCategory>
@ -136,14 +137,14 @@
<CheckBoxPreference
android:key="@string/pref_video_use_front_camera_key"
android:defaultValue="true"
android:defaultValue="@bool/pref_video_use_front_camera_default"
android:title="@string/pref_video_use_front_camera_title"
android:dependency="@string/pref_video_enable_key"
android:layout="@layout/hidden"/>
<CheckBoxPreference
android:key="@string/pref_video_initiate_call_with_video_key"
android:defaultValue="true"
android:defaultValue="@bool/pref_video_initiate_call_with_video_default"
android:title="@string/pref_video_initiate_call_with_video_title"
android:summary="@string/pref_video_initiate_call_with_video"
android:dependency="@string/pref_video_enable_key"/>
@ -151,7 +152,7 @@
<CheckBoxPreference
android:key="@string/pref_video_automatically_share_my_video_key"
android:title="@string/pref_video_automatically_share_my_video_title"
android:defaultValue="true"
android:defaultValue="@bool/pref_video_automatically_share_my_video_default"
android:summary="@string/pref_video_automatically_share_my_video"
android:dependency="@string/pref_video_enable_key"
android:layout="@layout/hidden"/>
@ -159,7 +160,7 @@
<CheckBoxPreference
android:key="@string/pref_video_automatically_accept_video_key"
android:title="@string/pref_video_automatically_accept_video_title"
android:defaultValue="true"
android:defaultValue="@bool/pref_video_automatically_accept_video_default"
android:summary="@string/pref_video_automatically_accept_video"
android:dependency="@string/pref_video_enable_key"/>
@ -172,22 +173,22 @@
<CheckBoxPreference
android:key="@string/pref_video_codec_vp8_key"
android:title="@string/pref_video_codec_vp8_title"
android:defaultValue="true"/>
android:defaultValue="@bool/pref_video_codec_vp8_default"/>
<CheckBoxPreference
android:key="@string/pref_video_codec_h264_key"
android:title="@string/pref_video_codec_h264_title"
android:defaultValue="false"/>
android:defaultValue="@bool/pref_video_codec_h264_default"/>
<CheckBoxPreference
android:key="@string/pref_video_codec_mpeg4_key"
android:title="@string/pref_video_codec_mpeg4_title"
android:defaultValue="false"/>
android:defaultValue="@bool/pref_video_codec_mpeg4_default"/>
<CheckBoxPreference
android:key="@string/pref_video_codec_h263_key"
android:title="@string/pref_video_codec_h263_title"
android:defaultValue="false"
android:defaultValue="@bool/pref_video_codec_h263_default"
android:layout="@layout/hidden"/>
</PreferenceCategory>
@ -212,7 +213,8 @@
<CheckBoxPreference
android:key="@string/pref_wifi_only_key"
android:title="@string/pref_wifi_only"/>
android:title="@string/pref_wifi_only"
android:defaultValue="@bool/pref_wifi_only_default"/>
<EditTextPreference
android:title="@string/pref_stun_server"
@ -222,11 +224,12 @@
<CheckBoxPreference
android:title="@string/pref_ice_enable"
android:key="@string/pref_ice_enable_key"
android:defaultValue="false"/>
android:defaultValue="@bool/pref_ice_enabled_default"/>
<CheckBoxPreference
android:key="@string/pref_transport_use_standard_ports_key"
android:title="@string/pref_transport_use_standard_ports"/>
android:title="@string/pref_transport_use_standard_ports"
android:defaultValue="@bool/pref_transport_use_standard_ports_default"/>
<EditTextPreference
android:key="@string/pref_audio_port_key"
@ -245,22 +248,22 @@
<ListPreference
android:title="@string/pref_transport"
android:key="@string/pref_transport_key"
android:defaultValue="@string/pref_transport_udp_key" />
android:defaultValue="@string/pref_transport_default" />
<ListPreference
android:title="@string/pref_media_encryption"
android:key="@string/pref_media_encryption_key"
android:defaultValue="@string/pref_media_encryption_key_none" />
android:defaultValue="@string/pref_media_encryption_default" />
<CheckBoxPreference
android:key="@string/pref_push_notification_key"
android:title="@string/pref_push_notification"
android:defaultValue="false"/>
android:defaultValue="@bool/pref_push_notification_default"/>
<CheckBoxPreference
android:key="@string/pref_ipv6_key"
android:title="@string/pref_ipv6_title"
android:defaultValue="false" />
android:defaultValue="@bool/pref_ipv6_default" />
</PreferenceScreen>
@ -270,22 +273,22 @@
<CheckBoxPreference
android:key="@string/pref_debug_key"
android:title="@string/pref_debug"
android:defaultValue="false"/>
android:defaultValue="@bool/pref_debug_default"/>
<CheckBoxPreference
android:defaultValue="false"
android:defaultValue="@bool/pref_animation_enable_default"
android:title="@string/pref_animation_enable_title"
android:key="@string/pref_animation_enable_key" />
<CheckBoxPreference
android:title="@string/pref_autostart"
android:key="@string/pref_autostart_key"
android:defaultValue="false"/>
android:defaultValue="@bool/pref_autostart_default"/>
<EditTextPreference
android:key="@string/pref_incoming_call_timeout_key"
android:title="@string/pref_incoming_call_timeout_title"
android:defaultValue="30"
android:defaultValue="@string/pref_incoming_call_timeout_default"
android:layout="@layout/hidden"/>
<PreferenceScreen
@ -304,7 +307,7 @@
android:key="@string/pref_audio_use_specific_mode_key"
android:title="@string/pref_audio_use_specific_mode_title"
android:summary="@string/pref_audio_use_specific_mode_summary"
android:defaultValue="0"
android:defaultValue="@string/pref_audio_use_specific_mode_default"
android:numeric="integer" />
</PreferenceScreen>
@ -321,7 +324,7 @@
android:key="@string/pref_auto_accept_friends_key"
android:title="@string/pref_auto_accept_friends_title"
android:summary="@string/pref_auto_accept_friends_desc"
android:defaultValue="false"/>
android:defaultValue="@bool/pref_auto_accept_friends_default"/>
</PreferenceCategory>