package x;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.util.SparseIntArray;
import t.AbstractC1531a;

/* JADX INFO: loaded from: classes.dex */
public final class h {

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

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public int f18462a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public int f18463b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public float f18464c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public float f18465d;

    static {
        SparseIntArray sparseIntArray = new SparseIntArray();
        f18461e = sparseIntArray;
        sparseIntArray.append(2, 1);
        sparseIntArray.append(4, 2);
        sparseIntArray.append(5, 3);
        sparseIntArray.append(1, 4);
        sparseIntArray.append(0, 5);
        sparseIntArray.append(3, 6);
    }

    public final void a(Context context, AttributeSet attributeSet) {
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(attributeSet, n.f18491e);
        int indexCount = typedArrayObtainStyledAttributes.getIndexCount();
        for (int i = 0; i < indexCount; i++) {
            int index = typedArrayObtainStyledAttributes.getIndex(i);
            switch (f18461e.get(index)) {
                case 1:
                    this.f18465d = typedArrayObtainStyledAttributes.getFloat(index, this.f18465d);
                    break;
                case 2:
                    this.f18463b = typedArrayObtainStyledAttributes.getInt(index, this.f18463b);
                    break;
                case 3:
                    if (typedArrayObtainStyledAttributes.peekValue(index).type == 3) {
                        typedArrayObtainStyledAttributes.getString(index);
                    } else {
                        String str = AbstractC1531a.f16944a[typedArrayObtainStyledAttributes.getInteger(index, 0)];
                    }
                    break;
                case 4:
                    typedArrayObtainStyledAttributes.getInt(index, 0);
                    break;
                case 5:
                    this.f18462a = k.f(typedArrayObtainStyledAttributes, index, this.f18462a);
                    break;
                case Z.g.STRING_SET_FIELD_NUMBER /* 6 */:
                    this.f18464c = typedArrayObtainStyledAttributes.getFloat(index, this.f18464c);
                    break;
            }
        }
        typedArrayObtainStyledAttributes.recycle();
    }
}
