@Override public void entriesDeleted(Collection<String> addresses) { for (final String uid : addresses) { final User user = getUser(uid, false); mUserList.remove(user); mContactList.removeUser(uid); service.sendRosterDeleted(uid); } }
public void destroy() { mUserList.clear(); mUserList = null; mContactList.clear(); mContactList = null; mRoster.removeRosterListener(this); mRoster = null; mUserMe = null; }
public User setupUser(User user) { final User user2 = getUserByFullUserLogin(user.getFullUserLogin()); if (user2 == null) { mUserList.add(user); mContactList.add(user); service.sendRosterAdded(user); return user; } else { user2.setUserState(user.getUserState()); service.sendRosterUpdated(user2); return user2; } }
public Contact getContact(User user, boolean addIfNotExists) { if (!mContactList.contains(user)) { return new Contact(user); } return mContactList.get(user); }