package l;

import android.graphics.drawable.Drawable;
import java.lang.reflect.Field;
import java.lang.reflect.Method;

/* JADX INFO: loaded from: classes.dex */
public abstract class n1 {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public static final boolean f29776a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public static final Method f29777b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public static final Field f29778c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public static final Field f29779d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public static final Field f29780e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public static final Field f29781f;

    /* JADX WARN: Removed duplicated region for block: B:25:0x004c  */
    /* JADX WARN: Removed duplicated region for block: B:26:0x0059  */
    static {
        Method method;
        Field field;
        Field field2;
        Field field3;
        Field field4;
        boolean z10;
        Class<?> cls;
        try {
            cls = Class.forName("android.graphics.Insets");
            method = Drawable.class.getMethod("getOpticalInsets", new Class[0]);
            try {
                field = cls.getField("left");
            } catch (ClassNotFoundException unused) {
                field = null;
                field2 = field;
                field3 = field2;
                field4 = null;
                z10 = false;
                if (z10) {
                }
            } catch (NoSuchFieldException unused2) {
                field = null;
                field2 = field;
                field3 = field2;
                field4 = null;
                z10 = false;
                if (z10) {
                }
            } catch (NoSuchMethodException unused3) {
                field = null;
                field2 = field;
                field3 = field2;
                field4 = null;
                z10 = false;
                if (z10) {
                }
            }
        } catch (ClassNotFoundException unused4) {
            method = null;
            field = null;
        } catch (NoSuchFieldException unused5) {
            method = null;
            field = null;
        } catch (NoSuchMethodException unused6) {
            method = null;
            field = null;
        }
        try {
            field2 = cls.getField("top");
            try {
                field3 = cls.getField("right");
            } catch (ClassNotFoundException | NoSuchFieldException | NoSuchMethodException unused7) {
                field3 = null;
            }
            try {
                field4 = cls.getField("bottom");
                z10 = true;
            } catch (ClassNotFoundException | NoSuchFieldException | NoSuchMethodException unused8) {
                field4 = null;
                z10 = false;
            }
        } catch (ClassNotFoundException unused9) {
            field2 = null;
            field3 = field2;
            field4 = null;
            z10 = false;
            if (z10) {
            }
        } catch (NoSuchFieldException unused10) {
            field2 = null;
            field3 = field2;
            field4 = null;
            z10 = false;
            if (z10) {
            }
        } catch (NoSuchMethodException unused11) {
            field2 = null;
            field3 = field2;
            field4 = null;
            z10 = false;
            if (z10) {
            }
        }
        if (z10) {
            f29777b = method;
            f29778c = field;
            f29779d = field2;
            f29780e = field3;
            f29781f = field4;
            f29776a = true;
            return;
        }
        f29777b = null;
        f29778c = null;
        f29779d = null;
        f29780e = null;
        f29781f = null;
        f29776a = false;
    }
}
