Partially Lokify UI

This commit is contained in:
Niels Andriesse 2019-07-16 17:09:15 +10:00
parent 862288abfd
commit ab99874ede
15 changed files with 134 additions and 91 deletions

View File

@ -37,7 +37,6 @@
android:textSize="25sp" android:textSize="25sp"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_toStartOf="@+id/search_action"
android:layout_marginStart="66dp"/> android:layout_marginStart="66dp"/>
<ImageView android:id="@+id/search_action" <ImageView android:id="@+id/search_action"
@ -45,6 +44,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:src="@drawable/ic_search_white_24dp" android:src="@drawable/ic_search_white_24dp"
android:paddingEnd="16dp" android:paddingEnd="16dp"
android:visibility="gone"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_centerVertical="true"/> android:layout_centerVertical="true"/>

View File

@ -30,7 +30,7 @@
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:layout_marginTop="32dp" android:layout_marginTop="32dp"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:text="@string/CreateProfileActivity_set_up_your_profile" android:text="@string/activity_profile_title"
app:layout_constraintBottom_toTopOf="@+id/name" app:layout_constraintBottom_toTopOf="@+id/name"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
@ -43,6 +43,7 @@
android:id="@+id/avatar_background" android:id="@+id/avatar_background"
android:layout_width="80dp" android:layout_width="80dp"
android:layout_height="80dp" android:layout_height="80dp"
android:visibility="gone"
android:layout_marginStart="32dp" android:layout_marginStart="32dp"
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
android:src="@drawable/circle_tintable" android:src="@drawable/circle_tintable"
@ -55,6 +56,7 @@
android:id="@+id/avatar_placeholder" android:id="@+id/avatar_placeholder"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
android:visibility="gone"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:src="@drawable/ic_profile_default" android:src="@drawable/ic_profile_default"
@ -69,6 +71,7 @@
android:id="@+id/avatar" android:id="@+id/avatar"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/avatar_background" app:layout_constraintBottom_toBottomOf="@+id/avatar_background"
app:layout_constraintEnd_toEndOf="@+id/avatar_background" app:layout_constraintEnd_toEndOf="@+id/avatar_background"
app:layout_constraintStart_toStartOf="@+id/avatar_background" app:layout_constraintStart_toStartOf="@+id/avatar_background"
@ -78,6 +81,7 @@
android:id="@+id/camera_icon" android:id="@+id/camera_icon"
android:layout_width="60dp" android:layout_width="60dp"
android:layout_height="60dp" android:layout_height="60dp"
android:visibility="gone"
android:layout_marginStart="35dp" android:layout_marginStart="35dp"
android:layout_marginTop="35dp" android:layout_marginTop="35dp"
android:cropToPadding="false" android:cropToPadding="false"
@ -90,18 +94,18 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginStart="16dp" android:layout_marginStart="49dp"
android:layout_marginTop="24dp" android:layout_marginTop="24dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp"
android:layout_weight="1" android:layout_weight="1"
android:hint="@string/profile_create_activity__your_name" android:hint="@string/activity_profile_display_name_edit_text_hint"
app:labeledEditText_background="?attr/conversation_background" app:labeledEditText_background="?attr/conversation_background"
app:labeledEditText_label="@string/CreateProfileActivity_profile_name" app:labeledEditText_label="@string/activity_profile_display_name_edit_text_description"
app:labeledEditText_textLayout="@layout/profile_name_text" app:labeledEditText_textLayout="@layout/profile_name_text"
app:layout_constraintBottom_toTopOf="@+id/description_text" app:layout_constraintBottom_toTopOf="@+id/description_text"
app:layout_constraintEnd_toStartOf="@+id/emoji_toggle" app:layout_constraintEnd_toStartOf="@+id/emoji_toggle"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/avatar_background" app:layout_constraintStart_toStartOf="@+id/avatar_background"
app:layout_constraintTop_toBottomOf="@+id/title" /> app:layout_constraintTop_toBottomOf="@+id/title" />
<org.thoughtcrime.securesms.components.emoji.EmojiToggle <org.thoughtcrime.securesms.components.emoji.EmojiToggle
@ -110,7 +114,7 @@
android:layout_height="37dp" android:layout_height="37dp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginTop="9dp" android:layout_marginTop="9dp"
android:layout_marginEnd="32dp" android:layout_marginEnd="8dp"
android:background="@drawable/touch_highlight_background" android:background="@drawable/touch_highlight_background"
android:contentDescription="@string/conversation_activity__emoji_toggle_description" android:contentDescription="@string/conversation_activity__emoji_toggle_description"
app:layout_constraintBottom_toBottomOf="@+id/name" app:layout_constraintBottom_toBottomOf="@+id/name"
@ -122,6 +126,7 @@
style="@style/Signal.Text.Preview" style="@style/Signal.Text.Preview"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone"
android:layout_marginStart="32dp" android:layout_marginStart="32dp"
android:layout_marginTop="24dp" android:layout_marginTop="24dp"
android:layout_marginEnd="32dp" android:layout_marginEnd="32dp"

View File

@ -5,30 +5,19 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<ImageView
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="32dp"
android:layout_marginTop="48dp"
android:layout_marginEnd="32dp"
android:layout_marginBottom="16dp"
android:src="@drawable/welcome"
app:layout_constraintBottom_toTopOf="@+id/textView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:id="@+id/textView" android:id="@+id/textView"
style="@style/Signal.Text.Headline.Registration" style="@style/Signal.Text.Headline.Registration"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="80dp" android:layout_marginStart="32dp"
android:gravity="center" android:layout_marginTop="32dp"
android:text="@string/RegistrationActivity_take_privacy_with_you_be_yourself_in_every_message" android:layout_marginEnd="32dp"
app:layout_constraintBottom_toTopOf="@+id/welcome_terms_button" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="@+id/welcome_continue_button" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="@+id/welcome_continue_button" /> app:layout_constraintEnd_toEndOf="parent"
android:textAlignment="center"
android:text="@string/activity_landing_title" />
<TextView <TextView
android:id="@+id/welcome_terms_button" android:id="@+id/welcome_terms_button"
@ -36,7 +25,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="24dp" android:layout_marginBottom="24dp"
style="@style/Signal.Text.Body" style="@style/Signal.Text.Body"
android:text="@string/RegistrationActivity_terms_and_privacy" android:text="@string/activity_landing_privacy_policy_button_title"
android:textColor="@color/signal_primary" android:textColor="@color/signal_primary"
app:layout_constraintBottom_toTopOf="@+id/welcome_continue_button" app:layout_constraintBottom_toTopOf="@+id/welcome_continue_button"
app:layout_constraintEnd_toEndOf="@+id/welcome_continue_button" app:layout_constraintEnd_toEndOf="@+id/welcome_continue_button"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string name="app_name">Signal</string> <string name="app_name">Loki Messenger</string>
<string name="yes">Yes</string> <string name="yes">Yes</string>
<string name="no">No</string> <string name="no">No</string>
<string name="delete">Delete</string> <string name="delete">Delete</string>
@ -1234,7 +1234,7 @@
<string name="preferences__request_a_delivery_report_for_each_sms_message_you_send">Request a delivery report for each SMS message you send</string> <string name="preferences__request_a_delivery_report_for_each_sms_message_you_send">Request a delivery report for each SMS message you send</string>
<string name="preferences__automatically_delete_older_messages_once_a_conversation_exceeds_a_specified_length">Automatically delete older messages once a conversation exceeds a specified length</string> <string name="preferences__automatically_delete_older_messages_once_a_conversation_exceeds_a_specified_length">Automatically delete older messages once a conversation exceeds a specified length</string>
<string name="preferences__delete_old_messages">Delete old messages</string> <string name="preferences__delete_old_messages">Delete old messages</string>
<string name="preferences__chats">Chats and media</string> <string name="preferences__chats">Chats</string>
<string name="preferences__conversation_length_limit">Conversation length limit</string> <string name="preferences__conversation_length_limit">Conversation length limit</string>
<string name="preferences__trim_all_conversations_now">Trim all conversations now</string> <string name="preferences__trim_all_conversations_now">Trim all conversations now</string>
<string name="preferences__scan_through_all_conversations_and_enforce_conversation_length_limits">Scan through all conversations and enforce conversation length limits</string> <string name="preferences__scan_through_all_conversations_and_enforce_conversation_length_limits">Scan through all conversations and enforce conversation length limits</string>
@ -1261,12 +1261,12 @@
<string name="preferences_chats__when_using_wifi">When using Wi-Fi</string> <string name="preferences_chats__when_using_wifi">When using Wi-Fi</string>
<string name="preferences_chats__when_roaming">When roaming</string> <string name="preferences_chats__when_roaming">When roaming</string>
<string name="preferences_chats__media_auto_download">Media auto-download</string> <string name="preferences_chats__media_auto_download">Media auto-download</string>
<string name="preferences_chats__message_trimming">Message trimming</string> <string name="preferences_chats__message_trimming">Message Trimming</string>
<string name="preferences_advanced__use_system_emoji">Use system emoji</string> <string name="preferences_advanced__use_system_emoji">Use system emoji</string>
<string name="preferences_advanced__disable_signal_built_in_emoji_support">Disable Signal\'s built-in emoji support</string> <string name="preferences_advanced__disable_signal_built_in_emoji_support">Disable Signal\'s built-in emoji support</string>
<string name="preferences_advanced__relay_all_calls_through_the_signal_server_to_avoid_revealing_your_ip_address">Relay all calls through the Signal server to avoid revealing your IP address to your contact. Enabling will reduce call quality.</string> <string name="preferences_advanced__relay_all_calls_through_the_signal_server_to_avoid_revealing_your_ip_address">Relay all calls through the Signal server to avoid revealing your IP address to your contact. Enabling will reduce call quality.</string>
<string name="preferences_advanced__always_relay_calls">Always relay calls</string> <string name="preferences_advanced__always_relay_calls">Always relay calls</string>
<string name="preferences_app_protection__app_access">App access</string> <string name="preferences_app_protection__app_access">App Access</string>
<string name="preferences_app_protection__communication">Communication</string> <string name="preferences_app_protection__communication">Communication</string>
<string name="preferences_chats__chats">Chats</string> <string name="preferences_chats__chats">Chats</string>
<string name="preferences_notifications__messages">Messages</string> <string name="preferences_notifications__messages">Messages</string>
@ -1476,7 +1476,7 @@
<string name="BackupUtil_never">Never</string> <string name="BackupUtil_never">Never</string>
<string name="BackupUtil_unknown">Unknown</string> <string name="BackupUtil_unknown">Unknown</string>
<string name="preferences_app_protection__screen_lock">Screen lock</string> <string name="preferences_app_protection__screen_lock">Screen lock</string>
<string name="preferences_app_protection__lock_signal_access_with_android_screen_lock_or_fingerprint">Lock Signal access with Android screen lock or fingerprint</string> <string name="preferences_app_protection__lock_signal_access_with_android_screen_lock_or_fingerprint">Lock Loki Messenger access with Android screen lock or fingerprint</string>
<string name="preferences_app_protection__screen_lock_inactivity_timeout">Screen lock inactivity timeout</string> <string name="preferences_app_protection__screen_lock_inactivity_timeout">Screen lock inactivity timeout</string>
<string name="AppProtectionPreferenceFragment_none">None</string> <string name="AppProtectionPreferenceFragment_none">None</string>
<string name="registration_activity__the_registration_lock_pin_is_not_the_same_as_the_sms_verification_code_you_just_received_please_enter_the_pin_you_previously_configured_in_the_application">The Registration Lock PIN is not the same as the SMS verification code you just received. Please enter the PIN you previously configured in the application.</string> <string name="registration_activity__the_registration_lock_pin_is_not_the_same_as_the_sms_verification_code_you_just_received_please_enter_the_pin_you_previously_configured_in_the_application">The Registration Lock PIN is not the same as the SMS verification code you just received. Please enter the PIN you previously configured in the application.</string>
@ -1519,6 +1519,10 @@
<!-- Loki --> <!-- Loki -->
<!-- Landing activity -->
<string name="activity_landing_title">Loki Messenger</string>
<string name="activity_landing_permission_dialog_message">Loki Messenger needs access to your storage to securely exchange messages.</string>
<string name="activity_landing_privacy_policy_button_title">Privacy Policy</string>
<!-- Account details activity --> <!-- Account details activity -->
<string name="activity_account_details_title">Create Your Loki Messenger Account</string> <string name="activity_account_details_title">Create Your Loki Messenger Account</string>
<string name="activity_account_details_subtitle">Enter a name to be shown to your contacts</string> <string name="activity_account_details_subtitle">Enter a name to be shown to your contacts</string>
@ -1536,6 +1540,13 @@
<string name="activity_settings_seed_dialog_copy_button_title">Copy</string> <string name="activity_settings_seed_dialog_copy_button_title">Copy</string>
<string name="activity_settings_seed_dialog_ok_button_title">OK</string> <string name="activity_settings_seed_dialog_ok_button_title">OK</string>
<string name="activity_settings_seed_copied_message">Copied to Clipboard</string> <string name="activity_settings_seed_copied_message">Copied to Clipboard</string>
<!-- Profile activity -->
<string name="activity_profile_title">Set Your Display Name</string>
<string name="activity_profile_display_name_edit_text_hint">Your Display Name</string>
<string name="activity_profile_display_name_edit_text_description">Display Name</string>
<!-- Notification settings activity -->
<string name="activity_notification_settings_style_section_title">Notification Style</string>
<string name="activity_notification_settings_content_section_title">Notification Content</string>
<!-- Contact selection activity --> <!-- Contact selection activity -->
<string name="activity_contact_selection_search_bar_placeholder">Search by name or public key</string> <string name="activity_contact_selection_search_bar_placeholder">Search by name or public key</string>
<!-- New conversation activity --> <!-- New conversation activity -->

View File

@ -5,9 +5,9 @@
<org.thoughtcrime.securesms.preferences.widgets.ProfilePreference <org.thoughtcrime.securesms.preferences.widgets.ProfilePreference
android:key="preference_category_profile"/> android:key="preference_category_profile"/>
<Preference android:key="preference_category_sms_mms" <!-- <Preference android:key="preference_category_sms_mms"
android:title="@string/preferences__sms_mms" android:title="@string/preferences__sms_mms"
android:icon="@drawable/ic_textsms_24dp"/> android:icon="@drawable/ic_textsms_24dp"/> -->
<Preference android:key="preference_category_notifications" <Preference android:key="preference_category_notifications"
android:title="@string/preferences__notifications" android:title="@string/preferences__notifications"
@ -17,21 +17,21 @@
android:title="@string/preferences__privacy" android:title="@string/preferences__privacy"
android:icon="@drawable/ic_security_24dp"/> android:icon="@drawable/ic_security_24dp"/>
<Preference android:key="preference_category_appearance" <!-- <Preference android:key="preference_category_appearance"
android:title="@string/preferences__appearance" android:title="@string/preferences__appearance"
android:icon="@drawable/ic_brightness_6_24dp"/> android:icon="@drawable/ic_brightness_6_24dp"/> -->
<Preference android:key="preference_category_chats" <Preference android:key="preference_category_chats"
android:title="@string/preferences__chats" android:title="@string/preferences__chats"
android:icon="@drawable/ic_forum_24dp"/> android:icon="@drawable/ic_forum_24dp"/>
<Preference android:key="preference_category_devices" <!-- <Preference android:key="preference_category_devices"
android:title="@string/preferences__linked_devices" android:title="@string/preferences__linked_devices"
android:icon="@drawable/ic_laptop_24dp"/> android:icon="@drawable/ic_laptop_24dp"/>
<Preference android:key="preference_category_advanced" <Preference android:key="preference_category_advanced"
android:title="@string/preferences__advanced" android:title="@string/preferences__advanced"
android:icon="@drawable/ic_advanced_24dp"/> android:icon="@drawable/ic_advanced_24dp"/> -->
<Preference android:key="preference_category_public_key" <Preference android:key="preference_category_public_key"
android:title="@string/activity_settings_share_public_key_button_title" android:title="@string/activity_settings_share_public_key_button_title"

View File

@ -51,11 +51,12 @@
<PreferenceCategory android:layout="@layout/preference_divider"/> <PreferenceCategory android:layout="@layout/preference_divider"/>
<PreferenceCategory android:title="@string/preferences_app_protection__communication"> <PreferenceCategory android:title="@string/preferences_app_protection__communication">
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
<!-- <org.thoughtcrime.securesms.components.SwitchPreferenceCompat
android:defaultValue="false" android:defaultValue="false"
android:key="pref_turn_only" android:key="pref_turn_only"
android:title="@string/preferences_advanced__always_relay_calls" android:title="@string/preferences_advanced__always_relay_calls"
android:summary="@string/preferences_advanced__relay_all_calls_through_the_signal_server_to_avoid_revealing_your_ip_address"/> android:summary="@string/preferences_advanced__relay_all_calls_through_the_signal_server_to_avoid_revealing_your_ip_address"/> -->
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat <org.thoughtcrime.securesms.components.SwitchPreferenceCompat
android:defaultValue="false" android:defaultValue="false"
@ -75,13 +76,15 @@
android:summary="@string/preferences__previews_are_supported_for" android:summary="@string/preferences__previews_are_supported_for"
android:title="@string/preferences__send_link_previews"/> android:title="@string/preferences__send_link_previews"/>
<Preference android:key="preference_category_blocked" <!-- <Preference android:key="preference_category_blocked"
android:title="@string/preferences_app_protection__blocked_contacts" /> android:title="@string/preferences_app_protection__blocked_contacts" /> -->
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory android:layout="@layout/preference_divider"/> <!-- <PreferenceCategory android:layout="@layout/preference_divider"/>
<PreferenceCategory android:title="@string/preferences_communication__category_sealed_sender"> <PreferenceCategory android:title="@string/preferences_communication__category_sealed_sender">
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat <org.thoughtcrime.securesms.components.SwitchPreferenceCompat
android:defaultValue="false" android:defaultValue="false"
android:key="pref_show_unidentifed_delivery_indicators" android:key="pref_show_unidentifed_delivery_indicators"
@ -103,12 +106,13 @@
<PreferenceCategory android:layout="@layout/preference_divider"/> <PreferenceCategory android:layout="@layout/preference_divider"/>
<PreferenceCategory android:title="@string/preferences_app_protection__registration_lock"> <PreferenceCategory android:title="@string/preferences_app_protection__registration_lock">
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat <org.thoughtcrime.securesms.components.SwitchPreferenceCompat
android:defaultValue="false" android:defaultValue="false"
android:key="pref_registration_lock" android:key="pref_registration_lock"
android:title="@string/preferences_app_protection__registration_lock_pin" android:title="@string/preferences_app_protection__registration_lock_pin"
android:summary="@string/preferences_app_protection__enable_a_registration_lock_pin_that_will_be_required"/> android:summary="@string/preferences_app_protection__enable_a_registration_lock_pin_that_will_be_required"/>
</PreferenceCategory>
</PreferenceCategory> -->
</PreferenceScreen> </PreferenceScreen>

View File

@ -2,7 +2,7 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"> xmlns:tools="http://schemas.android.com/tools">
<PreferenceCategory android:key="media_download" android:title="@string/preferences_chats__media_auto_download"> <!-- <PreferenceCategory android:key="media_download" android:title="@string/preferences_chats__media_auto_download">
<MultiSelectListPreference <MultiSelectListPreference
android:title="@string/preferences_chats__when_using_mobile_data" android:title="@string/preferences_chats__when_using_mobile_data"
android:key="pref_media_download_mobile" android:key="pref_media_download_mobile"
@ -28,7 +28,7 @@
android:entryValues="@array/pref_media_download_entries" /> android:entryValues="@array/pref_media_download_entries" />
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory android:layout="@layout/preference_divider"/> <PreferenceCategory android:layout="@layout/preference_divider"/> -->
<PreferenceCategory android:title="@string/preferences_chats__chats"> <PreferenceCategory android:title="@string/preferences_chats__chats">
<org.thoughtcrime.securesms.preferences.widgets.SignalListPreference <org.thoughtcrime.securesms.preferences.widgets.SignalListPreference
@ -39,11 +39,11 @@
android:defaultValue="16"> android:defaultValue="16">
</org.thoughtcrime.securesms.preferences.widgets.SignalListPreference> </org.thoughtcrime.securesms.preferences.widgets.SignalListPreference>
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat <!-- <org.thoughtcrime.securesms.components.SwitchPreferenceCompat
android:defaultValue="true" android:defaultValue="true"
android:key="pref_show_invite_reminder" android:key="pref_show_invite_reminder"
android:title="@string/preferences_chats__show_invitation_prompts" android:title="@string/preferences_chats__show_invitation_prompts"
android:summary="@string/preferences_chats__display_invitation_prompts_for_contacts_without_signal" /> android:summary="@string/preferences_chats__display_invitation_prompts_for_contacts_without_signal" /> -->
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat <org.thoughtcrime.securesms.components.SwitchPreferenceCompat
android:defaultValue="false" android:defaultValue="false"

View File

@ -2,13 +2,25 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="@string/preferences_notifications__messages"> <!-- <PreferenceCategory android:title="@string/preferences_notifications__messages"> -->
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat <org.thoughtcrime.securesms.components.SwitchPreferenceCompat
android:key="pref_key_enable_notifications" android:key="pref_key_enable_notifications"
android:title="@string/preferences__notifications" android:title="@string/preferences__notifications"
android:defaultValue="true" /> android:defaultValue="true" />
<org.thoughtcrime.securesms.preferences.widgets.SignalListPreference
android:key="pref_notification_priority"
android:title="@string/preferences_notifications__priority"
android:dependency="pref_key_enable_notifications"
android:defaultValue="1"
android:entries="@array/pref_notification_priority_entries"
android:entryValues="@array/pref_notification_priority_values"/>
<PreferenceCategory android:layout="@layout/preference_divider"/>
<PreferenceCategory android:title="@string/activity_notification_settings_style_section_title">
<org.thoughtcrime.securesms.preferences.widgets.SignalPreference <org.thoughtcrime.securesms.preferences.widgets.SignalPreference
android:dependency="pref_key_enable_notifications" android:dependency="pref_key_enable_notifications"
android:key="pref_key_ringtone" android:key="pref_key_ringtone"
@ -52,6 +64,12 @@
android:entries="@array/pref_repeat_alerts_entries" android:entries="@array/pref_repeat_alerts_entries"
android:entryValues="@array/pref_repeat_alerts_values" /> android:entryValues="@array/pref_repeat_alerts_values" />
</PreferenceCategory>
<PreferenceCategory android:layout="@layout/preference_divider"/>
<PreferenceCategory android:title="@string/activity_notification_settings_content_section_title">
<org.thoughtcrime.securesms.preferences.widgets.SignalListPreference <org.thoughtcrime.securesms.preferences.widgets.SignalListPreference
android:key="pref_notification_privacy" android:key="pref_notification_privacy"
android:title="@string/preferences_notifications__show" android:title="@string/preferences_notifications__show"
@ -60,15 +78,10 @@
android:entries="@array/pref_notification_privacy_entries" android:entries="@array/pref_notification_privacy_entries"
android:entryValues="@array/pref_notification_privacy_values"/> android:entryValues="@array/pref_notification_privacy_values"/>
<org.thoughtcrime.securesms.preferences.widgets.SignalListPreference
android:key="pref_notification_priority"
android:title="@string/preferences_notifications__priority"
android:dependency="pref_key_enable_notifications"
android:defaultValue="1"
android:entries="@array/pref_notification_priority_entries"
android:entryValues="@array/pref_notification_priority_values"/>
</PreferenceCategory> </PreferenceCategory>
<!-- </PreferenceCategory>
<PreferenceCategory android:layout="@layout/preference_divider"/> <PreferenceCategory android:layout="@layout/preference_divider"/>
<PreferenceCategory android:title="@string/preferences_notifications__calls"> <PreferenceCategory android:title="@string/preferences_notifications__calls">
@ -100,6 +113,6 @@
android:key="pref_enable_new_contacts_notifications" android:key="pref_enable_new_contacts_notifications"
android:title="@string/preferences_events__contact_joined_signal" android:title="@string/preferences_events__contact_joined_signal"
android:defaultValue="true" /> android:defaultValue="true" />
</PreferenceCategory> </PreferenceCategory> -->
</PreferenceScreen> </PreferenceScreen>

View File

@ -40,13 +40,10 @@ import android.support.v7.preference.Preference;
import android.widget.Toast; import android.widget.Toast;
import org.thoughtcrime.securesms.crypto.IdentityKeyUtil; import org.thoughtcrime.securesms.crypto.IdentityKeyUtil;
import org.thoughtcrime.securesms.preferences.AdvancedPreferenceFragment;
import org.thoughtcrime.securesms.preferences.AppProtectionPreferenceFragment; import org.thoughtcrime.securesms.preferences.AppProtectionPreferenceFragment;
import org.thoughtcrime.securesms.preferences.AppearancePreferenceFragment;
import org.thoughtcrime.securesms.preferences.ChatsPreferenceFragment; import org.thoughtcrime.securesms.preferences.ChatsPreferenceFragment;
import org.thoughtcrime.securesms.preferences.CorrectedPreferenceFragment; import org.thoughtcrime.securesms.preferences.CorrectedPreferenceFragment;
import org.thoughtcrime.securesms.preferences.NotificationsPreferenceFragment; import org.thoughtcrime.securesms.preferences.NotificationsPreferenceFragment;
import org.thoughtcrime.securesms.preferences.SmsMmsPreferenceFragment;
import org.thoughtcrime.securesms.preferences.widgets.ProfilePreference; import org.thoughtcrime.securesms.preferences.widgets.ProfilePreference;
import org.thoughtcrime.securesms.service.KeyCachingService; import org.thoughtcrime.securesms.service.KeyCachingService;
import org.thoughtcrime.securesms.util.DynamicLanguage; import org.thoughtcrime.securesms.util.DynamicLanguage;
@ -71,13 +68,13 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
private static final String TAG = ApplicationPreferencesActivity.class.getSimpleName(); private static final String TAG = ApplicationPreferencesActivity.class.getSimpleName();
private static final String PREFERENCE_CATEGORY_PROFILE = "preference_category_profile"; private static final String PREFERENCE_CATEGORY_PROFILE = "preference_category_profile";
private static final String PREFERENCE_CATEGORY_SMS_MMS = "preference_category_sms_mms"; // private static final String PREFERENCE_CATEGORY_SMS_MMS = "preference_category_sms_mms";
private static final String PREFERENCE_CATEGORY_NOTIFICATIONS = "preference_category_notifications"; private static final String PREFERENCE_CATEGORY_NOTIFICATIONS = "preference_category_notifications";
private static final String PREFERENCE_CATEGORY_APP_PROTECTION = "preference_category_app_protection"; private static final String PREFERENCE_CATEGORY_APP_PROTECTION = "preference_category_app_protection";
private static final String PREFERENCE_CATEGORY_APPEARANCE = "preference_category_appearance"; // private static final String PREFERENCE_CATEGORY_APPEARANCE = "preference_category_appearance";
private static final String PREFERENCE_CATEGORY_CHATS = "preference_category_chats"; private static final String PREFERENCE_CATEGORY_CHATS = "preference_category_chats";
private static final String PREFERENCE_CATEGORY_DEVICES = "preference_category_devices"; // private static final String PREFERENCE_CATEGORY_DEVICES = "preference_category_devices";
private static final String PREFERENCE_CATEGORY_ADVANCED = "preference_category_advanced"; // private static final String PREFERENCE_CATEGORY_ADVANCED = "preference_category_advanced";
private static final String PREFERENCE_CATEGORY_PUBLIC_KEY = "preference_category_public_key"; private static final String PREFERENCE_CATEGORY_PUBLIC_KEY = "preference_category_public_key";
private static final String PREFERENCE_CATEGORY_SEED = "preference_category_seed"; private static final String PREFERENCE_CATEGORY_SEED = "preference_category_seed";
@ -152,20 +149,26 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
this.findPreference(PREFERENCE_CATEGORY_PROFILE) this.findPreference(PREFERENCE_CATEGORY_PROFILE)
.setOnPreferenceClickListener(new ProfileClickListener()); .setOnPreferenceClickListener(new ProfileClickListener());
/*
this.findPreference(PREFERENCE_CATEGORY_SMS_MMS) this.findPreference(PREFERENCE_CATEGORY_SMS_MMS)
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_SMS_MMS)); .setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_SMS_MMS));
*/
this.findPreference(PREFERENCE_CATEGORY_NOTIFICATIONS) this.findPreference(PREFERENCE_CATEGORY_NOTIFICATIONS)
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_NOTIFICATIONS)); .setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_NOTIFICATIONS));
this.findPreference(PREFERENCE_CATEGORY_APP_PROTECTION) this.findPreference(PREFERENCE_CATEGORY_APP_PROTECTION)
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_APP_PROTECTION)); .setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_APP_PROTECTION));
/*
this.findPreference(PREFERENCE_CATEGORY_APPEARANCE) this.findPreference(PREFERENCE_CATEGORY_APPEARANCE)
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_APPEARANCE)); .setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_APPEARANCE));
*/
this.findPreference(PREFERENCE_CATEGORY_CHATS) this.findPreference(PREFERENCE_CATEGORY_CHATS)
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_CHATS)); .setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_CHATS));
/*
this.findPreference(PREFERENCE_CATEGORY_DEVICES) this.findPreference(PREFERENCE_CATEGORY_DEVICES)
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_DEVICES)); .setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_DEVICES));
this.findPreference(PREFERENCE_CATEGORY_ADVANCED) this.findPreference(PREFERENCE_CATEGORY_ADVANCED)
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_ADVANCED)); .setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_ADVANCED));
*/
this.findPreference(PREFERENCE_CATEGORY_PUBLIC_KEY) this.findPreference(PREFERENCE_CATEGORY_PUBLIC_KEY)
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_PUBLIC_KEY)); .setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_PUBLIC_KEY));
this.findPreference(PREFERENCE_CATEGORY_SEED) this.findPreference(PREFERENCE_CATEGORY_SEED)
@ -193,23 +196,29 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
private void setCategorySummaries() { private void setCategorySummaries() {
((ProfilePreference)this.findPreference(PREFERENCE_CATEGORY_PROFILE)).refresh(); ((ProfilePreference)this.findPreference(PREFERENCE_CATEGORY_PROFILE)).refresh();
/*
this.findPreference(PREFERENCE_CATEGORY_SMS_MMS) this.findPreference(PREFERENCE_CATEGORY_SMS_MMS)
.setSummary(SmsMmsPreferenceFragment.getSummary(getActivity())); .setSummary(SmsMmsPreferenceFragment.getSummary(getActivity()));
*/
this.findPreference(PREFERENCE_CATEGORY_NOTIFICATIONS) this.findPreference(PREFERENCE_CATEGORY_NOTIFICATIONS)
.setSummary(NotificationsPreferenceFragment.getSummary(getActivity())); .setSummary(NotificationsPreferenceFragment.getSummary(getActivity()));
this.findPreference(PREFERENCE_CATEGORY_APP_PROTECTION) this.findPreference(PREFERENCE_CATEGORY_APP_PROTECTION)
.setSummary(AppProtectionPreferenceFragment.getSummary(getActivity())); .setSummary(AppProtectionPreferenceFragment.getSummary(getActivity()));
/*
this.findPreference(PREFERENCE_CATEGORY_APPEARANCE) this.findPreference(PREFERENCE_CATEGORY_APPEARANCE)
.setSummary(AppearancePreferenceFragment.getSummary(getActivity())); .setSummary(AppearancePreferenceFragment.getSummary(getActivity()));
*/
this.findPreference(PREFERENCE_CATEGORY_CHATS) this.findPreference(PREFERENCE_CATEGORY_CHATS)
.setSummary(ChatsPreferenceFragment.getSummary(getActivity())); .setSummary(ChatsPreferenceFragment.getSummary(getActivity()));
} }
private void setCategoryVisibility() { private void setCategoryVisibility() {
/*
Preference devicePreference = this.findPreference(PREFERENCE_CATEGORY_DEVICES); Preference devicePreference = this.findPreference(PREFERENCE_CATEGORY_DEVICES);
if (devicePreference != null && !TextSecurePreferences.isPushRegistered(getActivity())) { if (devicePreference != null && !TextSecurePreferences.isPushRegistered(getActivity())) {
getPreferenceScreen().removePreference(devicePreference); getPreferenceScreen().removePreference(devicePreference);
} }
*/
} }
@TargetApi(11) @TargetApi(11)
@ -239,13 +248,13 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
DrawableCompat.setTint(publicKey, color); DrawableCompat.setTint(publicKey, color);
DrawableCompat.setTint(seed, color); DrawableCompat.setTint(seed, color);
this.findPreference(PREFERENCE_CATEGORY_SMS_MMS).setIcon(sms); // this.findPreference(PREFERENCE_CATEGORY_SMS_MMS).setIcon(sms);
this.findPreference(PREFERENCE_CATEGORY_NOTIFICATIONS).setIcon(notifications); this.findPreference(PREFERENCE_CATEGORY_NOTIFICATIONS).setIcon(notifications);
this.findPreference(PREFERENCE_CATEGORY_APP_PROTECTION).setIcon(privacy); this.findPreference(PREFERENCE_CATEGORY_APP_PROTECTION).setIcon(privacy);
this.findPreference(PREFERENCE_CATEGORY_APPEARANCE).setIcon(appearance); // this.findPreference(PREFERENCE_CATEGORY_APPEARANCE).setIcon(appearance);
this.findPreference(PREFERENCE_CATEGORY_CHATS).setIcon(chats); this.findPreference(PREFERENCE_CATEGORY_CHATS).setIcon(chats);
this.findPreference(PREFERENCE_CATEGORY_DEVICES).setIcon(devices); // this.findPreference(PREFERENCE_CATEGORY_DEVICES).setIcon(devices);
this.findPreference(PREFERENCE_CATEGORY_ADVANCED).setIcon(advanced); // this.findPreference(PREFERENCE_CATEGORY_ADVANCED).setIcon(advanced);
this.findPreference(PREFERENCE_CATEGORY_PUBLIC_KEY).setIcon(publicKey); this.findPreference(PREFERENCE_CATEGORY_PUBLIC_KEY).setIcon(publicKey);
this.findPreference(PREFERENCE_CATEGORY_SEED).setIcon(seed); this.findPreference(PREFERENCE_CATEGORY_SEED).setIcon(seed);
} }
@ -262,21 +271,26 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
Fragment fragment = null; Fragment fragment = null;
switch (category) { switch (category) {
/*
case PREFERENCE_CATEGORY_SMS_MMS: case PREFERENCE_CATEGORY_SMS_MMS:
fragment = new SmsMmsPreferenceFragment(); fragment = new SmsMmsPreferenceFragment();
break; break;
*/
case PREFERENCE_CATEGORY_NOTIFICATIONS: case PREFERENCE_CATEGORY_NOTIFICATIONS:
fragment = new NotificationsPreferenceFragment(); fragment = new NotificationsPreferenceFragment();
break; break;
case PREFERENCE_CATEGORY_APP_PROTECTION: case PREFERENCE_CATEGORY_APP_PROTECTION:
fragment = new AppProtectionPreferenceFragment(); fragment = new AppProtectionPreferenceFragment();
break; break;
/*
case PREFERENCE_CATEGORY_APPEARANCE: case PREFERENCE_CATEGORY_APPEARANCE:
fragment = new AppearancePreferenceFragment(); fragment = new AppearancePreferenceFragment();
break; break;
*/
case PREFERENCE_CATEGORY_CHATS: case PREFERENCE_CATEGORY_CHATS:
fragment = new ChatsPreferenceFragment(); fragment = new ChatsPreferenceFragment();
break; break;
/*
case PREFERENCE_CATEGORY_DEVICES: case PREFERENCE_CATEGORY_DEVICES:
Intent intent = new Intent(getActivity(), DeviceActivity.class); Intent intent = new Intent(getActivity(), DeviceActivity.class);
startActivity(intent); startActivity(intent);
@ -284,6 +298,7 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
case PREFERENCE_CATEGORY_ADVANCED: case PREFERENCE_CATEGORY_ADVANCED:
fragment = new AdvancedPreferenceFragment(); fragment = new AdvancedPreferenceFragment();
break; break;
*/
case PREFERENCE_CATEGORY_PUBLIC_KEY: case PREFERENCE_CATEGORY_PUBLIC_KEY:
String hexEncodedPublicKey = TextSecurePreferences.getLocalNumber(getContext()); String hexEncodedPublicKey = TextSecurePreferences.getLocalNumber(getContext());
Intent shareIntent = new Intent(); Intent shareIntent = new Intent();

View File

@ -30,7 +30,6 @@ import android.support.v7.widget.Toolbar;
import android.support.v7.widget.TooltipCompat; import android.support.v7.widget.TooltipCompat;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.Menu; import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ImageView; import android.widget.ImageView;
@ -124,6 +123,8 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit
@Override @Override
public boolean onPrepareOptionsMenu(Menu menu) { public boolean onPrepareOptionsMenu(Menu menu) {
return false;
/*
MenuInflater inflater = this.getMenuInflater(); MenuInflater inflater = this.getMenuInflater();
menu.clear(); menu.clear();
@ -133,6 +134,7 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit
super.onPrepareOptionsMenu(menu); super.onPrepareOptionsMenu(menu);
return true; return true;
*/
} }
private void initializeSearchListener() { private void initializeSearchListener() {

View File

@ -360,7 +360,7 @@ public class ConversationListFragment extends Fragment
public void onLoadFinished(Loader<Cursor> arg0, Cursor cursor) { public void onLoadFinished(Loader<Cursor> arg0, Cursor cursor) {
if ((cursor == null || cursor.getCount() <= 0) && TextUtils.isEmpty(queryFilter) && !archive) { if ((cursor == null || cursor.getCount() <= 0) && TextUtils.isEmpty(queryFilter) && !archive) {
list.setVisibility(View.INVISIBLE); list.setVisibility(View.INVISIBLE);
emptyState.setVisibility(View.VISIBLE); emptyState.setVisibility(View.GONE);
emptySearch.setVisibility(View.INVISIBLE); emptySearch.setVisibility(View.INVISIBLE);
emptyImage.setImageResource(EMPTY_IMAGES[(int) (Math.random() * EMPTY_IMAGES.length)]); emptyImage.setImageResource(EMPTY_IMAGES[(int) (Math.random() * EMPTY_IMAGES.length)]);
fab.startPulse(3 * 1000); fab.startPulse(3 * 1000);

View File

@ -35,8 +35,8 @@ import mobi.upod.timedurationpicker.TimeDurationPickerDialog;
public class AppProtectionPreferenceFragment extends CorrectedPreferenceFragment implements InjectableType { public class AppProtectionPreferenceFragment extends CorrectedPreferenceFragment implements InjectableType {
private static final String PREFERENCE_CATEGORY_BLOCKED = "preference_category_blocked"; // private static final String PREFERENCE_CATEGORY_BLOCKED = "preference_category_blocked";
private static final String PREFERENCE_UNIDENTIFIED_LEARN_MORE = "pref_unidentified_learn_more"; // private static final String PREFERENCE_UNIDENTIFIED_LEARN_MORE = "pref_unidentified_learn_more";
private CheckBoxPreference disablePassphrase; private CheckBoxPreference disablePassphrase;
@ -55,7 +55,7 @@ public class AppProtectionPreferenceFragment extends CorrectedPreferenceFragment
disablePassphrase = (CheckBoxPreference) this.findPreference("pref_enable_passphrase_temporary"); disablePassphrase = (CheckBoxPreference) this.findPreference("pref_enable_passphrase_temporary");
this.findPreference(TextSecurePreferences.REGISTRATION_LOCK_PREF).setOnPreferenceClickListener(new AccountLockClickListener()); // this.findPreference(TextSecurePreferences.REGISTRATION_LOCK_PREF).setOnPreferenceClickListener(new AccountLockClickListener());
this.findPreference(TextSecurePreferences.SCREEN_LOCK).setOnPreferenceChangeListener(new ScreenLockListener()); this.findPreference(TextSecurePreferences.SCREEN_LOCK).setOnPreferenceChangeListener(new ScreenLockListener());
this.findPreference(TextSecurePreferences.SCREEN_LOCK_TIMEOUT).setOnPreferenceClickListener(new ScreenLockTimeoutListener()); this.findPreference(TextSecurePreferences.SCREEN_LOCK_TIMEOUT).setOnPreferenceClickListener(new ScreenLockTimeoutListener());
@ -64,10 +64,10 @@ public class AppProtectionPreferenceFragment extends CorrectedPreferenceFragment
this.findPreference(TextSecurePreferences.READ_RECEIPTS_PREF).setOnPreferenceChangeListener(new ReadReceiptToggleListener()); this.findPreference(TextSecurePreferences.READ_RECEIPTS_PREF).setOnPreferenceChangeListener(new ReadReceiptToggleListener());
this.findPreference(TextSecurePreferences.TYPING_INDICATORS).setOnPreferenceChangeListener(new TypingIndicatorsToggleListener()); this.findPreference(TextSecurePreferences.TYPING_INDICATORS).setOnPreferenceChangeListener(new TypingIndicatorsToggleListener());
this.findPreference(TextSecurePreferences.LINK_PREVIEWS).setOnPreferenceChangeListener(new LinkPreviewToggleListener()); this.findPreference(TextSecurePreferences.LINK_PREVIEWS).setOnPreferenceChangeListener(new LinkPreviewToggleListener());
this.findPreference(PREFERENCE_CATEGORY_BLOCKED).setOnPreferenceClickListener(new BlockedContactsClickListener()); // this.findPreference(PREFERENCE_CATEGORY_BLOCKED).setOnPreferenceClickListener(new BlockedContactsClickListener());
this.findPreference(TextSecurePreferences.SHOW_UNIDENTIFIED_DELIVERY_INDICATORS).setOnPreferenceChangeListener(new ShowUnidentifiedDeliveryIndicatorsChangedListener()); // this.findPreference(TextSecurePreferences.SHOW_UNIDENTIFIED_DELIVERY_INDICATORS).setOnPreferenceChangeListener(new ShowUnidentifiedDeliveryIndicatorsChangedListener());
this.findPreference(TextSecurePreferences.UNIVERSAL_UNIDENTIFIED_ACCESS).setOnPreferenceChangeListener(new UniversalUnidentifiedAccessChangedListener()); // this.findPreference(TextSecurePreferences.UNIVERSAL_UNIDENTIFIED_ACCESS).setOnPreferenceChangeListener(new UniversalUnidentifiedAccessChangedListener());
this.findPreference(PREFERENCE_UNIDENTIFIED_LEARN_MORE).setOnPreferenceClickListener(new UnidentifiedLearnMoreClickListener()); // this.findPreference(PREFERENCE_UNIDENTIFIED_LEARN_MORE).setOnPreferenceClickListener(new UnidentifiedLearnMoreClickListener());
disablePassphrase.setOnPreferenceChangeListener(new DisablePassphraseClickListener()); disablePassphrase.setOnPreferenceChangeListener(new DisablePassphraseClickListener());
initializeVisibility(); initializeVisibility();

View File

@ -42,12 +42,14 @@ public class ChatsPreferenceFragment extends ListSummaryPreferenceFragment {
public void onCreate(Bundle paramBundle) { public void onCreate(Bundle paramBundle) {
super.onCreate(paramBundle); super.onCreate(paramBundle);
/*
findPreference(TextSecurePreferences.MEDIA_DOWNLOAD_MOBILE_PREF) findPreference(TextSecurePreferences.MEDIA_DOWNLOAD_MOBILE_PREF)
.setOnPreferenceChangeListener(new MediaDownloadChangeListener()); .setOnPreferenceChangeListener(new MediaDownloadChangeListener());
findPreference(TextSecurePreferences.MEDIA_DOWNLOAD_WIFI_PREF) findPreference(TextSecurePreferences.MEDIA_DOWNLOAD_WIFI_PREF)
.setOnPreferenceChangeListener(new MediaDownloadChangeListener()); .setOnPreferenceChangeListener(new MediaDownloadChangeListener());
findPreference(TextSecurePreferences.MEDIA_DOWNLOAD_ROAMING_PREF) findPreference(TextSecurePreferences.MEDIA_DOWNLOAD_ROAMING_PREF)
.setOnPreferenceChangeListener(new MediaDownloadChangeListener()); .setOnPreferenceChangeListener(new MediaDownloadChangeListener());
*/
findPreference(TextSecurePreferences.MESSAGE_BODY_TEXT_SIZE_PREF) findPreference(TextSecurePreferences.MESSAGE_BODY_TEXT_SIZE_PREF)
.setOnPreferenceChangeListener(new ListSummaryListener()); .setOnPreferenceChangeListener(new ListSummaryListener());
@ -111,12 +113,14 @@ public class ChatsPreferenceFragment extends ListSummaryPreferenceFragment {
} }
private void setMediaDownloadSummaries() { private void setMediaDownloadSummaries() {
/*
findPreference(TextSecurePreferences.MEDIA_DOWNLOAD_MOBILE_PREF) findPreference(TextSecurePreferences.MEDIA_DOWNLOAD_MOBILE_PREF)
.setSummary(getSummaryForMediaPreference(TextSecurePreferences.getMobileMediaDownloadAllowed(getActivity()))); .setSummary(getSummaryForMediaPreference(TextSecurePreferences.getMobileMediaDownloadAllowed(getActivity())));
findPreference(TextSecurePreferences.MEDIA_DOWNLOAD_WIFI_PREF) findPreference(TextSecurePreferences.MEDIA_DOWNLOAD_WIFI_PREF)
.setSummary(getSummaryForMediaPreference(TextSecurePreferences.getWifiMediaDownloadAllowed(getActivity()))); .setSummary(getSummaryForMediaPreference(TextSecurePreferences.getWifiMediaDownloadAllowed(getActivity())));
findPreference(TextSecurePreferences.MEDIA_DOWNLOAD_ROAMING_PREF) findPreference(TextSecurePreferences.MEDIA_DOWNLOAD_ROAMING_PREF)
.setSummary(getSummaryForMediaPreference(TextSecurePreferences.getRoamingMediaDownloadAllowed(getActivity()))); .setSummary(getSummaryForMediaPreference(TextSecurePreferences.getRoamingMediaDownloadAllowed(getActivity())));
*/
} }
private CharSequence getSummaryForMediaPreference(Set<String> allowedNetworks) { private CharSequence getSummaryForMediaPreference(Set<String> allowedNetworks) {

View File

@ -54,8 +54,10 @@ public class NotificationsPreferenceFragment extends ListSummaryPreferenceFragme
.setOnPreferenceChangeListener(new NotificationPrivacyListener()); .setOnPreferenceChangeListener(new NotificationPrivacyListener());
this.findPreference(TextSecurePreferences.NOTIFICATION_PRIORITY_PREF) this.findPreference(TextSecurePreferences.NOTIFICATION_PRIORITY_PREF)
.setOnPreferenceChangeListener(new ListSummaryListener()); .setOnPreferenceChangeListener(new ListSummaryListener());
/*
this.findPreference(TextSecurePreferences.CALL_RINGTONE_PREF) this.findPreference(TextSecurePreferences.CALL_RINGTONE_PREF)
.setOnPreferenceChangeListener(new RingtoneSummaryListener()); .setOnPreferenceChangeListener(new RingtoneSummaryListener());
*/
this.findPreference(TextSecurePreferences.VIBRATE_PREF) this.findPreference(TextSecurePreferences.VIBRATE_PREF)
.setOnPreferenceChangeListener((preference, newValue) -> { .setOnPreferenceChangeListener((preference, newValue) -> {
NotificationChannels.updateMessageVibrate(getContext(), (boolean) newValue); NotificationChannels.updateMessageVibrate(getContext(), (boolean) newValue);
@ -78,6 +80,7 @@ public class NotificationsPreferenceFragment extends ListSummaryPreferenceFragme
return true; return true;
}); });
/*
this.findPreference(TextSecurePreferences.CALL_RINGTONE_PREF) this.findPreference(TextSecurePreferences.CALL_RINGTONE_PREF)
.setOnPreferenceClickListener(preference -> { .setOnPreferenceClickListener(preference -> {
Uri current = TextSecurePreferences.getCallNotificationRingtone(getContext()); Uri current = TextSecurePreferences.getCallNotificationRingtone(getContext());
@ -93,6 +96,7 @@ public class NotificationsPreferenceFragment extends ListSummaryPreferenceFragme
return true; return true;
}); });
*/
initializeListSummary((ListPreference) findPreference(TextSecurePreferences.LED_COLOR_PREF)); initializeListSummary((ListPreference) findPreference(TextSecurePreferences.LED_COLOR_PREF));
initializeListSummary((ListPreference) findPreference(TextSecurePreferences.REPEAT_ALERTS_PREF)); initializeListSummary((ListPreference) findPreference(TextSecurePreferences.REPEAT_ALERTS_PREF));
@ -112,9 +116,9 @@ public class NotificationsPreferenceFragment extends ListSummaryPreferenceFragme
} }
initializeRingtoneSummary(findPreference(TextSecurePreferences.RINGTONE_PREF)); initializeRingtoneSummary(findPreference(TextSecurePreferences.RINGTONE_PREF));
initializeCallRingtoneSummary(findPreference(TextSecurePreferences.CALL_RINGTONE_PREF)); // initializeCallRingtoneSummary(findPreference(TextSecurePreferences.CALL_RINGTONE_PREF));
initializeMessageVibrateSummary((SwitchPreferenceCompat)findPreference(TextSecurePreferences.VIBRATE_PREF)); initializeMessageVibrateSummary((SwitchPreferenceCompat)findPreference(TextSecurePreferences.VIBRATE_PREF));
initializeCallVibrateSummary((SwitchPreferenceCompat)findPreference(TextSecurePreferences.CALL_VIBRATE_PREF)); // initializeCallVibrateSummary((SwitchPreferenceCompat)findPreference(TextSecurePreferences.CALL_VIBRATE_PREF));
} }
@Override @Override
@ -152,7 +156,7 @@ public class NotificationsPreferenceFragment extends ListSummaryPreferenceFragme
TextSecurePreferences.setCallNotificationRingtone(getContext(), uri != null ? uri.toString() : Uri.EMPTY.toString()); TextSecurePreferences.setCallNotificationRingtone(getContext(), uri != null ? uri.toString() : Uri.EMPTY.toString());
} }
initializeCallRingtoneSummary(findPreference(TextSecurePreferences.CALL_RINGTONE_PREF)); // initializeCallRingtoneSummary(findPreference(TextSecurePreferences.CALL_RINGTONE_PREF));
} }
} }

View File

@ -2,7 +2,6 @@ package org.thoughtcrime.securesms.registration;
import android.Manifest; import android.Manifest;
import android.content.Intent; import android.content.Intent;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
@ -28,17 +27,14 @@ public class WelcomeActivity extends BaseActionBarActivity {
} }
private void onTermsClicked() { private void onTermsClicked() {
CommunicationActions.openBrowserLink(this, "https://signal.org/legal"); CommunicationActions.openBrowserLink(this, "https://github.com/loki-project/loki-messenger-android/blob/master/privacy-policy.md");
} }
private void onContinueClicked() { private void onContinueClicked() {
Permissions.with(this) Permissions.with(this)
.request(Manifest.permission.WRITE_CONTACTS, Manifest.permission.READ_CONTACTS, .request(Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE)
Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE,
Manifest.permission.READ_PHONE_STATE)
.ifNecessary() .ifNecessary()
.withRationaleDialog(getString(R.string.RegistrationActivity_signal_needs_access_to_your_contacts_and_media_in_order_to_connect_with_friends), .withRationaleDialog(getString(R.string.activity_landing_permission_dialog_message), R.drawable.ic_folder_white_48dp)
R.drawable.ic_contacts_white_48dp, R.drawable.ic_folder_white_48dp)
.onAnyResult(() -> { .onAnyResult(() -> {
TextSecurePreferences.setHasSeenWelcomeScreen(WelcomeActivity.this, true); TextSecurePreferences.setHasSeenWelcomeScreen(WelcomeActivity.this, true);