package X6FRs_4.JZJr_16;

import android.graphics.Matrix;
import android.graphics.Rect;
import android.os.Build;
import android.util.Log;
import android.util.Property;
import android.view.View;
import java.lang.reflect.Field;
/* compiled from: ViewUtils.java */
/* loaded from: classes.dex */
public class JXypC6_34 {
    public static final QNpr_38 KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public static final Property<View, Float> f570KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public static Field f571KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public static boolean f572KQgRr5e_0;
    public static final Property<View, Rect> QxJ9d_1;

    /* compiled from: ViewUtils.java */
    /* loaded from: classes.dex */
    public static class KQgRr5e_0 extends Property<View, Float> {
        public KQgRr5e_0(Class cls, String str) {
            super(cls, str);
        }

        @Override // android.util.Property
        /* renamed from: KQgRr5e_0 */
        public Float get(View view) {
            return Float.valueOf(JXypC6_34.KQgRr5e_0(view));
        }

        @Override // android.util.Property
        /* renamed from: KQgRr5e_0 */
        public void set(View view, Float f) {
            JXypC6_34.KQgRr5e_0(view, f.floatValue());
        }
    }

    /* compiled from: ViewUtils.java */
    /* loaded from: classes.dex */
    public static class QxJ9d_1 extends Property<View, Rect> {
        public QxJ9d_1(Class cls, String str) {
            super(cls, str);
        }

        @Override // android.util.Property
        /* renamed from: KQgRr5e_0 */
        public Rect get(View view) {
            return X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.m256KQgRr5e_0(view);
        }

        @Override // android.util.Property
        /* renamed from: KQgRr5e_0 */
        public void set(View view, Rect rect) {
            X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.KQgRr5e_0(view, rect);
        }
    }

    static {
        int i = Build.VERSION.SDK_INT;
        if (i >= 22) {
            KQgRr5e_0 = new O3zP_37();
        } else if (i >= 21) {
            KQgRr5e_0 = new Fv6VRig_36();
        } else if (i >= 19) {
            KQgRr5e_0 = new R6WQ_35();
        } else {
            KQgRr5e_0 = new QNpr_38();
        }
        f570KQgRr5e_0 = new KQgRr5e_0(Float.class, "translationAlpha");
        QxJ9d_1 = new QxJ9d_1(Rect.class, "clipBounds");
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public static ViqFd_33 m350KQgRr5e_0(View view) {
        if (Build.VERSION.SDK_INT >= 18) {
            return new WkDTNqU_32(view);
        }
        return DtqPmDY_31.KQgRr5e_0(view);
    }

    public static void PGPF6hQ_2(View view, Matrix matrix) {
        KQgRr5e_0.PGPF6hQ_2(view, matrix);
    }

    public static void QxJ9d_1(View view) {
        KQgRr5e_0.QxJ9d_1(view);
    }

    public static void QxJ9d_1(View view, Matrix matrix) {
        KQgRr5e_0.QxJ9d_1(view, matrix);
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public static XuYK_42 m351KQgRr5e_0(View view) {
        if (Build.VERSION.SDK_INT >= 18) {
            return new N7iYjdq_41(view);
        }
        return new BQkV_40(view.getWindowToken());
    }

    public static void KQgRr5e_0(View view, float f) {
        KQgRr5e_0.KQgRr5e_0(view, f);
    }

    public static float KQgRr5e_0(View view) {
        return KQgRr5e_0.KQgRr5e_0(view);
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public static void m352KQgRr5e_0(View view) {
        KQgRr5e_0.m353KQgRr5e_0(view);
    }

    public static void KQgRr5e_0(View view, int i) {
        KQgRr5e_0();
        Field field = f571KQgRr5e_0;
        if (field != null) {
            try {
                f571KQgRr5e_0.setInt(view, i | (field.getInt(view) & (-13)));
            } catch (IllegalAccessException unused) {
            }
        }
    }

    public static void KQgRr5e_0(View view, Matrix matrix) {
        KQgRr5e_0.KQgRr5e_0(view, matrix);
    }

    public static void KQgRr5e_0(View view, int i, int i2, int i3, int i4) {
        KQgRr5e_0.KQgRr5e_0(view, i, i2, i3, i4);
    }

    public static void KQgRr5e_0() {
        if (f572KQgRr5e_0) {
            return;
        }
        try {
            Field declaredField = View.class.getDeclaredField("mViewFlags");
            f571KQgRr5e_0 = declaredField;
            declaredField.setAccessible(true);
        } catch (NoSuchFieldException unused) {
            Log.i("ViewUtils", "fetchViewFlagsField: ");
        }
        f572KQgRr5e_0 = true;
    }
}
