public void setSearchCallback(SearchCallback searchCallback) { callback = searchCallback; if (callback != null && hasSavedResult) { callback.searchCompleted(savedResult); hasSavedResult = false; savedResult = null; } }
@Override protected void onPostExecute(ArrayList<PlayerModel> result) { if (callback != null) { callback.searchCompleted(result); } else { hasSavedResult = true; savedResult = result; } }