mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
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.
This commit is contained in:
parent
eae499052b
commit
40eca5e0f6
@ -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" />
|
||||
|
||||
<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"
|
||||
|
@ -56,7 +56,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";
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user