@Override protected void onPostExecute(FetchUserTaskOutput output) { FinishedCallback callback = getFetchStatusesCallback(output.mCallbackHandle); if (callback != null) { callback.finished(output.mFetchResult, output.mUser); removeFetchStatusesCallback(callback); } super.onPostExecute(output); }
@Override protected void onPostExecute(ModifyStatusesTaskOutput output) { FinishedCallback callback = getModifyStatusesCallback(output.mCallbackHandle); if (callback != null) { callback.finished(output.mResult.mErrorMessage == null, output.mFeed, output.mValue); removeModifyStatusesCallback(callback); } super.onPostExecute(output); }
public void verifyUser(FinishedCallback callback, ConnectionStatus connectionStatus) { if (connectionStatus != null && !connectionStatus.isOnline()) { if (callback != null) { callback.finished( new TwitterFetchResult(false, connectionStatus.getErrorMessageNoConnection()), null); } return; } mFinishedCallbackMap.put(mFetchUserCallbackHandle, callback); new FetchUserTask() .execute( AsyncTaskEx.PRIORITY_HIGH, "Validate User", new FetchUserTaskInput(mFetchUserCallbackHandle, connectionStatus)); mFetchUserCallbackHandle += 1; }
private void trigger(Long userId, FinishedCallback callback, ConnectionStatus connectionStatus) { if (connectionStatus != null && !connectionStatus.isOnline()) { if (callback != null) { callback.finished( new TwitterFetchResult(false, connectionStatus.getErrorMessageNoConnection()), null); } return; } assert (!mFinishedCallbackMap.containsValue(callback)); mFinishedCallbackMap.put(mFetchUserCallbackHandle, callback); new FetchUserTask() .execute( AsyncTaskEx.PRIORITY_HIGH, "Fetch User", new FetchUserTaskInput(userId, mFetchUserCallbackHandle, connectionStatus)); mFetchUserCallbackHandle += 1; }