Skip to content

Commit 40eca5e

Browse files
author
Lilia Markham
committed
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.
1 parent eae4990 commit 40eca5e

3 files changed

Lines changed: 1 addition & 8 deletions

File tree

res/xml/preferences.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,6 @@
6666
android:title="@string/preferences__complete_key_exchanges"
6767
android:summary="@string/preferences__automatically_complete_key_exchanges_for_new_sessions_or_for_existing_sessions_with_the_same_identity_key" />
6868

69-
<CheckBoxPreference android:defaultValue="true"
70-
android:key="pref_key_tag_whitespace"
71-
android:summary="@string/preferences__include_a_whitespace_tag_at_the_end_of_every_non_encrypted_message"
72-
android:title="@string/preferences__include_whitespace_tag" />
73-
7469
<CheckBoxPreference android:defaultValue="true"
7570
android:key="pref_send_identity_key"
7671
android:summary="@string/preferences__sign_key_exchange_messages_with_identity_key"

src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredSherlockPr
5656
private static final int PICK_IDENTITY_CONTACT = 1;
5757
private static final int IMPORT_IDENTITY_ID = 2;
5858

59-
public static final String WHITESPACE_PREF = "pref_key_tag_whitespace";
6059
public static final String RINGTONE_PREF = "pref_key_ringtone";
6160
public static final String VIBRATE_PREF = "pref_key_vibrate";
6261
public static final String NOTIFICATION_PREF = "pref_key_enable_notifications";

src/org/thoughtcrime/securesms/protocol/Tag.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ public class Tag {
1313
public static boolean isTaggable(Context context, String message) {
1414
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
1515

16-
return sp.getBoolean(ApplicationPreferencesActivity.WHITESPACE_PREF, true) &&
17-
message.matches(".*[^\\s].*") &&
16+
return message.matches(".*[^\\s].*") &&
1817
message.replaceAll("\\s+$", "").length() + WHITESPACE_TAG.length() <= 158;
1918
}
2019

0 commit comments

Comments
 (0)