From 5cd044a6cce1a2d7c097c0409b26db198b280e4a Mon Sep 17 00:00:00 2001 From: Lilia Markham Date: Wed, 27 Mar 2013 19:10:15 -0700 Subject: [PATCH 1/7] Swap settings and clear passphrase menu options Android design pattern best practice recommends placing the settings menu item below all other items because it's not frequently needed. In that spirit, I've also moved the clear passphrase option to be first since it is likely to be used more often than database import/export. --- res/menu/text_secure_normal.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/res/menu/text_secure_normal.xml b/res/menu/text_secure_normal.xml index 5ba90ddce8..a614df98a4 100644 --- a/res/menu/text_secure_normal.xml +++ b/res/menu/text_secure_normal.xml @@ -5,9 +5,9 @@ android:icon="@drawable/ic_menu_msg_compose_holo_dark" android:showAsAction="ifRoom" /> - + @@ -22,8 +22,8 @@ - + From eae499052b0129966cf9bffa8476f655103247e2 Mon Sep 17 00:00:00 2001 From: Lilia Markham Date: Wed, 27 Mar 2013 20:00:54 -0700 Subject: [PATCH 2/7] Remove MMS delivery report setting No good reason to have this cluttering up the menu when it is disabled and not implemented. --- res/xml/preferences.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index 9f9ddb1f6a..c084080eb6 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -19,12 +19,6 @@ android:key="pref_delivery_report_sms" android:summary="@string/preferences__request_a_delivery_report_for_each_sms_message_you_send" android:title="@string/preferences__sms_delivery_reports" /> - - From 40eca5e0f600f0579c8e4001da74d19b8785e820 Mon Sep 17 00:00:00 2001 From: Lilia Markham Date: Wed, 27 Mar 2013 20:16:38 -0700 Subject: [PATCH 3/7] Remove whitespace tag preference The vast majority of users will never uncheck this option. Those who would can send an unencrypted untagged message through the system sms app. It would then be stored locally in the clear, but it was already transmitted in the clear and likely stored on the recipient's side in the clear, so the security gains of locally encrypting are low, and again, this seems an extremely rare edge case. By android design pattern specs for the settings menu, we should kill this preference. --- res/xml/preferences.xml | 5 ----- .../securesms/ApplicationPreferencesActivity.java | 1 - src/org/thoughtcrime/securesms/protocol/Tag.java | 3 +-- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index c084080eb6..748f77ba77 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -66,11 +66,6 @@ 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" /> - - Date: Wed, 27 Mar 2013 20:57:28 -0700 Subject: [PATCH 4/7] Remove sign key exchange preference Yet another setting that most users will never touch. Workaround for those who would is to use a different identity key per device. Let this be a sacrifice to the android settings design pattern gods. --- res/xml/preferences.xml | 5 ----- .../securesms/ApplicationPreferencesActivity.java | 1 - .../thoughtcrime/securesms/crypto/KeyExchangeMessage.java | 4 +--- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index 748f77ba77..c4d0f14a77 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -66,11 +66,6 @@ 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" /> - - = 1) && - PreferenceManager.getDefaultSharedPreferences(context).getBoolean(ApplicationPreferencesActivity.SEND_IDENTITY_PREF, true); + return IdentityKeyUtil.hasIdentityKey(context) && (messageVersion >= 1); } From 815613cfaabdc456b86eb6fdccfcb61273d523f6 Mon Sep 17 00:00:00 2001 From: Lilia Markham Date: Thu, 28 Mar 2013 05:45:07 -0700 Subject: [PATCH 5/7] Reorganize settings menu Mostly xml work, with one small hack to fix the sub menu themes, found here: http://code.google.com/p/android/issues/detail?id=4611#c35 --- res/values/strings.xml | 6 +- res/xml/preferences.xml | 183 +++++++++--------- .../ApplicationPreferencesActivity.java | 14 ++ 3 files changed, 107 insertions(+), 96 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 08564888c8..31f3b4e0bf 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -381,7 +381,7 @@ Select Passphrase Timeout Timeout interval The amount of time to wait before forgetting passphrase from memory - Identity Key Settings + Identity Keys View my identity key Export my identity key Import Contact\'s Key @@ -412,7 +412,9 @@ Normal Slow Custom - Advanced: MMS Access Point Names + Advanced + Passphrase + Fallback MMSC Enable Fallback MMSC Use MMSC information configured here when system APN information is unavailable. MMSC URL (Required) diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index c4d0f14a77..da13807fab 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -1,7 +1,6 @@ - - - - - + + + + + + + + + + + + + - - - - @@ -55,17 +88,12 @@ - + - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - diff --git a/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java b/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java index 57469795a9..793c7a7aff 100644 --- a/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java +++ b/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java @@ -25,6 +25,7 @@ import android.net.Uri; import android.os.Bundle; import android.preference.EditTextPreference; import android.preference.Preference; +import android.preference.PreferenceScreen; import android.preference.PreferenceManager; import android.provider.ContactsContract; import android.util.Log; @@ -383,4 +384,17 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredSherlockPr } } + + /* http://code.google.com/p/android/issues/detail?id=4611#c35 */ + @SuppressWarnings("deprecation") + @Override + public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) + { + super.onPreferenceTreeClick(preferenceScreen, preference); + if (preference!=null) + if (preference instanceof PreferenceScreen) + if (((PreferenceScreen)preference).getDialog()!=null) + ((PreferenceScreen)preference).getDialog().getWindow().getDecorView().setBackgroundDrawable(this.getWindow().getDecorView().getBackground().getConstantState().newDrawable()); + return false; + } } From 14d88f615c34ff3ea97716711d7db49ea33e4adc Mon Sep 17 00:00:00 2001 From: Lilia Markham Date: Thu, 28 Mar 2013 18:13:38 -0700 Subject: [PATCH 6/7] Sentence case settings Let's be consistent and conformant with android style guide for settings labels. --- res/values/strings.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 31f3b4e0bf..6a77746242 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -368,9 +368,9 @@ Choose Identity Choose your contact entry from the contacts list. Encryption Settings - Change Passphrase + Change passphrase Change my passphrase - Complete Key Exchanges + Complete key exchanges Automatically complete key exchanges for new sessions or for existing sessions with the same identity key Include a whitespace tag at the end of every non-encrypted message Include whitespace tag @@ -381,12 +381,12 @@ Select Passphrase Timeout Timeout interval The amount of time to wait before forgetting passphrase from memory - Identity Keys + Identity keys View my identity key Export my identity key - Import Contact\'s Key + Import contact\'s key Import an identity key from a contact - Manage Identity Keys + Manage identity keys Manage configured identity keys Notification Settings Notifications @@ -403,7 +403,7 @@ minutes hours Green - Red + Red Blue Orange Cyan From 68ee1c8e620ef9ba59f1b5ff907ed278f25bd116 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Mon, 6 May 2013 12:45:11 -0700 Subject: [PATCH 7/7] Make a general category, move notification settings back inline. --- res/values/strings.xml | 4 +- res/xml/preferences.xml | 195 ++++++++++++++++++++-------------------- 2 files changed, 99 insertions(+), 100 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 6a77746242..cea8dc7a0b 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -355,7 +355,7 @@ Verify Imported Identity - + General Use Settings Use for all SMS Use for all MMS @@ -500,8 +500,6 @@ Verified - TextSecure is a security enhanced text messaging application that serves as a full replacement for the default text messaging application. Messages to other TextSecure users are encrypted over the air, and all text messages are stored in an encrypted database on the device. If your phone is lost or stolen, your messages will be safe, and communication with other TextSecure users can\'t be monitored over the air. - diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index da13807fab..e36ad81725 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -1,65 +1,66 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + +