Enable auto decrypt for S/MIME

This commit is contained in:
M66B 2019-12-06 13:38:52 +01:00
parent 2e5f28bf8b
commit 7a74ce6448
2 changed files with 7 additions and 1 deletions

View File

@ -1580,7 +1580,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean auto_decrypt = prefs.getBoolean("auto_decrypt", false);
if (auto_decrypt && EntityMessage.PGP_SIGNENCRYPT.equals(message.encrypt))
if (auto_decrypt &&
(EntityMessage.PGP_SIGNENCRYPT.equals(message.encrypt) ||
EntityMessage.SMIME_SIGNENCRYPT.equals(message.encrypt)))
onActionDecrypt(message, true);
// Show images

View File

@ -3928,6 +3928,10 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
@Override
protected void onExecuted(Bundle args, EntityIdentity identity) {
Boolean auto = args.getBoolean("auto");
if (auto && identity == null)
return;
Helper.selectKeyAlias(getActivity(), identity == null ? null : identity.sign_key_alias, new Helper.IKeyAlias() {
@Override
public void onSelected(String alias) {