public void clearDB() { dbManager.deleteAllContacts(); }
/** * 从本地获取联系人 * * @return */ public List<User> getContactsFromDB() { return dbManager.getAllContacts(); }
public ContactsManager(Context context) { SPManager spManager = new SPManager(context); this.context = context; dbManager = DBManager.getInstance(context, spManager.getLoginConfig().getUsername()); }
/** 保存到本地 */ public void savaContacts(List<User> users) { dbManager.saveContacts(users); }
public User getUserFromDB(String jid) { return dbManager.getUserByJid(jid); }