CrackMe.apk
Download file
package com.facebook.drawee.drawable;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import com.facebook.common.internal.Preconditions;
import javax.annotation.Nullable;
public class MatrixDrawable extends ForwardingDrawable {
@Nullable
private Matrix mDrawMatrix;
private Matrix mMatrix;
private int mUnderlyingHeight = 0;
private int mUnderlyingWidth = 0;
public MatrixDrawable(Drawable drawable, Matrix matrix) {
super((Drawable) Preconditions.checkNotNull(drawable));
this.mMatrix = matrix;
}
public Drawable setCurrent(@Nullable Drawable drawable) {
Drawable current = super.setCurrent(drawable);
configureBounds();
return current;
}
public Matrix getMatrix() {
return this.mMatrix;
}
public void setMatrix(Matrix matrix) {
this.mMatrix = matrix;
configureBounds();
invalidateSelf();
}
public void draw(Canvas canvas) {
configureBoundsIfUnderlyingChanged();
if (this.mDrawMatrix != null) {
int save = canvas.save();
canvas.clipRect(getBounds());
canvas.concat(this.mDrawMatrix);
super.draw(canvas);
canvas.restoreToCount(save);
return;
}
super.draw(canvas);
}
/* access modifiers changed from: protected */
public void onBoundsChange(Rect rect) {
super.onBoundsChange(rect);
configureBounds();
}
private void configureBoundsIfUnderlyingChanged() {
if (this.mUnderlyingWidth != getCurrent().getIntrinsicWidth() || this.mUnderlyingHeight != getCurrent().getIntrinsicHeight()) {
configureBounds();
}
}
private void configureBounds() {
Drawable current = getCurrent();
Rect bounds = getBounds();
int intrinsicWidth = current.getIntrinsicWidth();
this.mUnderlyingWidth = intrinsicWidth;
int intrinsicHeight = current.getIntrinsicHeight();
this.mUnderlyingHeight = intrinsicHeight;
if (intrinsicWidth <= 0 || intrinsicHeight <= 0) {
current.setBounds(bounds);
this.mDrawMatrix = null;
return;
}
current.setBounds(0, 0, intrinsicWidth, intrinsicHeight);
this.mDrawMatrix = this.mMatrix;
}
public void getTransform(Matrix matrix) {
super.getTransform(matrix);
Matrix matrix2 = this.mDrawMatrix;
if (matrix2 != null) {
matrix.preConcat(matrix2);
}
}
}
Download file