Identity insecure STARTTLS

This commit is contained in:
M66B 2020-08-22 22:20:06 +02:00
parent 02c92d070c
commit 38c389989c
1 changed files with 12 additions and 0 deletions

View File

@ -418,6 +418,17 @@ public class FragmentIdentity extends FragmentBase {
}
});
cbInsecure.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
Object tag = cbInsecure.getTag();
if (tag != null && tag.equals(isChecked))
return;
if (isChecked)
rgEncryption.check(R.id.radio_starttls);
}
});
btnCertificate.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -1084,6 +1095,7 @@ public class FragmentIdentity extends FragmentBase {
etHost.setText(identity == null ? null : identity.host);
rgEncryption.check(identity != null && identity.starttls ? R.id.radio_starttls : R.id.radio_ssl);
cbInsecure.setTag(identity == null ? false : identity.insecure);
cbInsecure.setChecked(identity == null ? false : identity.insecure);
etPort.setText(identity == null ? null : Long.toString(identity.port));
etUser.setText(identity == null ? null : identity.user);