<?xml version="1.0" encoding="utf-8"?>
<!--
/*
 * Copyright (C) 2007-2008 Esmertec AG.
 * Copyright (C) 2007-2008 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
  <PreferenceCategory android:title="@string/preferences__use_settings">
    <CheckBoxPreference android:defaultValue="true"
                      android:key="pref_all_sms"
                      android:summary="@string/preferences__use_textsecure_for_viewing_and_storing_all_incoming_text_messages"
                      android:title="@string/preferences__pref_all_sms_title" />

    <CheckBoxPreference android:defaultValue="true"
                      android:key="pref_all_mms"
                      android:summary="@string/preferences__use_textsecure_for_viewing_and_storing_all_incoming_multimedia_messages"
                      android:title="@string/preferences__pref_all_mms_title" />

   </PreferenceCategory>

  <PreferenceCategory android:title="@string/preferences__input_settings">
    <CheckBoxPreference android:defaultValue="false"
                      android:key="pref_enter_sends"
                      android:summary="@string/preferences__pressing_the_enter_key_will_send_text_messages"
                      android:title="@string/preferences__pref_enter_sends_title" />
   </PreferenceCategory>

  <PreferenceCategory android:title="@string/preferences__display_settings" android:key="pref_display_category">

    <Preference         android:key="pref_choose_identity"
                          android:title="@string/preferences__choose_identity"
                           android:summary="@string/preferences__choose_your_contact_entry_from_the_contacts_list"/>

  </PreferenceCategory>

   <PreferenceCategory android:title="@string/preferences__encryption_settings">

      <Preference android:key="pref_change_passphrase"
                  android:title="@string/preferences__change_passphrase"
                   android:summary="@string/preferences__change_my_passphrase"/>

       <CheckBoxPreference android:defaultValue="true"
                           android:key="pref_auto_complete_key_exchange"
                           android:title="@string/preferences__complete_key_exchanges"
                           android:summary="@string/preferences__automatically_complete_key_exchanges_for_new_sessions_or_for_existing_sessions_with_the_same_identity_key" />

    <CheckBoxPreference android:defaultValue="true"
                        android:key="pref_key_tag_whitespace"
                        android:summary="@string/preferences__include_a_whitespace_tag_at_the_end_of_every_non_encrypted_message"
                        android:title="@string/preferences__include_whitespace_tag" />

    <CheckBoxPreference android:defaultValue="true"
                        android:key="pref_send_identity_key"
                        android:summary="@string/preferences__sign_key_exchange_messages_with_identity_key"
                        android:title="@string/preferences__sign_key_exchange" />

    <CheckBoxPreference android:defaultValue="false"
                        android:key="pref_timeout_passphrase"
                        android:summary="@string/preferences__forget_passphrase_from_memory_after_some_interval"
                        android:title="@string/preferences__timeout_passphrase" />


    <org.thoughtcrime.securesms.preferences.PassphraseTimeoutPreference
                        android:key="pref_timeout_interval"
                        android:defaultValue="300"
                        android:title="@string/preferences__pref_timeout_interval_title"
                        android:summary="@string/preferences__the_amount_of_time_to_wait_before_forgetting_passphrase"
                        android:dependency="pref_timeout_passphrase"
                        android:dialogTitle="@string/preferences__pref_timeout_interval_dialogtitle" />

   </PreferenceCategory>

  <PreferenceCategory android:title="@string/preferences__identity_key_settings">
     <Preference android:key="pref_view_identity"
                  android:title="@string/preferences__view_my_identity_key"
                   android:summary="@string/preferences__view_my_identity_key"/>

     <Preference android:key="pref_export_identity"
                  android:title="@string/preferences__export_my_identity_key"
                   android:summary="@string/preferences__export_my_identity_key"/>

     <Preference android:key="pref_import_identity"
                  android:title="@string/preferences__import_contacts_key"
                   android:summary="@string/preferences__import_an_identity_key_from_a_contact"/>

     <Preference android:key="pref_manage_identity"
                  android:title="@string/preferences__manage_identity_keys"
                   android:summary="@string/preferences__manage_configured_identity_keys"/>
  </PreferenceCategory>

  <PreferenceCategory android:title="@string/preferences__notification_settings">
    <CheckBoxPreference android:key="pref_key_enable_notifications"
                        android:title="@string/preferences__notifications"
                        android:summary="@string/preferences__display_message_notifications_in_status_bar"
                        android:defaultValue="true" />
    <ListPreference
                      android:key="pref_led_color"
                      android:defaultValue="green"
                      android:title="@string/preferences__led_color"
                      android:dependency="pref_key_enable_notifications"
                      android:summary="@string/preferences__change_notification_led_color"
                      android:entries="@array/pref_led_color_entries"
                      android:entryValues="@array/pref_led_color_values"
                      android:dialogTitle="@string/preferences__select_led_color" />

    <org.thoughtcrime.securesms.preferences.LedBlinkPatternListPreference
                      android:key="pref_led_blink"
                      android:defaultValue="500,2000"
                      android:title="@string/preferences__pref_led_blink_title"
                      android:dependency="pref_key_enable_notifications"
                      android:summary="@string/preferences__change_notification_blink_pattern"
                      android:entries="@array/pref_led_blink_pattern_entries"
                      android:entryValues="@array/pref_led_blink_pattern_values"
                      android:dialogTitle="@string/preferences__pref_led_blink_dialogtitle" />


    <RingtonePreference android:layout="?android:attr/preferenceLayoutChild"
                        android:dependency="pref_key_enable_notifications"
                        android:key="pref_key_ringtone"
                        android:title="@string/preferences__select_ringtone"
                        android:ringtoneType="notification"
                        android:defaultValue="content://settings/system/notification_sound" />
    <CheckBoxPreference android:layout="?android:attr/preferenceLayoutChild"
                        android:dependency="pref_key_enable_notifications"
                        android:key="pref_key_vibrate"
                        android:defaultValue="true"
                        android:title="@string/preferences__vibrate"
                        android:summary="@string/preferences__also_vibrate_when_notified" />
  </PreferenceCategory>
  
  <PreferenceCategory android:title="@string/preferences__advanced_mms_access_point_names">
      <CheckBoxPreference android:key="pref_use_local_apns"
                          android:defaultValue="false"
                          android:title="@string/preferences__enable_local_apns"
                          android:summary="@string/preferences__use_apn_information_configured_here_when_system_apn_information_is_unavailable"/>
      
      <EditTextPreference android:key="pref_apn_mmsc_host"
                          android:title="@string/preferences__mmsc_url_required"
                          android:dependency="pref_use_local_apns" />
      
      <EditTextPreference android:key="pref_apn_mms_proxy"
                          android:title="@string/preferences__mms_proxy_optional"
                          android:dependency="pref_use_local_apns" />
  </PreferenceCategory>
  
</PreferenceScreen>
