package o;

import android.R;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import java.lang.reflect.Constructor;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public class M8 {
    public static final Class[] b = {Context.class, AttributeSet.class};
    public static final int[] c = {R.attr.onClick};
    public static final int[] d = {R.attr.accessibilityHeading};
    public static final int[] e = {R.attr.accessibilityPaneTitle};
    public static final int[] f = {R.attr.screenReaderFocusable};
    public static final String[] g = {"android.widget.", "android.view.", "android.webkit."};
    public static final I80 h = new I80(0);
    public final Object[] a = new Object[2];

    public C2594u7 a(Context context, AttributeSet attributeSet) {
        return new C2594u7(context, attributeSet);
    }

    public C2784w7 b(Context context, AttributeSet attributeSet) {
        return new C2784w7(context, attributeSet, com.google.android.gms.common.R.attr.buttonStyle);
    }

    public C2974y7 c(Context context, AttributeSet attributeSet) {
        return new C2974y7(context, attributeSet, com.google.android.gms.common.R.attr.checkboxStyle);
    }

    public C1074e8 d(Context context, AttributeSet attributeSet) {
        return new C1074e8(context, attributeSet);
    }

    public E8 e(Context context, AttributeSet attributeSet) {
        return new E8(context, attributeSet);
    }

    public final View f(Context context, String str, String str2) throws NoSuchMethodException, SecurityException {
        String strConcat;
        I80 i80 = h;
        Constructor constructor = (Constructor) i80.get(str);
        if (constructor == null) {
            if (str2 != null) {
                try {
                    strConcat = str2.concat(str);
                } catch (Exception unused) {
                    return null;
                }
            } else {
                strConcat = str;
            }
            constructor = Class.forName(strConcat, false, context.getClassLoader()).asSubclass(View.class).getConstructor(b);
            i80.put(str, constructor);
        }
        constructor.setAccessible(true);
        return (View) constructor.newInstance(this.a);
    }
}
