
com.koushikdutta.ion.BitmapInfoToBitmap Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ion Show documentation
Show all versions of ion Show documentation
Android Asynchronous Networking Made Easy
package com.koushikdutta.ion;
import android.graphics.Bitmap;
import com.koushikdutta.async.future.TransformFuture;
import com.koushikdutta.ion.bitmap.BitmapInfo;
class BitmapInfoToBitmap extends TransformFuture {
ContextReference contextReference;
public BitmapInfoToBitmap(ContextReference contextReference) {
this.contextReference = contextReference;
}
@Override
protected void transform(BitmapInfo result) throws Exception {
if (contextReference.isAlive() != null) {
cancel();
return;
}
if (result.exception != null)
setComplete(result.exception);
else
setComplete(result.bitmaps[0]);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy