CrackMe.apk
Download file
package com.facebook.imagepipeline.animated.base;
import android.graphics.Bitmap;
import com.facebook.common.internal.Preconditions;
import com.facebook.common.references.CloseableReference;
import com.facebook.imagepipeline.transformation.BitmapTransformation;
import java.util.List;
import javax.annotation.Nullable;
public class AnimatedImageResult {
@Nullable
private BitmapTransformation mBitmapTransformation;
@Nullable
private List<CloseableReference<Bitmap>> mDecodedFrames;
private final int mFrameForPreview;
private final AnimatedImage mImage;
@Nullable
private CloseableReference<Bitmap> mPreviewBitmap;
AnimatedImageResult(AnimatedImageResultBuilder animatedImageResultBuilder) {
this.mImage = (AnimatedImage) Preconditions.checkNotNull(animatedImageResultBuilder.getImage());
this.mFrameForPreview = animatedImageResultBuilder.getFrameForPreview();
this.mPreviewBitmap = animatedImageResultBuilder.getPreviewBitmap();
this.mDecodedFrames = animatedImageResultBuilder.getDecodedFrames();
this.mBitmapTransformation = animatedImageResultBuilder.getBitmapTransformation();
}
private AnimatedImageResult(AnimatedImage animatedImage) {
this.mImage = (AnimatedImage) Preconditions.checkNotNull(animatedImage);
this.mFrameForPreview = 0;
}
public static AnimatedImageResult forAnimatedImage(AnimatedImage animatedImage) {
return new AnimatedImageResult(animatedImage);
}
public static AnimatedImageResultBuilder newBuilder(AnimatedImage animatedImage) {
return new AnimatedImageResultBuilder(animatedImage);
}
public AnimatedImage getImage() {
return this.mImage;
}
public int getFrameForPreview() {
return this.mFrameForPreview;
}
@Nullable
public synchronized CloseableReference<Bitmap> getDecodedFrame(int i) {
List<CloseableReference<Bitmap>> list = this.mDecodedFrames;
if (list == null) {
return null;
}
return CloseableReference.cloneOrNull(list.get(i));
}
public synchronized boolean hasDecodedFrame(int i) {
List<CloseableReference<Bitmap>> list;
list = this.mDecodedFrames;
return (list == null || list.get(i) == null) ? false : true;
}
@Nullable
public BitmapTransformation getBitmapTransformation() {
return this.mBitmapTransformation;
}
@Nullable
public synchronized CloseableReference<Bitmap> getPreviewBitmap() {
return CloseableReference.cloneOrNull(this.mPreviewBitmap);
}
public synchronized void dispose() {
CloseableReference.closeSafely((CloseableReference<?>) this.mPreviewBitmap);
this.mPreviewBitmap = null;
CloseableReference.closeSafely((Iterable<? extends CloseableReference<?>>) this.mDecodedFrames);
this.mDecodedFrames = null;
}
}
Download file