package X6FRs_4.JZJr_16;

import android.graphics.Matrix;
import android.util.Log;
import android.view.View;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/* compiled from: ViewUtilsApi21.java */
/* loaded from: classes.dex */
public class Fv6VRig_36 extends R6WQ_35 {

    /* renamed from: Mqv2r_3  reason: collision with root package name */
    public static Method f3126Mqv2r_3;

    /* renamed from: Mqv2r_3  reason: collision with other field name */
    public static boolean f557Mqv2r_3;
    public static Method PGPF6hQ_2;

    /* renamed from: PGPF6hQ_2  reason: collision with other field name */
    public static boolean f558PGPF6hQ_2;

    /* renamed from: X6FRs_4  reason: collision with root package name */
    public static Method f3127X6FRs_4;

    /* renamed from: X6FRs_4  reason: collision with other field name */
    public static boolean f559X6FRs_4;

    @Override // X6FRs_4.JZJr_16.QNpr_38
    public void KQgRr5e_0(View view, Matrix matrix) {
        PGPF6hQ_2();
        Method method = f3127X6FRs_4;
        if (method != null) {
            try {
                method.invoke(view, matrix);
            } catch (IllegalAccessException e) {
                throw new RuntimeException(e.getCause());
            } catch (InvocationTargetException unused) {
            }
        }
    }

    public final void Mqv2r_3() {
        if (f558PGPF6hQ_2) {
            return;
        }
        try {
            Method declaredMethod = View.class.getDeclaredMethod("transformMatrixToGlobal", Matrix.class);
            PGPF6hQ_2 = declaredMethod;
            declaredMethod.setAccessible(true);
        } catch (NoSuchMethodException e) {
            Log.i("ViewUtilsApi21", "Failed to retrieve transformMatrixToGlobal method", e);
        }
        f558PGPF6hQ_2 = true;
    }

    @Override // X6FRs_4.JZJr_16.QNpr_38
    public void PGPF6hQ_2(View view, Matrix matrix) {
        X6FRs_4();
        Method method = f3126Mqv2r_3;
        if (method != null) {
            try {
                method.invoke(view, matrix);
            } catch (IllegalAccessException unused) {
            } catch (InvocationTargetException e) {
                throw new RuntimeException(e.getCause());
            }
        }
    }

    @Override // X6FRs_4.JZJr_16.QNpr_38
    public void QxJ9d_1(View view, Matrix matrix) {
        Mqv2r_3();
        Method method = PGPF6hQ_2;
        if (method != null) {
            try {
                method.invoke(view, matrix);
            } catch (IllegalAccessException unused) {
            } catch (InvocationTargetException e) {
                throw new RuntimeException(e.getCause());
            }
        }
    }

    public final void X6FRs_4() {
        if (f557Mqv2r_3) {
            return;
        }
        try {
            Method declaredMethod = View.class.getDeclaredMethod("transformMatrixToLocal", Matrix.class);
            f3126Mqv2r_3 = declaredMethod;
            declaredMethod.setAccessible(true);
        } catch (NoSuchMethodException e) {
            Log.i("ViewUtilsApi21", "Failed to retrieve transformMatrixToLocal method", e);
        }
        f557Mqv2r_3 = true;
    }

    public final void PGPF6hQ_2() {
        if (f559X6FRs_4) {
            return;
        }
        try {
            Method declaredMethod = View.class.getDeclaredMethod("setAnimationMatrix", Matrix.class);
            f3127X6FRs_4 = declaredMethod;
            declaredMethod.setAccessible(true);
        } catch (NoSuchMethodException e) {
            Log.i("ViewUtilsApi21", "Failed to retrieve setAnimationMatrix method", e);
        }
        f559X6FRs_4 = true;
    }
}
