// Method for the AsyncTask to return an error protected void returnError(String errorText) { mTaskComplete = true; if (mCallback != null) { mCallback.onTaskError(mTaskId, errorText); } if (mProgDialog != null) { mProgDialog.dismiss(); mProgDialog = null; } }
// Method for the AsyncTask to return its result protected void returnResult(Object result) { mTaskResult = result; mTaskComplete = true; if (mCallback != null) { mCallback.onTaskResult(mTaskId, mTaskResult); } if (mProgDialog != null) { mProgDialog.dismiss(); mProgDialog = null; } }
public void notifyListeners(Number160 taskId, Map<Number160, Data> dataMap) { for (TaskResultListener taskResultListener : listeners) { taskResultListener.taskReceived(taskId, dataMap); } }