diff options
author | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-04-16 19:14:20 +0200 |
---|---|---|
committer | Andreas Straub <andy@strb.org> | 2014-04-18 00:17:34 +0200 |
commit | a04d736f75c793dc943c1e0ce7c89e1c20a3a684 (patch) | |
tree | c1013c173338bcc6913989a3781ed275b8b350e7 /src/eu/siacs/conversations/entities/Contact.java | |
parent | 4a36abf30fb2d59934d5bfd121542fa82f5c98ce (diff) |
fixed possible race conditions with presences
Diffstat (limited to 'src/eu/siacs/conversations/entities/Contact.java')
-rw-r--r-- | src/eu/siacs/conversations/entities/Contact.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/entities/Contact.java b/src/eu/siacs/conversations/entities/Contact.java index 4b97cc41..132b2717 100644 --- a/src/eu/siacs/conversations/entities/Contact.java +++ b/src/eu/siacs/conversations/entities/Contact.java @@ -13,6 +13,7 @@ import eu.siacs.conversations.xml.Element; import android.content.ContentValues; import android.database.Cursor; +import android.util.Log; public class Contact extends AbstractEntity implements Serializable { private static final long serialVersionUID = -4570817093119419962L; @@ -163,11 +164,16 @@ public class Contact extends AbstractEntity implements Serializable { public void updatePresence(String resource, int status) { this.presences.updatePresence(resource, status); + Log.d("xmppService","updatingPresence for contact="+this.jid+" resource="+resource+" num="+presences.size()); } public void removePresence(String resource) { this.presences.removePresence(resource); } + + public void clearPresences() { + this.presences.clearPresences(); + } public int getMostAvailableStatus() { return this.presences.getMostAvailableStatus(); |