private void restartLoader() { final String method = "restartLoader"; boolean ended = false; synchronized (asyncLoaderLock) { if (MyLog.isVerboseEnabled() && asyncLoader != null) { logV(method, "status:" + getAsyncLoaderStatus()); } if (cancelAsyncTask(method)) { try { asyncLoader = new AsyncLoader(); asyncLoader.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } catch (Exception e) { logD(method, "", e); ended = true; asyncLoader = null; } } } if (ended) { logV(method, "deliver null as result"); deliverResultsAndClean(null); } }