From 371c985c25d0b7ed348a1f2328673636acb939d7 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 19 May 2014 21:05:17 +0200 Subject: made roster persistant aka enabled versioning again --- src/eu/siacs/conversations/entities/Contact.java | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'src/eu/siacs/conversations/entities') diff --git a/src/eu/siacs/conversations/entities/Contact.java b/src/eu/siacs/conversations/entities/Contact.java index 17cead63..ff1459a5 100644 --- a/src/eu/siacs/conversations/entities/Contact.java +++ b/src/eu/siacs/conversations/entities/Contact.java @@ -1,6 +1,5 @@ package eu.siacs.conversations.entities; -import java.io.Serializable; import java.util.HashSet; import java.util.Hashtable; import java.util.Set; @@ -11,9 +10,7 @@ import eu.siacs.conversations.xml.Element; import android.content.ContentValues; import android.database.Cursor; -public class Contact extends AbstractEntity implements Serializable { - private static final long serialVersionUID = -4570817093119419962L; - +public class Contact { public static final String TABLENAME = "contacts"; public static final String SYSTEMNAME = "systemname"; @@ -39,10 +36,9 @@ public class Contact extends AbstractEntity implements Serializable { protected boolean inRoster = true; - public Contact(String uuid, String account, String systemName, + public Contact(String account, String systemName, String serverName, String jid, int subscription, String photoUri, String systemAccount, String keys) { - this.uuid = uuid; this.accountUuid = account; this.systemName = systemName; this.serverName = serverName; @@ -87,10 +83,8 @@ public class Contact extends AbstractEntity implements Serializable { .toLowerCase().contains(needle.toLowerCase()))); } - @Override public ContentValues getContentValues() { ContentValues values = new ContentValues(); - values.put(UUID, uuid); values.put(ACCOUNT, accountUuid); values.put(SYSTEMNAME, systemName); values.put(SERVERNAME, serverName); @@ -103,8 +97,7 @@ public class Contact extends AbstractEntity implements Serializable { } public static Contact fromCursor(Cursor cursor) { - return new Contact(cursor.getString(cursor.getColumnIndex(UUID)), - cursor.getString(cursor.getColumnIndex(ACCOUNT)), + return new Contact(cursor.getString(cursor.getColumnIndex(ACCOUNT)), cursor.getString(cursor.getColumnIndex(SYSTEMNAME)), cursor.getString(cursor.getColumnIndex(SERVERNAME)), cursor.getString(cursor.getColumnIndex(JID)), @@ -131,10 +124,6 @@ public class Contact extends AbstractEntity implements Serializable { return this.account; } - public void setUuid(String uuid) { - this.uuid = uuid; - } - public boolean couldBeMuc() { String[] split = this.getJid().split("@"); if (split.length != 2) { -- cgit v1.2.3