From 53d8eb0886fea03bd1feb4aaf4eed1f58d11c49e Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 31 May 2020 12:46:40 +0200 Subject: [PATCH] Auto select STARTTLS on checking insecure --- app/src/main/java/eu/faircode/email/FragmentAccount.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/FragmentAccount.java b/app/src/main/java/eu/faircode/email/FragmentAccount.java index 80cd26a99f..f7cb6d8c9f 100644 --- a/app/src/main/java/eu/faircode/email/FragmentAccount.java +++ b/app/src/main/java/eu/faircode/email/FragmentAccount.java @@ -330,6 +330,14 @@ public class FragmentAccount extends FragmentBase { } }); + cbInsecure.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { + if (isChecked) + rgEncryption.check(R.id.radio_starttls); + } + }); + tilPassword.getEditText().addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) {