Code example for AsyncTaskLoader

public abstract class GenericAsyncTaskLoader<T> extends AsyncTaskLoader<T> {
    private T mData;
    public GenericAsyncTaskLoader(Context context) {
     * Called when there is new data to deliver to the client. The super class 
     * will take care of delivering it; the implementation here just adds a 
     * little more logic. 
    public void deliverResult(T data) {
        if (isReset()) {
            // An async query came in while the loader is stopped. We 
            // don't need the result. 
            if (data != null) {