/**
  * 获取未读数量
  *
  * @param context
  * @param toEJID
  * @return
  */
 public int GetAllUnread(Context context, String toEJID) {
   DatabaseHelper helper = new DatabaseHelper(context, null, 1);
   SQLiteDatabase database = helper.getReadableDatabase();
   int count = DatabaseUtil.getInstance().GetAllUnReadCount(database, toEJID);
   database.close();
   return count;
 }
 /**
  * 忽略所有消息
  *
  * @param context
  */
 public void SetAllRead(Context context) {
   DatabaseHelper helper = new DatabaseHelper(context, null, 1);
   SQLiteDatabase database = helper.getWritableDatabase();
   DatabaseUtil.getInstance().UpdateAllUnreadMessage(database);
   database.close();
 }