package z;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.util.SparseIntArray;
import io.flutter.embedding.android.AndroidTouchProcessor;
import io.flutter.plugin.editing.FlutterTextUtils;
import v.AbstractC1072a;

/* JADX INFO: renamed from: z.k, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C1127k {

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

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

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

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

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

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

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

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

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public String f10936h;
    public int i;

    static {
        SparseIntArray sparseIntArray = new SparseIntArray();
        f10928j = sparseIntArray;
        sparseIntArray.append(3, 1);
        sparseIntArray.append(5, 2);
        sparseIntArray.append(9, 3);
        sparseIntArray.append(2, 4);
        sparseIntArray.append(1, 5);
        sparseIntArray.append(0, 6);
        sparseIntArray.append(4, 7);
        sparseIntArray.append(8, 8);
        sparseIntArray.append(7, 9);
        sparseIntArray.append(6, 10);
    }

    public final void a(Context context, AttributeSet attributeSet) {
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(attributeSet, r.f10966f);
        int indexCount = typedArrayObtainStyledAttributes.getIndexCount();
        for (int i = 0; i < indexCount; i++) {
            int index = typedArrayObtainStyledAttributes.getIndex(i);
            switch (f10928j.get(index)) {
                case 1:
                    this.f10933e = typedArrayObtainStyledAttributes.getFloat(index, this.f10933e);
                    break;
                case 2:
                    this.f10931c = typedArrayObtainStyledAttributes.getInt(index, this.f10931c);
                    break;
                case 3:
                    if (typedArrayObtainStyledAttributes.peekValue(index).type == 3) {
                        typedArrayObtainStyledAttributes.getString(index);
                    } else {
                        String str = AbstractC1072a.f10392a[typedArrayObtainStyledAttributes.getInteger(index, 0)];
                    }
                    break;
                case 4:
                    typedArrayObtainStyledAttributes.getInt(index, 0);
                    break;
                case 5:
                    this.f10929a = n.f(typedArrayObtainStyledAttributes, index, this.f10929a);
                    break;
                case 6:
                    this.f10930b = typedArrayObtainStyledAttributes.getInteger(index, this.f10930b);
                    break;
                case 7:
                    this.f10932d = typedArrayObtainStyledAttributes.getFloat(index, this.f10932d);
                    break;
                case 8:
                    this.f10935g = typedArrayObtainStyledAttributes.getInteger(index, this.f10935g);
                    break;
                case AndroidTouchProcessor.PointerChange.PAN_ZOOM_END /* 9 */:
                    this.f10934f = typedArrayObtainStyledAttributes.getFloat(index, this.f10934f);
                    break;
                case FlutterTextUtils.LINE_FEED /* 10 */:
                    int i5 = typedArrayObtainStyledAttributes.peekValue(index).type;
                    if (i5 == 1) {
                        this.i = typedArrayObtainStyledAttributes.getResourceId(index, -1);
                    } else if (i5 == 3) {
                        String string = typedArrayObtainStyledAttributes.getString(index);
                        this.f10936h = string;
                        if (string.indexOf("/") > 0) {
                            this.i = typedArrayObtainStyledAttributes.getResourceId(index, -1);
                        }
                    } else {
                        typedArrayObtainStyledAttributes.getInteger(index, this.i);
                    }
                    break;
            }
        }
        typedArrayObtainStyledAttributes.recycle();
    }
}
