public List<AcronymExpansion> doInBackground(String acronym){
  try {
    List<AcronymExpansion> longForms=mAcronymCache.get(acronym);
    if (longForms != null && !longForms.isEmpty()) {
      Log.v(TAG,acronym + ": in cache");
      return longForms;
    }
 else {
      Log.v(TAG,acronym + ": not in cache");
      AcronymData result=null;
      longForms=result.getLfs();
      mAcronymCache.put(result.getSf(),longForms);
      return longForms;
    }
  }
 catch (  Exception e) {
    Log.v(TAG,"doInBackground() " + e);
    return null;
  }
}

public List < AcronymExpansion > doInBackground ( String acronym ) { try { List < AcronymExpansion > longForms = mAcronymCache . get ( acronym ) ; if ( longForms != null && ! longForms . isEmpty ( ) ) { Log . v ( TAG , acronym + ": in cache" ) ; return longForms ; } else { Log . v ( TAG , acronym + ": not in cache" ) ; AcronymData result = null ; longForms = result . getLfs ( ) ; mAcronymCache . put ( result . getSf ( ) , longForms ) ; return longForms ; } } catch ( Exception e ) { Log . v ( TAG , "doInBackground() " + e ) ; return null ; } }
retrieve the expanded acronym results via a synchronous two - way method call , which runs in a background thread to avoid blocking the ui thread .
