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 @@ - + diff --git a/res/values/strings.xml b/res/values/strings.xml index f406ba7da4..16e5e01afb 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -361,7 +361,7 @@ Verify Imported Identity - + General Use Settings Use for all SMS Use for all MMS @@ -374,9 +374,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 @@ -387,12 +387,12 @@ 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 + Import contact\'s key Import an identity key from a contact - Manage Identity Keys + Manage identity keys Manage configured identity keys Notification Settings Notifications @@ -409,7 +409,7 @@ minutes hours Green - Red + Red Blue Orange Cyan @@ -418,7 +418,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) @@ -504,11 +506,10 @@ 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. + + Delivery Conversation Broadcast - - diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index 9f9ddb1f6a..e36ad81725 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -1,31 +1,66 @@ - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - @@ -61,27 +89,12 @@ - + - - - - - - - - - + - - - - - - + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java b/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java index 9e8d25f0f4..e17fab4e06 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; @@ -56,7 +57,6 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredSherlockPr private static final int PICK_IDENTITY_CONTACT = 1; private static final int IMPORT_IDENTITY_ID = 2; - public static final String WHITESPACE_PREF = "pref_key_tag_whitespace"; public static final String RINGTONE_PREF = "pref_key_ringtone"; public static final String VIBRATE_PREF = "pref_key_vibrate"; public static final String NOTIFICATION_PREF = "pref_key_enable_notifications"; @@ -64,7 +64,6 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredSherlockPr public static final String LED_BLINK_PREF = "pref_led_blink"; public static final String LED_BLINK_PREF_CUSTOM = "pref_led_blink_custom"; public static final String IDENTITY_PREF = "pref_choose_identity"; - public static final String SEND_IDENTITY_PREF = "pref_send_identity_key"; public static final String ALL_MMS_PERF = "pref_all_mms"; public static final String PASSPHRASE_TIMEOUT_INTERVAL_PREF = "pref_timeout_interval"; public static final String PASSPHRASE_TIMEOUT_PREF = "pref_timeout_passphrase"; @@ -390,4 +389,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; + } } diff --git a/src/org/thoughtcrime/securesms/crypto/KeyExchangeMessage.java b/src/org/thoughtcrime/securesms/crypto/KeyExchangeMessage.java index 61ffa7395b..67e8806864 100644 --- a/src/org/thoughtcrime/securesms/crypto/KeyExchangeMessage.java +++ b/src/org/thoughtcrime/securesms/crypto/KeyExchangeMessage.java @@ -113,9 +113,7 @@ public class KeyExchangeMessage { } private static boolean includeIdentitySignature(int messageVersion, Context context) { - return IdentityKeyUtil.hasIdentityKey(context) && - (messageVersion >= 1) && - PreferenceManager.getDefaultSharedPreferences(context).getBoolean(ApplicationPreferencesActivity.SEND_IDENTITY_PREF, true); + return IdentityKeyUtil.hasIdentityKey(context) && (messageVersion >= 1); } diff --git a/src/org/thoughtcrime/securesms/protocol/Tag.java b/src/org/thoughtcrime/securesms/protocol/Tag.java index 291b6ceb87..bcdb98be33 100644 --- a/src/org/thoughtcrime/securesms/protocol/Tag.java +++ b/src/org/thoughtcrime/securesms/protocol/Tag.java @@ -13,8 +13,7 @@ public class Tag { public static boolean isTaggable(Context context, String message) { SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context); - return sp.getBoolean(ApplicationPreferencesActivity.WHITESPACE_PREF, true) && - message.matches(".*[^\\s].*") && + return message.matches(".*[^\\s].*") && message.replaceAll("\\s+$", "").length() + WHITESPACE_TAG.length() <= 158; }