use of com.aviary.android.feather.library.plugins.ExternalPacksTask in project mobile-android by photo.
the class FilterManager method updateAvailablePlugins.
private void updateAvailablePlugins() {
logger.info("updateAvailablePlugins");
ThreadPoolService background = getService(ThreadPoolService.class);
if (null != background) {
if (Constants.getExternalPacksEnabled()) {
FutureListener<Bundle> listener = new FutureListener<Bundle>() {
@Override
public void onFutureDone(Future<Bundle> future) {
logger.log("updateAvailablePlugins::completed");
Bundle result = null;
try {
result = future.get();
} catch (Throwable t) {
logger.error(t.getMessage());
return;
}
mPluingsHandler.post(new ExternalPluginTaskCompletedRunnable(result));
}
};
// submit the task to download the list of external content
background.submit(new ExternalPacksTask(), listener, null);
}
}
}
Aggregations