@Override public void onLoadFinished(Loader<LoaderResult<Void>> arg0, LoaderResult<Void> results) { if (mListener != null) { if (results.hasException()) { mListener.onExeceptionDuringDeletion(results.getException()); } else { mListener.afterDelete(node); } } }
@Override public Loader<LoaderResult<Void>> onCreateLoader(int id, Bundle args) { if (mListener != null) { mListener.beforeDelete(node); } if (node.isDocument()) { return new NodeDeleteLoader(context, session, (Document) node); } else if (node.isFolder()) { return new NodeDeleteLoader(context, session, (Folder) node); } else { return null; } }