diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2014-05-19 21:05:17 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2014-05-19 21:05:17 +0200 |
commit | 371c985c25d0b7ed348a1f2328673636acb939d7 (patch) | |
tree | 1cf341a3b6eaf43b33ffd031d82a1b42b403140c /src/eu/siacs/conversations/entities/Contact.java | |
parent | a6f9a742c0dffeaa2f7fc26ad65e9c972a9d2288 (diff) |
made roster persistant aka enabled versioning again
Diffstat (limited to 'src/eu/siacs/conversations/entities/Contact.java')
-rw-r--r-- | src/eu/siacs/conversations/entities/Contact.java | 17 |
1 files changed, 3 insertions, 14 deletions
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) { |