/** * Sets the current presence on this contact item. * * @param presence the presence. */ public void setPresence(Presence presence) { this.presence = presence; final VCardUpdateExtension extension = presence.getExtension("x", "vcard-temp:x:update"); // Handle vCard update packet. if (extension != null) { String hash = extension.getPhotoHash(); if (hash != null) { this.hash = hash; if (!hashExists(hash)) { updateAvatar(); updateAvatarInSideIcon(); } } } updatePresenceIcon(presence); }