From bff97731deed4c599dcb6c3a2887c9f47165dd3f Mon Sep 17 00:00:00 2001 From: steckbrief Date: Fri, 11 May 2018 19:49:27 +0200 Subject: introduces JidUtil for Jid creation, fixes duplication of childs while adding childs with xmlns and name --- .../thedevstack/conversationsplus/persistance/DatabaseBackend.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java') diff --git a/src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java b/src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java index fd227e5a..d006628e 100644 --- a/src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java +++ b/src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java @@ -50,6 +50,7 @@ import de.thedevstack.conversationsplus.persistance.db.access.MessageDatabaseAcc import de.thedevstack.conversationsplus.utils.SimpleCryptoUtil; import de.thedevstack.conversationsplus.xmpp.jid.InvalidJidException; import de.thedevstack.conversationsplus.xmpp.jid.Jid; +import de.thedevstack.conversationsplus.xmpp.jid.JidUtil; public class DatabaseBackend extends SQLiteOpenHelper { @@ -297,7 +298,7 @@ public class DatabaseBackend extends SQLiteOpenHelper { while (cursor.moveToNext()) { String newJid; try { - newJid = Jid.fromString( + newJid = JidUtil.fromString( cursor.getString(cursor.getColumnIndex(Conversation.CONTACTJID)) ).toString(); } catch (InvalidJidException ignored) { @@ -322,7 +323,7 @@ public class DatabaseBackend extends SQLiteOpenHelper { while (cursor.moveToNext()) { String newJid; try { - newJid = Jid.fromString( + newJid = JidUtil.fromString( cursor.getString(cursor.getColumnIndex(Contact.JID)) ).toString(); } catch (InvalidJidException ignored) { @@ -349,7 +350,7 @@ public class DatabaseBackend extends SQLiteOpenHelper { while (cursor.moveToNext()) { String newServer; try { - newServer = Jid.fromParts( + newServer = JidUtil.fromParts( cursor.getString(cursor.getColumnIndex(Account.USERNAME)), cursor.getString(cursor.getColumnIndex(Account.SERVER)), "mobile" -- cgit v1.2.3