diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-11-08 21:32:30 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-11-08 21:32:30 +0100 |
commit | 771d214c84a217799b405534f23faa23dfec043d (patch) | |
tree | cb8b374089b020e49d12c4827cf3a8d3658edb0a | |
parent | 71bcc8d3e84999c3caa271a206635ed26a869962 (diff) |
catch exception on invalid inputs
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/EditAccountActivity.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java index 775e8f6dc..91efbc503 100644 --- a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java +++ b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java @@ -440,10 +440,14 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat protected void updateInfoButtons() { if (this.binding.accountRegisterNew.isChecked() && this.binding.accountJid.getText().length() > 0 && !this.binding.accountJid.getText().toString().contains("@")) { - final String jid = this.binding.accountJid.getText().toString(); - if (!mUsernameMode && Jid.of(jid).getDomain().toLowerCase().equals("pix-art.de")) { - this.binding.showPrivacyPolicy.setVisibility(View.VISIBLE); - this.binding.showTermsOfUse.setVisibility(View.VISIBLE); + try { + final String jid = this.binding.accountJid.getText().toString(); + if (!mUsernameMode && Jid.of(jid).getDomain().toLowerCase().equals("pix-art.de")) { + this.binding.showPrivacyPolicy.setVisibility(View.VISIBLE); + this.binding.showTermsOfUse.setVisibility(View.VISIBLE); + } + } catch (Exception e) { + e.printStackTrace(); } } else { this.binding.showPrivacyPolicy.setVisibility(View.GONE); |