use of com.aviary.android.feather.async_tasks.ExifTask in project mobile-android by photo.
the class FeatherActivity method loadExif.
/**
* load the original file EXIF data and store the result into the local data instance
*/
protected void loadExif() {
logger.log("loadExif");
final LocalDataService data = mFilterManager.getService(LocalDataService.class);
ThreadPoolService thread = mFilterManager.getService(ThreadPoolService.class);
if (null != data && thread != null) {
final String path = data.getSourceImagePath();
FutureListener<Bundle> listener = new FutureListener<Bundle>() {
@Override
public void onFutureDone(Future<Bundle> future) {
try {
Bundle result = future.get();
if (null != result) {
data.setOriginalExifBundle(result);
}
} catch (Throwable e) {
e.printStackTrace();
}
}
};
if (null != path) {
thread.submit(new ExifTask(), listener, path);
} else {
logger.warning("orinal file path not available");
}
}
}
Aggregations