From 78a82a74bc7f834ec744646c97fde27a3c29ca6b Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 15 May 2020 20:20:22 +0200 Subject: [PATCH] use unescaped jid in ManageAccount --- .../java/eu/siacs/conversations/ui/ManageAccountActivity.java | 2 +- .../eu/siacs/conversations/services/NotificationService.java | 2 +- .../java/eu/siacs/conversations/ui/EditAccountActivity.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/conversations/java/eu/siacs/conversations/ui/ManageAccountActivity.java b/src/conversations/java/eu/siacs/conversations/ui/ManageAccountActivity.java index 38015c324..86bdd5501 100644 --- a/src/conversations/java/eu/siacs/conversations/ui/ManageAccountActivity.java +++ b/src/conversations/java/eu/siacs/conversations/ui/ManageAccountActivity.java @@ -131,7 +131,7 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda menu.findItem(R.id.mgmt_account_announce_pgp).setVisible(false); menu.findItem(R.id.mgmt_account_publish_avatar).setVisible(false); } - menu.setHeaderTitle(this.selectedAccount.getJid().asBareJid().toString()); + menu.setHeaderTitle(this.selectedAccount.getJid().asBareJid().toEscapedString()); } @Override diff --git a/src/main/java/eu/siacs/conversations/services/NotificationService.java b/src/main/java/eu/siacs/conversations/services/NotificationService.java index bd3df024a..1b57932d6 100644 --- a/src/main/java/eu/siacs/conversations/services/NotificationService.java +++ b/src/main/java/eu/siacs/conversations/services/NotificationService.java @@ -1109,7 +1109,7 @@ public class NotificationService { return; } else if (errors.size() == 1) { mBuilder.setContentTitle(mXmppConnectionService.getString(R.string.problem_connecting_to_account)); - mBuilder.setContentText(errors.get(0).getJid().asBareJid().toString()); + mBuilder.setContentText(errors.get(0).getJid().asBareJid().toEscapedString()); } else { mBuilder.setContentTitle(mXmppConnectionService.getString(R.string.problem_connecting_to_accounts)); mBuilder.setContentText(mXmppConnectionService.getString(R.string.touch_to_fix)); diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java index 37c3be53f..28ff0b209 100644 --- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java @@ -577,9 +577,9 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat protected boolean jidEdited() { final String unmodified; if (mUsernameMode) { - unmodified = this.mAccount.getJid().getLocal(); + unmodified = this.mAccount.getJid().getEscapedLocal(); } else { - unmodified = this.mAccount.getJid().asBareJid().toString(); + unmodified = this.mAccount.getJid().asBareJid().toEscapedString(); } return !unmodified.equals(this.binding.accountJid.getText().toString()); }