From f59061329295acd3f4cb7f9c473361ca660905a8 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 4 Oct 2019 12:34:15 +0200 Subject: [PATCH] Trim host/domain names --- app/src/main/java/eu/faircode/email/FragmentAccount.java | 6 +++--- app/src/main/java/eu/faircode/email/FragmentIdentity.java | 4 ++-- app/src/main/java/eu/faircode/email/FragmentPop.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentAccount.java b/app/src/main/java/eu/faircode/email/FragmentAccount.java index 6ea7809224..ea49bd2d4b 100644 --- a/app/src/main/java/eu/faircode/email/FragmentAccount.java +++ b/app/src/main/java/eu/faircode/email/FragmentAccount.java @@ -435,7 +435,7 @@ public class FragmentAccount extends FragmentBase { private void onAutoConfig() { Bundle args = new Bundle(); - args.putString("domain", etDomain.getText().toString()); + args.putString("domain", etDomain.getText().toString().trim()); new SimpleTask() { @Override @@ -478,7 +478,7 @@ public class FragmentAccount extends FragmentBase { private void onCheck() { Bundle args = new Bundle(); args.putLong("id", id); - args.putString("host", etHost.getText().toString()); + args.putString("host", etHost.getText().toString().trim()); args.putBoolean("starttls", rgEncryption.getCheckedRadioButtonId() == R.id.radio_starttls); args.putBoolean("insecure", cbInsecure.isChecked()); args.putString("port", etPort.getText().toString()); @@ -673,7 +673,7 @@ public class FragmentAccount extends FragmentBase { Bundle args = new Bundle(); args.putLong("id", id); - args.putString("host", etHost.getText().toString()); + args.putString("host", etHost.getText().toString().trim()); args.putBoolean("starttls", rgEncryption.getCheckedRadioButtonId() == R.id.radio_starttls); args.putBoolean("insecure", cbInsecure.isChecked()); args.putString("port", etPort.getText().toString()); diff --git a/app/src/main/java/eu/faircode/email/FragmentIdentity.java b/app/src/main/java/eu/faircode/email/FragmentIdentity.java index 86fa6cb397..877ac2ab8d 100644 --- a/app/src/main/java/eu/faircode/email/FragmentIdentity.java +++ b/app/src/main/java/eu/faircode/email/FragmentIdentity.java @@ -439,7 +439,7 @@ public class FragmentIdentity extends FragmentBase { btnAutoConfig.setEnabled(false); Bundle args = new Bundle(); - args.putString("domain", etDomain.getText().toString()); + args.putString("domain", etDomain.getText().toString().trim()); new SimpleTask() { @Override @@ -502,7 +502,7 @@ public class FragmentIdentity extends FragmentBase { args.putString("replyto", etReplyTo.getText().toString().trim()); args.putString("bcc", etBcc.getText().toString().trim()); args.putLong("account", account == null ? -1 : account.id); - args.putString("host", etHost.getText().toString()); + args.putString("host", etHost.getText().toString().trim()); args.putBoolean("starttls", rgEncryption.getCheckedRadioButtonId() == R.id.radio_starttls); args.putBoolean("insecure", cbInsecure.isChecked()); args.putString("port", etPort.getText().toString()); diff --git a/app/src/main/java/eu/faircode/email/FragmentPop.java b/app/src/main/java/eu/faircode/email/FragmentPop.java index f1835e6eee..08bffa8e49 100644 --- a/app/src/main/java/eu/faircode/email/FragmentPop.java +++ b/app/src/main/java/eu/faircode/email/FragmentPop.java @@ -175,7 +175,7 @@ public class FragmentPop extends FragmentBase { Bundle args = new Bundle(); args.putLong("id", id); - args.putString("host", etHost.getText().toString()); + args.putString("host", etHost.getText().toString().trim()); args.putBoolean("starttls", rgEncryption.getCheckedRadioButtonId() == R.id.radio_starttls); args.putBoolean("insecure", cbInsecure.isChecked()); args.putString("port", etPort.getText().toString());