Skip to content
Snippets Groups Projects
Commit 5de91788 authored by alision's avatar alision
Browse files

* #27062 Merged Legal and Contribute screens

* #27064 Hidden unused preferences
parent 3064f46a
No related branches found
No related tags found
No related merge requests found
Showing
with 495 additions and 473 deletions
res/drawable/logo_sfl_coul_rgb.png

25 KiB

......@@ -7,7 +7,6 @@
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:background="@color/holo_red_light"
tools:context=".ActivityHolder" >
......
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2004-2012 Savoir-Faire Linux Inc.
Copyright (C) 2004-2013 Savoir-Faire Linux Inc.
Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
......
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/padding_medium" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<ImageView
android:id="@+id/logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:src="@drawable/logo_sfl_coul_rgb" />
<TextView
android:id="@+id/app_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/logo"
android:gravity="center"
android:text="@string/app_name"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/licence"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/app_name"
android:text="@string/copyright"
android:textAppearance="?android:attr/textAppearanceSmall" />
</RelativeLayout>
</ScrollView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="CONTRIBUTE"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="LEGAL"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>
......@@ -61,8 +61,7 @@ as that of the covered work.
</string-array>
<string-array name="menu_items_help">
<item>@string/menu_item_help_gestures</item>
<item>@string/menu_item_help_info</item>
<item>@string/menu_item_help_contribute</item>
<item>@string/menu_item_about</item>
</string-array>
<string-array name="call_actions">
<item>@string/action_call_attended_transfer</item>
......
......@@ -35,7 +35,7 @@ as that of the covered work.
<string name="app_name">SFLphone</string>
<!-- SFLPhoneActivity -->
<string name="close_msg">Press back again to exit</string>
<string name="close_msg">Press back again to leave</string>
<string name="title_section0">Dial</string>
<string name="title_section1">Call</string>
<string name="title_section2">History</string>
......@@ -57,8 +57,7 @@ as that of the covered work.
<!-- Help -->
<string name="menu_item_help_gestures">Gestures</string>
<string name="menu_item_help_info">Legal Information</string>
<string name="menu_item_help_contribute">Contribute</string>
<string name="menu_item_about">About SFLphone</string>
<!-- Preferences -->
<string name="preference_section1">Accounts</string>
......@@ -166,6 +165,6 @@ as that of the covered work.
<string name="action_call_stop_record">Stop Recording</string>
<string name="title_activity_activity_holder">ActivityHolder</string>
<string name="action_settings">Settings</string>
<string name="hello_world">Hello world!</string>
<string name="copyright">Copyright \u00A9 2004-2013 Savoir-Faire Linux Inc.</string>
</resources>
\ No newline at end of file
......@@ -41,13 +41,13 @@ as that of the covered work.
android:title="Account enabled"
android:summaryOn="enabled"
android:summaryOff="disabled"/>
<EditTextPreference
android:id="@+id/account_creation_type"
android:key="Account.type"
android:persistent="false"
android:defaultValue="SIP"
android:title="Type"
android:summary="SIP"/>
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_type" -->
<!-- android:key="Account.type" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="SIP" -->
<!-- android:title="Type" -->
<!-- android:summary="SIP"/> -->
<EditTextPreference
android:id="@+id/account_creation_alias"
android:key="Account.alias"
......@@ -69,13 +69,13 @@ as that of the covered work.
android:defaultValue=""
android:title="Username"
android:summary=""/>
<EditTextPreference
android:id="@+id/account_creation_routeset"
android:key="Account.routeset"
android:persistent="false"
android:defaultValue=""
android:title="Route Set"
android:summary=""/>
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_routeset" -->
<!-- android:key="Account.routeset" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="" -->
<!-- android:title="Route Set" -->
<!-- android:summary=""/> -->
<EditTextPreference
android:id="@+id/account_creation_password"
android:key="Account.password"
......@@ -83,323 +83,323 @@ as that of the covered work.
android:defaultValue=""
android:title="Password"
android:summary=""/>
<EditTextPreference
android:id="@+id/account_creation_realm"
android:key="Account.realm"
android:persistent="false"
android:defaultValue="*"
android:title="Realm"
android:summary="*"/>
<EditTextPreference
android:id="@+id/account_creation_useragent"
android:key="Account.useragent"
android:persistent="false"
android:defaultValue="SFLPhone"
android:title="User Agent"
android:summary="SFLPhone"/>
</PreferenceCategory>
<PreferenceCategory
android:id="@+id/account_advanced_category"
android:title="Advanced settings">
<EditTextPreference
android:id="@+id/account_creation_registration_expire"
android:key="Account.registrationExpire"
android:persistent="false"
android:defaultValue="60"
android:title="Registration Expire"
android:summary="60"/>
<CheckBoxPreference
android:id="@+id/account_creation_autoanswer"
android:key="Account.autoAnswer"
android:persistent="false"
android:defaultValue="false"
android:title="Auto Answer"
android:summaryOn="enabled"
android:summaryOff="disabled"/>
<EditTextPreference
android:id="@+id/account_creation_registration_status"
android:key="Account.registrationStatus"
android:persistent="false"
android:defaultValue=""
android:title="Registration Status"
android:summary=""/>
<EditTextPreference
android:id="@+id/account_creation_registration_state_code"
android:key="Account.registrationCode"
android:persistent="false"
android:defaultValue=""
android:title="Registration Code"
android:summary=""/>
<EditTextPreference
android:id="@+id/account_creation_registration_state_desc"
android:key="Account.registrationDescription"
android:persistent="false"
android:defaultValue=""
android:title="Registration Desciption"
android:summary=""/>
<EditTextPreference
android:id="@+id/account_creation_credential_number"
android:key="Credential.count"
android:persistent="false"
android:defaultValue="0"
android:title="Credential Number"
android:summary="0"/>
<EditTextPreference
android:id="@+id/account_creation_dtmf_type"
android:key="Account.dtmfType"
android:persistent="false"
android:defaultValue="SIP"
android:title="DTMF Type"
android:summary="SIP"/>
<EditTextPreference
android:id="@+id/account_creation_ringtone_path"
android:key="Account.ringtonePath"
android:persistent="false"
android:defaultValue=""
android:title="Ringtone Path"/>
<CheckBoxPreference
android:id="@+id/account_creation_ringtone_enabled"
android:key="Account.ringtoneEnabled"
android:persistent="false"
android:defaultValue="true"
android:title="Ringtone Enabled"/>
<CheckBoxPreference
android:id="@+id/account_creation_keep_alive"
android:key="Account.keepAliveEnabled"
android:persistent="false"
android:defaultValue="false"
android:title="Keep Alive"/>
<ListPreference
android:id="@+id/account_creation_local_interface"
android:key="Account.localInterface"
android:persistent="false"
android:defaultValue="wlan0"
android:title="Local Interface"
android:summary="wlan0"/>
<CheckBoxPreference
android:id="@+id/account_creation_published_sameas_local"
android:key="Account.publishedSameAsLocal"
android:persistent="false"
android:defaultValue="false"
android:title="Published same as local"
android:summaryOn="yes"
android:summaryOff="no"/>
<EditTextPreference
android:id="@+id/account_creation_local_port"
android:key="Account.localPort"
android:persistent="false"
android:defaultValue="5070"
android:title="Local Port"
android:summary="5070"/>
<EditTextPreference
android:id="@+id/account_creation_published_port"
android:key="Account.publishedPort"
android:persistent="false"
android:defaultValue="5070"
android:title="Published Port"
android:summary="5070"/>
<EditTextPreference
android:id="@+id/account_creation_published_address"
android:key="Account.publishedAddress"
android:persistent="false"
android:defaultValue="0.0.0.0"
android:title="Published Address"
android:summary="0.0.0.0"/>
<EditTextPreference
android:id="@+id/account_creation_display_name"
android:key="Account.displayName"
android:persistent="false"
android:defaultValue="SFLPhone"
android:title="Display Name"
android:summary="SFLPhone"/>
<CheckBoxPreference
android:id="@+id/account_creation_stun_enable"
android:key="STUN.enable"
android:persistent="false"
android:defaultValue="false"
android:title="Stun Enabled"
android:summaryOn="enabled"
android:summaryOff="disabled"/>
<EditTextPreference
android:id="@+id/account_creation_stun_server"
android:key="STUN.server"
android:persistent="false"
android:defaultValue=""
android:title="Stun Server"
android:summary=""/>
</PreferenceCategory>
<PreferenceCategory
android:id="@+id/account_srtp_category"
android:title="SRTP settings">
<CheckBoxPreference
android:id="@+id/account_creation_srtp_enable"
android:key="SRTP.enable"
android:persistent="false"
android:defaultValue="false"
android:title="SRTP Enabled"
android:summaryOn="enabled"
android:summaryOff="disabled"/>
<CheckBoxPreference
android:id="@+id/account_creation_srtp_key_exchange"
android:key="SRTP.keyExchange"
android:persistent="false"
android:defaultValue="false"
android:title="SRTP Key Exchange"
android:summaryOn="enabled"
android:summaryOff="disabled"/>
<CheckBoxPreference
android:id="@+id/account_creation_srtp_encryp_algo"
android:key="SRTP.encryptionAlgorithm"
android:persistent="false"
android:defaultValue="false"
android:title="SRTP Encrypt Algo"
android:summaryOn="enabled"
android:summaryOff="disabled"/>
<CheckBoxPreference
android:id="@+id/account_creation_srtp_rtp_fallback"
android:key="SRTP.rtpFallback"
android:persistent="false"
android:defaultValue="false"
android:title="SRTP RTP Fallback"
android:summaryOn="enabled"
android:summaryOff="disabled"/>
<CheckBoxPreference
android:id="@+id/account_creation_srtp_hello_hash"
android:key="ZRTP.helloHashEnable"
android:persistent="false"
android:defaultValue="disabled"
android:title="ZRTP Hello Hash"
android:summaryOn="enabled"
android:summaryOff="disabled"/>
<CheckBoxPreference
android:id="@+id/account_creation_srtp_display_sas"
android:key="ZRTP.displaySAS"
android:persistent="false"
android:defaultValue="false"
android:title="ZRTP Display SAS"
android:summaryOn="enabled"
android:summaryOff="disabled"/>
<CheckBoxPreference
android:id="@+id/account_creation_srtp_supported_warning"
android:key="ZRTP.notSuppWarning"
android:persistent="false"
android:defaultValue="false"
android:title="ZRTP Not Supported Warning"
android:summaryOn="enabled"
android:summaryOff="disabled"/>
<CheckBoxPreference
android:id="@+id/account_creation_srtp_displaysas_once"
android:key="ZRTP.displaySasOnce"
android:persistent="false"
android:defaultValue="false"
android:title="ZRTP Display SAS Once"
android:summaryOn="enabled"
android:summaryOff="disabled"/>
</PreferenceCategory>
<PreferenceCategory
android:id="@+id/account_tls_category"
android:title="TLS settings">
<CheckBoxPreference
android:id="@+id/account_creation_tls_enable"
android:key="TLS.enable"
android:persistent="false"
android:defaultValue="false"
android:title="TLS Enabled"
android:summaryOn="enabled"
android:summaryOff="disabled"/>
<EditTextPreference
android:id="@+id/account_creation_tls_listener_port"
android:key="TLS.listenerPort"
android:persistent="false"
android:defaultValue="5061"
android:title="Listener Port"
android:summary="5061"/>
<EditTextPreference
android:id="@+id/account_creation_tls_certificate_list_file"
android:key="TLS.certificateListFile"
android:persistent="false"
android:defaultValue=""
android:title="TLS Certificate List File"
android:summary=""/>
<EditTextPreference
android:id="@+id/account_creation_tls_certificate_file"
android:key="TLS.certificateFile"
android:persistent="false"
android:defaultValue=""
android:title="TLS Certificate File"
android:summary=""/>
<EditTextPreference
android:id="@+id/account_creation_tls_private_key_file"
android:key="TLS.privateKeyFile"
android:persistent="false"
android:defaultValue="disabled"
android:title="TLS Private Key File"
android:summary="disabled"/>
<EditTextPreference
android:id="@+id/account_creation_tls_password"
android:key="TLS.password"
android:persistent="false"
android:defaultValue=""
android:title="TLS Password"
android:summary=""/>
<EditTextPreference
android:id="@+id/account_creation_tls_method"
android:key="TLS.method"
android:persistent="false"
android:defaultValue=""
android:title="TLS Method"
android:summary=""/>
<EditTextPreference
android:id="@+id/account_creation_tls_ciphers"
android:key="TLS.ciphers"
android:persistent="false"
android:defaultValue=""
android:title="TLS Ciphers"
android:summary=""/>
<EditTextPreference
android:id="@+id/account_creation_tls_server_name"
android:key="TLS.serverName"
android:persistent="false"
android:defaultValue=""
android:title="TLS Server Name"
android:summary=""/>
<CheckBoxPreference
android:id="@+id/account_creation_tls_verify_server"
android:key="TLS.verifyServer"
android:persistent="false"
android:defaultValue="false"
android:title="TLS Verify Server"
android:summaryOn="enabled"
android:summaryOff="disabled"/>
<CheckBoxPreference
android:id="@+id/account_creation_tls_verify_client"
android:key="TLS.verifyClient"
android:persistent="false"
android:defaultValue="false"
android:title="TLS Verify Client"
android:summaryOn="enabled"
android:summaryOff="disabled"/>
<CheckBoxPreference
android:id="@+id/account_creation_tls_require_client_cert"
android:key="TLS.requireClientCertificate"
android:persistent="false"
android:defaultValue="false"
android:title="TLS Require Client Certificate"
android:summaryOn="enabled"
android:summaryOff="disabled"/>
<EditTextPreference
android:id="@+id/account_creation_tls_timeout_sec"
android:key="TLS.negotiationTimeoutSec"
android:persistent="false"
android:defaultValue="60"
android:title="TLS Timeout Sec"
android:summary="60"/>
<EditTextPreference
android:id="@+id/account_creation_tls_timeout_msec"
android:key="TLS.negotiationTimeoutMsec"
android:persistent="false"
android:defaultValue="0"
android:title="TLS Timeout Msec"
android:summary="0"/>
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_realm" -->
<!-- android:key="Account.realm" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="*" -->
<!-- android:title="Realm" -->
<!-- android:summary="*"/> -->
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_useragent" -->
<!-- android:key="Account.useragent" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="SFLPhone" -->
<!-- android:title="User Agent" -->
<!-- android:summary="SFLPhone"/> -->
</PreferenceCategory>
<!-- <PreferenceCategory -->
<!-- android:id="@+id/account_advanced_category" -->
<!-- android:title="Advanced settings"> -->
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_registration_expire" -->
<!-- android:key="Account.registrationExpire" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="60" -->
<!-- android:title="Registration Expire" -->
<!-- android:summary="60"/> -->
<!-- <CheckBoxPreference -->
<!-- android:id="@+id/account_creation_autoanswer" -->
<!-- android:key="Account.autoAnswer" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="false" -->
<!-- android:title="Auto Answer" -->
<!-- android:summaryOn="enabled" -->
<!-- android:summaryOff="disabled"/> -->
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_registration_status" -->
<!-- android:key="Account.registrationStatus" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="" -->
<!-- android:title="Registration Status" -->
<!-- android:summary=""/> -->
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_registration_state_code" -->
<!-- android:key="Account.registrationCode" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="" -->
<!-- android:title="Registration Code" -->
<!-- android:summary=""/> -->
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_registration_state_desc" -->
<!-- android:key="Account.registrationDescription" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="" -->
<!-- android:title="Registration Desciption" -->
<!-- android:summary=""/> -->
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_credential_number" -->
<!-- android:key="Credential.count" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="0" -->
<!-- android:title="Credential Number" -->
<!-- android:summary="0"/> -->
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_dtmf_type" -->
<!-- android:key="Account.dtmfType" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="SIP" -->
<!-- android:title="DTMF Type" -->
<!-- android:summary="SIP"/> -->
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_ringtone_path" -->
<!-- android:key="Account.ringtonePath" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="" -->
<!-- android:title="Ringtone Path"/> -->
<!-- <CheckBoxPreference -->
<!-- android:id="@+id/account_creation_ringtone_enabled" -->
<!-- android:key="Account.ringtoneEnabled" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="true" -->
<!-- android:title="Ringtone Enabled"/> -->
<!-- <CheckBoxPreference -->
<!-- android:id="@+id/account_creation_keep_alive" -->
<!-- android:key="Account.keepAliveEnabled" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="false" -->
<!-- android:title="Keep Alive"/> -->
<!-- <ListPreference -->
<!-- android:id="@+id/account_creation_local_interface" -->
<!-- android:key="Account.localInterface" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="wlan0" -->
<!-- android:title="Local Interface" -->
<!-- android:summary="wlan0"/> -->
<!-- <CheckBoxPreference -->
<!-- android:id="@+id/account_creation_published_sameas_local" -->
<!-- android:key="Account.publishedSameAsLocal" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="false" -->
<!-- android:title="Published same as local" -->
<!-- android:summaryOn="yes" -->
<!-- android:summaryOff="no"/> -->
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_local_port" -->
<!-- android:key="Account.localPort" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="5070" -->
<!-- android:title="Local Port" -->
<!-- android:summary="5070"/> -->
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_published_port" -->
<!-- android:key="Account.publishedPort" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="5070" -->
<!-- android:title="Published Port" -->
<!-- android:summary="5070"/> -->
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_published_address" -->
<!-- android:key="Account.publishedAddress" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="0.0.0.0" -->
<!-- android:title="Published Address" -->
<!-- android:summary="0.0.0.0"/> -->
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_display_name" -->
<!-- android:key="Account.displayName" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="SFLPhone" -->
<!-- android:title="Display Name" -->
<!-- android:summary="SFLPhone"/> -->
<!-- <CheckBoxPreference -->
<!-- android:id="@+id/account_creation_stun_enable" -->
<!-- android:key="STUN.enable" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="false" -->
<!-- android:title="Stun Enabled" -->
<!-- android:summaryOn="enabled" -->
<!-- android:summaryOff="disabled"/> -->
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_stun_server" -->
<!-- android:key="STUN.server" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="" -->
<!-- android:title="Stun Server" -->
<!-- android:summary=""/> -->
<!-- </PreferenceCategory> -->
<!-- <PreferenceCategory -->
<!-- android:id="@+id/account_srtp_category" -->
<!-- android:title="SRTP settings"> -->
<!-- <CheckBoxPreference -->
<!-- android:id="@+id/account_creation_srtp_enable" -->
<!-- android:key="SRTP.enable" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="false" -->
<!-- android:title="SRTP Enabled" -->
<!-- android:summaryOn="enabled" -->
<!-- android:summaryOff="disabled"/> -->
<!-- <CheckBoxPreference -->
<!-- android:id="@+id/account_creation_srtp_key_exchange" -->
<!-- android:key="SRTP.keyExchange" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="false" -->
<!-- android:title="SRTP Key Exchange" -->
<!-- android:summaryOn="enabled" -->
<!-- android:summaryOff="disabled"/> -->
<!-- <CheckBoxPreference -->
<!-- android:id="@+id/account_creation_srtp_encryp_algo" -->
<!-- android:key="SRTP.encryptionAlgorithm" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="false" -->
<!-- android:title="SRTP Encrypt Algo" -->
<!-- android:summaryOn="enabled" -->
<!-- android:summaryOff="disabled"/> -->
<!-- <CheckBoxPreference -->
<!-- android:id="@+id/account_creation_srtp_rtp_fallback" -->
<!-- android:key="SRTP.rtpFallback" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="false" -->
<!-- android:title="SRTP RTP Fallback" -->
<!-- android:summaryOn="enabled" -->
<!-- android:summaryOff="disabled"/> -->
<!-- <CheckBoxPreference -->
<!-- android:id="@+id/account_creation_srtp_hello_hash" -->
<!-- android:key="ZRTP.helloHashEnable" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="disabled" -->
<!-- android:title="ZRTP Hello Hash" -->
<!-- android:summaryOn="enabled" -->
<!-- android:summaryOff="disabled"/> -->
<!-- <CheckBoxPreference -->
<!-- android:id="@+id/account_creation_srtp_display_sas" -->
<!-- android:key="ZRTP.displaySAS" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="false" -->
<!-- android:title="ZRTP Display SAS" -->
<!-- android:summaryOn="enabled" -->
<!-- android:summaryOff="disabled"/> -->
<!-- <CheckBoxPreference -->
<!-- android:id="@+id/account_creation_srtp_supported_warning" -->
<!-- android:key="ZRTP.notSuppWarning" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="false" -->
<!-- android:title="ZRTP Not Supported Warning" -->
<!-- android:summaryOn="enabled" -->
<!-- android:summaryOff="disabled"/> -->
<!-- <CheckBoxPreference -->
<!-- android:id="@+id/account_creation_srtp_displaysas_once" -->
<!-- android:key="ZRTP.displaySasOnce" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="false" -->
<!-- android:title="ZRTP Display SAS Once" -->
<!-- android:summaryOn="enabled" -->
<!-- android:summaryOff="disabled"/> -->
<!-- </PreferenceCategory> -->
<!-- <PreferenceCategory -->
<!-- android:id="@+id/account_tls_category" -->
<!-- android:title="TLS settings"> -->
<!-- <CheckBoxPreference -->
<!-- android:id="@+id/account_creation_tls_enable" -->
<!-- android:key="TLS.enable" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="false" -->
<!-- android:title="TLS Enabled" -->
<!-- android:summaryOn="enabled" -->
<!-- android:summaryOff="disabled"/> -->
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_tls_listener_port" -->
<!-- android:key="TLS.listenerPort" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="5061" -->
<!-- android:title="Listener Port" -->
<!-- android:summary="5061"/> -->
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_tls_certificate_list_file" -->
<!-- android:key="TLS.certificateListFile" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="" -->
<!-- android:title="TLS Certificate List File" -->
<!-- android:summary=""/> -->
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_tls_certificate_file" -->
<!-- android:key="TLS.certificateFile" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="" -->
<!-- android:title="TLS Certificate File" -->
<!-- android:summary=""/> -->
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_tls_private_key_file" -->
<!-- android:key="TLS.privateKeyFile" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="disabled" -->
<!-- android:title="TLS Private Key File" -->
<!-- android:summary="disabled"/> -->
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_tls_password" -->
<!-- android:key="TLS.password" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="" -->
<!-- android:title="TLS Password" -->
<!-- android:summary=""/> -->
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_tls_method" -->
<!-- android:key="TLS.method" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="" -->
<!-- android:title="TLS Method" -->
<!-- android:summary=""/> -->
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_tls_ciphers" -->
<!-- android:key="TLS.ciphers" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="" -->
<!-- android:title="TLS Ciphers" -->
<!-- android:summary=""/> -->
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_tls_server_name" -->
<!-- android:key="TLS.serverName" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="" -->
<!-- android:title="TLS Server Name" -->
<!-- android:summary=""/> -->
<!-- <CheckBoxPreference -->
<!-- android:id="@+id/account_creation_tls_verify_server" -->
<!-- android:key="TLS.verifyServer" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="false" -->
<!-- android:title="TLS Verify Server" -->
<!-- android:summaryOn="enabled" -->
<!-- android:summaryOff="disabled"/> -->
<!-- <CheckBoxPreference -->
<!-- android:id="@+id/account_creation_tls_verify_client" -->
<!-- android:key="TLS.verifyClient" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="false" -->
<!-- android:title="TLS Verify Client" -->
<!-- android:summaryOn="enabled" -->
<!-- android:summaryOff="disabled"/> -->
<!-- <CheckBoxPreference -->
<!-- android:id="@+id/account_creation_tls_require_client_cert" -->
<!-- android:key="TLS.requireClientCertificate" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="false" -->
<!-- android:title="TLS Require Client Certificate" -->
<!-- android:summaryOn="enabled" -->
<!-- android:summaryOff="disabled"/> -->
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_tls_timeout_sec" -->
<!-- android:key="TLS.negotiationTimeoutSec" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="60" -->
<!-- android:title="TLS Timeout Sec" -->
<!-- android:summary="60"/> -->
<!-- <EditTextPreference -->
<!-- android:id="@+id/account_creation_tls_timeout_msec" -->
<!-- android:key="TLS.negotiationTimeoutMsec" -->
<!-- android:persistent="false" -->
<!-- android:defaultValue="0" -->
<!-- android:title="TLS Timeout Msec" -->
<!-- android:summary="0"/> -->
<!-- </PreferenceCategory> -->
</PreferenceScreen>
......@@ -29,37 +29,39 @@ import android.provider.MediaStore.Audio.Media;
public interface AccountDetail {
public static class PreferenceEntry
{
public static class PreferenceEntry {
public String mKey;
public int mLabelId;
public boolean isTwoState;
public String mValue;
public PreferenceEntry(String key, int labelId)
{
public PreferenceEntry(String key, int labelId) {
mKey = key;
mLabelId = labelId;
isTwoState = false;
mValue = "";
}
public PreferenceEntry(String key, int labelId, boolean twoState)
{
public PreferenceEntry(String key, int labelId, boolean twoState) {
mKey = key;
mLabelId = labelId;
isTwoState = twoState;
mValue = "";
}
public PreferenceEntry(String key, int labelId, boolean twoState, String value)
{
public PreferenceEntry(String key, int labelId, boolean twoState, String value) {
mKey = key;
mLabelId = labelId;
isTwoState = twoState;
mValue = value;
}
public boolean isChecked() {
if (mValue.contentEquals("true"))
return true;
return false;
}
}
public static final String TAG = "PreferenceHashMap";
......@@ -72,8 +74,7 @@ public interface AccountDetail {
public String getDetailString(String key);
public void setDetailString(int position, String newValue);
public void setDetailString(String key, String newValue);
public boolean getDetailBoolean();
}
......@@ -23,6 +23,7 @@ package com.savoirfairelinux.sflphone.account;
import com.savoirfairelinux.sflphone.R;
import com.savoirfairelinux.sflphone.account.AccountDetail;
import com.savoirfairelinux.sflphone.account.AccountDetail.PreferenceEntry;
import android.util.Log;
......@@ -164,9 +165,15 @@ public class AccountDetailAdvanced implements AccountDetail {
return value;
}
public void setDetailString(int position, String newValue)
public void setDetailString(String key, String newValue)
{
privateArray.get(position).mValue = newValue;
for(int i = 0 ; i < privateArray.size() ; ++i) {
PreferenceEntry p = privateArray.get(i);
if(p.mKey.equals(key)) {
privateArray.get(i).mValue = newValue;
}
}
}
public boolean getDetailBoolean()
......
......@@ -138,9 +138,15 @@ public class AccountDetailBasic implements AccountDetail {
return value;
}
public void setDetailString(int position, String newValue)
public void setDetailString(String key, String newValue)
{
privateArray.get(position).mValue = newValue;
for(int i = 0 ; i < privateArray.size() ; ++i) {
PreferenceEntry p = privateArray.get(i);
if(p.mKey.equals(key)) {
privateArray.get(i).mValue = newValue;
}
}
}
......
......@@ -23,6 +23,7 @@ package com.savoirfairelinux.sflphone.account;
import com.savoirfairelinux.sflphone.R;
import com.savoirfairelinux.sflphone.account.AccountDetail;
import com.savoirfairelinux.sflphone.account.AccountDetail.PreferenceEntry;
import android.util.Log;
......@@ -134,9 +135,15 @@ public class AccountDetailSrtp implements AccountDetail{
return value;
}
public void setDetailString(int position, String newValue)
public void setDetailString(String key, String newValue)
{
privateArray.get(position).mValue = newValue;
for(int i = 0 ; i < privateArray.size() ; ++i) {
PreferenceEntry p = privateArray.get(i);
if(p.mKey.equals(key)) {
privateArray.get(i).mValue = newValue;
}
}
}
......
......@@ -23,6 +23,7 @@ package com.savoirfairelinux.sflphone.account;
import com.savoirfairelinux.sflphone.R;
import com.savoirfairelinux.sflphone.account.AccountDetail;
import com.savoirfairelinux.sflphone.account.AccountDetail.PreferenceEntry;
import android.util.Log;
......@@ -146,9 +147,15 @@ public class AccountDetailTls implements AccountDetail {
return value;
}
public void setDetailString(int position, String newValue)
public void setDetailString(String key, String newValue)
{
privateArray.get(position).mValue = newValue;
for(int i = 0 ; i < privateArray.size() ; ++i) {
PreferenceEntry p = privateArray.get(i);
if(p.mKey.equals(key)) {
privateArray.get(i).mValue = newValue;
}
}
}
public boolean getDetailBoolean()
......
......@@ -54,6 +54,7 @@ import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.Toast;
import com.savoirfairelinux.sflphone.R;
import com.savoirfairelinux.sflphone.account.AccountDetail;
......@@ -106,7 +107,7 @@ public class AccountPreferenceActivity extends PreferenceActivity {
}
getActionBar().setDisplayHomeAsUpEnabled(true);
requiredFields = new ArrayList<String>();
requiredFields.add(AccountDetailBasic.CONFIG_ACCOUNT_ALIAS);
requiredFields.add(AccountDetailBasic.CONFIG_ACCOUNT_HOSTNAME);
......@@ -122,9 +123,9 @@ public class AccountPreferenceActivity extends PreferenceActivity {
tlsDetails = new AccountDetailTls();
addPreferenceListener(basicDetails, changeBasicPreferenceListener);
addPreferenceListener(advancedDetails, changeAdvancedPreferenceListener);
addPreferenceListener(srtpDetails, changeSrtpPreferenceListener);
addPreferenceListener(tlsDetails, changeTlsPreferenceListener);
// addPreferenceListener(advancedDetails, changeAdvancedPreferenceListener);
// addPreferenceListener(srtpDetails, changeSrtpPreferenceListener);
// addPreferenceListener(tlsDetails, changeTlsPreferenceListener);
}
......@@ -148,9 +149,9 @@ public class AccountPreferenceActivity extends PreferenceActivity {
setPreferenceDetails(tlsDetails);
addPreferenceListener(basicDetails, changeBasicPreferenceListener);
addPreferenceListener(advancedDetails, changeAdvancedPreferenceListener);
addPreferenceListener(srtpDetails, changeSrtpPreferenceListener);
addPreferenceListener(tlsDetails, changeTlsPreferenceListener);
// addPreferenceListener(advancedDetails, changeAdvancedPreferenceListener);
// addPreferenceListener(srtpDetails, changeSrtpPreferenceListener);
// addPreferenceListener(tlsDetails, changeTlsPreferenceListener);
}
@Override
......@@ -191,7 +192,6 @@ public class AccountPreferenceActivity extends PreferenceActivity {
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
......@@ -205,6 +205,7 @@ public class AccountPreferenceActivity extends PreferenceActivity {
dialog.show();
break;
case R.id.menuitem_create:
Toast.makeText(this, "ACCOUNT_CREATED", Toast.LENGTH_LONG).show();
processAccount(result.ACCOUNT_CREATED);
break;
case R.id.menuitem_edit:
......@@ -229,7 +230,9 @@ public class AccountPreferenceActivity extends PreferenceActivity {
updateAccountDetails(accountDetails, advancedDetails);
updateAccountDetails(accountDetails, srtpDetails);
updateAccountDetails(accountDetails, tlsDetails);
accountDetails.put("Account.type", "SIP");
Toast.makeText(this, "updateAccountDetails", Toast.LENGTH_LONG).show();
bundle.putSerializable(AccountDetail.TAG, accountDetails);
Intent resultIntent = new Intent();
resultIntent.putExtras(bundle);
......@@ -251,7 +254,6 @@ public class AccountPreferenceActivity extends PreferenceActivity {
Log.i(TAG, "Looking for " + s);
Log.i(TAG, "Value " + pref.getText());
if (pref.getText().isEmpty()) {
Log.i(TAG, " INVALIDATED " + s + " " + pref.getText() + ";");
valid = false;
missingValue.add(pref.getTitle().toString());
}
......@@ -262,29 +264,46 @@ public class AccountPreferenceActivity extends PreferenceActivity {
private void updateAccountDetails(HashMap<String, String> accountDetails, AccountDetail det) {
for (AccountDetail.PreferenceEntry p : det.getDetailValues()) {
Preference pref = mPreferenceManager.findPreference(p.mKey);
if (pref != null) {
if (p.isTwoState) {
CheckBoxPreference boxPref = (CheckBoxPreference) pref;
accountDetails.put(p.mKey, boxPref.isChecked() ? "true" : "false");
} else {
if (p.mKey == AccountDetailAdvanced.CONFIG_LOCAL_INTERFACE) {
ListPreference list = (ListPreference) pref;
accountDetails.put(p.mKey, list.getValue());
} else {
EditTextPreference textPref = (EditTextPreference) pref;
accountDetails.put(p.mKey, textPref.getText());
}
}
Log.i(TAG, "updateAccountDetails: pref " + p.mKey + " value " + det.getDetailString(p.mKey));
if (p.isTwoState) {
accountDetails.put(p.mKey, det.getDetailString(p.mKey));
} else {
// if (p.mKey == AccountDetailAdvanced.CONFIG_LOCAL_INTERFACE) {
// accountDetails.put(p.mKey, det.getDetailString(p.mKey));
// } else {
accountDetails.put(p.mKey, det.getDetailString(p.mKey));
// }
}
// Preference pref = mPreferenceManager.findPreference(p.mKey);
// if (pref != null) {
// if (p.isTwoState) {
// CheckBoxPreference boxPref = (CheckBoxPreference) pref;
// accountDetails.put(p.mKey, boxPref.isChecked() ? "true" : "false");
// } else {
// if (p.mKey == AccountDetailAdvanced.CONFIG_LOCAL_INTERFACE) {
// ListPreference list = (ListPreference) pref;
// accountDetails.put(p.mKey, list.getValue());
// } else {
// EditTextPreference textPref = (EditTextPreference) pref;
// accountDetails.put(p.mKey, textPref.getText());
// }
// }
// }
}
}
Preference.OnPreferenceChangeListener changeBasicPreferenceListener = new Preference.OnPreferenceChangeListener() {
public boolean onPreferenceChange(Preference preference, Object newValue) {
preference.setSummary((CharSequence) newValue);
Log.i(TAG,"Changing preference value:" + (CharSequence) newValue);
basicDetails.setDetailString(preference.getOrder(), ((CharSequence) newValue).toString());
if (preference instanceof CheckBoxPreference) {
if ((Boolean) newValue == true)
basicDetails.setDetailString(preference.getKey(), ((Boolean) newValue).toString());
} else {
preference.setSummary((CharSequence) newValue);
Log.i(TAG, "Changing preference value:" + (CharSequence) newValue);
basicDetails.setDetailString(preference.getKey(), ((CharSequence) newValue).toString());
}
return true;
}
};
......@@ -292,7 +311,7 @@ public class AccountPreferenceActivity extends PreferenceActivity {
Preference.OnPreferenceChangeListener changeAdvancedPreferenceListener = new Preference.OnPreferenceChangeListener() {
public boolean onPreferenceChange(Preference preference, Object newValue) {
preference.setSummary((CharSequence) newValue);
advancedDetails.setDetailString(preference.getOrder(), ((CharSequence) newValue).toString());
advancedDetails.setDetailString(preference.getKey(), ((CharSequence) newValue).toString());
return true;
}
};
......@@ -300,7 +319,7 @@ public class AccountPreferenceActivity extends PreferenceActivity {
Preference.OnPreferenceChangeListener changeTlsPreferenceListener = new Preference.OnPreferenceChangeListener() {
public boolean onPreferenceChange(Preference preference, Object newValue) {
preference.setSummary((CharSequence) newValue);
tlsDetails.setDetailString(preference.getOrder(), ((CharSequence) newValue).toString());
tlsDetails.setDetailString(preference.getKey(), ((CharSequence) newValue).toString());
return true;
}
};
......@@ -308,7 +327,7 @@ public class AccountPreferenceActivity extends PreferenceActivity {
Preference.OnPreferenceChangeListener changeSrtpPreferenceListener = new Preference.OnPreferenceChangeListener() {
public boolean onPreferenceChange(Preference preference, Object newValue) {
preference.setSummary((CharSequence) newValue);
srtpDetails.setDetailString(preference.getOrder(), ((CharSequence) newValue).toString());
srtpDetails.setDetailString(preference.getKey(), ((CharSequence) newValue).toString());
return true;
}
};
......@@ -350,12 +369,12 @@ public class AccountPreferenceActivity extends PreferenceActivity {
private void addPreferenceListener(AccountDetail details, OnPreferenceChangeListener listener) {
for (AccountDetail.PreferenceEntry p : details.getDetailValues()) {
Log.i(TAG, "addPreferenceListener: pref " + p.mKey);
Log.i(TAG, "addPreferenceListener: pref " + p.mKey + p.mValue);
Preference pref = mPreferenceManager.findPreference(p.mKey);
if (pref != null) {
if (!p.isTwoState) {
pref.setOnPreferenceChangeListener(listener);
}
pref.setOnPreferenceChangeListener(listener);
} else {
Log.w(TAG, "addPreferenceListener: pref not found");
}
......
......@@ -31,19 +31,15 @@
package com.savoirfairelinux.sflphone.client;
import com.savoirfairelinux.sflphone.R;
import com.savoirfairelinux.sflphone.R.layout;
import com.savoirfairelinux.sflphone.R.menu;
import com.savoirfairelinux.sflphone.fragments.ContributeFragment;
import com.savoirfairelinux.sflphone.fragments.HelpGesturesFragment;
import com.savoirfairelinux.sflphone.fragments.LegalFragment;
import android.os.Bundle;
import android.app.Activity;
import android.app.FragmentTransaction;
import android.view.Menu;
import android.os.Bundle;
import android.view.MenuItem;
import com.savoirfairelinux.sflphone.R;
import com.savoirfairelinux.sflphone.fragments.AboutFragment;
import com.savoirfairelinux.sflphone.fragments.HelpGesturesFragment;
/**
* This Activity holds some conex fragments not requiring a lot of interaction: HelpGesturesFragment, LegalFragment, ContributeFragment
* @author lisional
......@@ -53,8 +49,7 @@ public class ActivityHolder extends Activity {
public interface args {
int FRAG_GESTURES = 0;
int FRAG_LEGAL = 1;
int FRAG_CONTRIBUTE = 2;
int FRAG_ABOUT= 1;
}
@Override
......@@ -68,11 +63,8 @@ public class ActivityHolder extends Activity {
case args.FRAG_GESTURES:
ft.replace(R.id.frag_container, new HelpGesturesFragment());
break;
case args.FRAG_LEGAL:
ft.replace(R.id.frag_container, new LegalFragment());
break;
case args.FRAG_CONTRIBUTE:
ft.replace(R.id.frag_container, new ContributeFragment());
case args.FRAG_ABOUT:
ft.replace(R.id.frag_container, new AboutFragment());
break;
}
......
/*
* Copyright (C) 2004-2012 Savoir-Faire Linux Inc.
* Copyright (C) 2004-2013 Savoir-Faire Linux Inc.
*
* Author: Alexandre Savard <alexandre.savard@savoirfairelinux.com>
*
......
......@@ -8,14 +8,18 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
public class LegalFragment extends Fragment {
public class AboutFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {
View inflatedView = inflater.inflate(R.layout.frag_legal, parent, false);
View inflatedView = inflater.inflate(R.layout.frag_about, parent, false);
getActivity().getActionBar().setTitle(R.string.menu_item_about);
return inflatedView;
}
}
......@@ -72,9 +72,9 @@ public class AccountManagementFragment extends PreferenceFragment {
private ISipService service = null;
ArrayList<AccountDetail.PreferenceEntry> basicDetailKeys = null;
ArrayList<AccountDetail.PreferenceEntry> advancedDetailKeys = null;
ArrayList<AccountDetail.PreferenceEntry> srtpDetailKeys = null;
ArrayList<AccountDetail.PreferenceEntry> tlsDetailKeys = null;
// ArrayList<AccountDetail.PreferenceEntry> advancedDetailKeys = null;
// ArrayList<AccountDetail.PreferenceEntry> srtpDetailKeys = null;
// ArrayList<AccountDetail.PreferenceEntry> tlsDetailKeys = null;
HashMap<String, Preference> accountPreferenceHashMap = null;
PreferenceScreen mRoot = null;
......@@ -88,9 +88,9 @@ public class AccountManagementFragment extends PreferenceFragment {
public AccountManagementFragment() {
basicDetailKeys = AccountDetailBasic.getPreferenceEntries();
advancedDetailKeys = AccountDetailAdvanced.getPreferenceEntries();
srtpDetailKeys = AccountDetailSrtp.getPreferenceEntries();
tlsDetailKeys = AccountDetailTls.getPreferenceEntries();
// advancedDetailKeys = AccountDetailAdvanced.getPreferenceEntries();
// srtpDetailKeys = AccountDetailSrtp.getPreferenceEntries();
// tlsDetailKeys = AccountDetailTls.getPreferenceEntries();
accountPreferenceHashMap = new HashMap<String, Preference>();
}
......@@ -153,8 +153,6 @@ public class AccountManagementFragment extends PreferenceFragment {
HashMap<String, String> accountDetails = new HashMap<String, String>();
accountDetails = (HashMap<String, String>) bundle.getSerializable(AccountDetail.TAG);
Log.w(TAG,"realm "+accountDetails.get(ServiceConstants.CONFIG_ACCOUNT_REALM));
Preference accountScreen = accountPreferenceHashMap.get(accountID);
mRoot.removePreference(accountScreen);
accountPreferenceHashMap.remove(accountID);
......
package com.savoirfairelinux.sflphone.fragments;
import com.savoirfairelinux.sflphone.R;
import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
public class ContributeFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {
View inflatedView = inflater.inflate(R.layout.frag_contribute, parent, false);
return inflatedView;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment