@Override
  public void onSendFinished(boolean success, File file, Object key) {
    int status;
    if (success) {
      status = HistoryManager.STATUS_SEND_SUCCESS;
    } else {
      status = HistoryManager.STATUS_SEND_FAIL;
    }

    ContentValues values = new ContentValues();
    values.put(MetaData.History.STATUS, status);
    getContentResolver().update(getFileUri(key), values, null, null);

    SendFileThread thread = mSendingFileThreadMap.get(key);
    if (thread != null) {
      thread.setSendFinished();
      mSendingFileThreadMap.remove(key);
      mSendQueue.remove();
    }

    thread = mSendQueue.peek();
    if (thread != null) {
      mExecutorService.execute(thread);
    }
  }
  public void handleSendFileRequest(Intent intent) {
    Bundle bundle;
    bundle = intent.getExtras();
    if (null != bundle) {
      List<String> pathLists = bundle.getStringArrayList(Extra.SEND_FILES);
      List<User> userList = bundle.getParcelableArrayList(Extra.SEND_USERS);
      for (String path : pathLists) {
        sendFile(path, userList);
      }

      SendFileThread thread = mSendQueue.peek();
      if (thread != null && !thread.isSendSending()) {
        mExecutorService.execute(thread);
      }
    }
  }