Code example for AsyncTaskLoader

0
    private volatile SquareSearchQueryOperation mOperation;
    private final String mQuery;
     
    public SquareSearchLoader(Context context, EsAccount esaccount, String s, int i, String s1)
    { 
        super(context);
        mAccount = esaccount;
        mQuery = s;
        mContinuationToken = s1;
    } 
 
    private void abort() 
    { 
        SquareSearchQueryOperation squaresearchqueryoperation = mOperation;
        if(squaresearchqueryoperation != null)
            squaresearchqueryoperation.abort();
        mOperation = null;
    } 
 
    public SquareSearchLoaderResults loadInBackground() { 
        if(TextUtils.isEmpty(mQuery) || mQuery.length() < mMinQueryLength) {