Rabbit-R1/android (non root)/java/sources/androidx/transition/ImageViewUtils.java
2024-05-21 17:08:36 -04:00

43 lines
1.3 KiB
Java

package androidx.transition;
import android.graphics.Matrix;
import android.widget.ImageView;
import java.lang.reflect.Field;
/* loaded from: classes2.dex */
class ImageViewUtils {
private static Field sDrawMatrixField = null;
private static boolean sDrawMatrixFieldFetched = false;
private static boolean sTryHiddenAnimateTransform = true;
/* JADX INFO: Access modifiers changed from: package-private */
public static void animateTransform(ImageView imageView, Matrix matrix) {
imageView.animateTransform(matrix);
}
private static void hiddenAnimateTransform(ImageView imageView, Matrix matrix) {
if (sTryHiddenAnimateTransform) {
try {
imageView.animateTransform(matrix);
} catch (NoSuchMethodError unused) {
sTryHiddenAnimateTransform = false;
}
}
}
private static void fetchDrawMatrixField() {
if (sDrawMatrixFieldFetched) {
return;
}
try {
Field declaredField = ImageView.class.getDeclaredField("mDrawMatrix");
sDrawMatrixField = declaredField;
declaredField.setAccessible(true);
} catch (NoSuchFieldException unused) {
}
sDrawMatrixFieldFetched = true;
}
private ImageViewUtils() {
}
}