what-the-bank/sources/o/Dgr.java

122 lines
3.6 KiB
Java

package o;
import android.graphics.Matrix;
import android.view.View;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import o.C16920sQi;
/* loaded from: classes.dex */
class Dgr {
private static Field a;
private static Method c;
private static boolean d;
private static boolean e;
public void c(View view, float f) {
Float f2 = (Float) view.getTag(C16920sQi.RVV.save_non_transition_alpha);
if (f2 != null) {
view.setAlpha(f2.floatValue() * f);
} else {
view.setAlpha(f);
}
}
public float e(View view) {
Float f = (Float) view.getTag(C16920sQi.RVV.save_non_transition_alpha);
if (f != null) {
return view.getAlpha() / f.floatValue();
}
return view.getAlpha();
}
public void c(View view) {
if (view.getTag(C16920sQi.RVV.save_non_transition_alpha) == null) {
view.setTag(C16920sQi.RVV.save_non_transition_alpha, Float.valueOf(view.getAlpha()));
}
}
public void d(View view) {
if (view.getVisibility() == 0) {
view.setTag(C16920sQi.RVV.save_non_transition_alpha, null);
}
}
public void Bu_(View view, Matrix matrix) {
Object parent = view.getParent();
if (parent instanceof View) {
Bu_((View) parent, matrix);
matrix.preTranslate(-r0.getScrollX(), -r0.getScrollY());
}
matrix.preTranslate(view.getLeft(), view.getTop());
Matrix matrix2 = view.getMatrix();
if (matrix2.isIdentity()) {
return;
}
matrix.preConcat(matrix2);
}
public void Bv_(View view, Matrix matrix) {
Object parent = view.getParent();
if (parent instanceof View) {
Bv_((View) parent, matrix);
matrix.postTranslate(r0.getScrollX(), r0.getScrollY());
}
matrix.postTranslate(-view.getLeft(), -view.getTop());
Matrix matrix2 = view.getMatrix();
if (matrix2.isIdentity()) {
return;
}
Matrix matrix3 = new Matrix();
if (matrix2.invert(matrix3)) {
matrix.postConcat(matrix3);
}
}
public void d(View view, int i, int i2, int i3, int i4) {
d();
Method method = c;
if (method != null) {
try {
method.invoke(view, Integer.valueOf(i), Integer.valueOf(i2), Integer.valueOf(i3), Integer.valueOf(i4));
} catch (IllegalAccessException unused) {
} catch (InvocationTargetException e2) {
throw new RuntimeException(e2.getCause());
}
}
}
public void c(View view, int i) {
if (!e) {
try {
Field declaredField = View.class.getDeclaredField("mViewFlags");
a = declaredField;
declaredField.setAccessible(true);
} catch (NoSuchFieldException unused) {
}
e = true;
}
Field field = a;
if (field != null) {
try {
a.setInt(view, i | (field.getInt(view) & (-13)));
} catch (IllegalAccessException unused2) {
}
}
}
private void d() {
if (d) {
return;
}
try {
Method declaredMethod = View.class.getDeclaredMethod("setFrame", Integer.TYPE, Integer.TYPE, Integer.TYPE, Integer.TYPE);
c = declaredMethod;
declaredMethod.setAccessible(true);
} catch (NoSuchMethodException unused) {
}
d = true;
}
}