@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); } }