Added option to disable Autocrypt

This commit is contained in:
M66B
2020-01-09 18:55:10 +01:00
parent da3bc81473
commit 694a97600f
5 changed files with 58 additions and 25 deletions

View File

@@ -4468,7 +4468,10 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
else
throw new IllegalArgumentException(context.getString(R.string.title_not_encrypted));
if (message.from != null && message.from.length > 0 &&
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean autocrypt = prefs.getBoolean("autocrypt", true);
if (autocrypt &&
message.from != null && message.from.length > 0 &&
message.autocrypt != null &&
OpenPgpApi.ACTION_DECRYPT_VERIFY.equals(data.getAction()))
try {