package W0;

import android.graphics.Typeface;
import android.text.TextPaint;
import android.text.style.MetricAffectingSpan;

/* JADX INFO: loaded from: classes.dex */
public final class b extends MetricAffectingSpan {

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final Object f8390b;

    public /* synthetic */ b(Object obj, int i6) {
        this.f8389a = i6;
        this.f8390b = obj;
    }

    @Override // android.text.style.CharacterStyle
    public final void updateDrawState(TextPaint textPaint) {
        switch (this.f8389a) {
            case 0:
                textPaint.setFontFeatureSettings((String) this.f8390b);
                break;
            default:
                textPaint.setTypeface((Typeface) this.f8390b);
                break;
        }
    }

    @Override // android.text.style.MetricAffectingSpan
    public final void updateMeasureState(TextPaint textPaint) {
        switch (this.f8389a) {
            case 0:
                textPaint.setFontFeatureSettings((String) this.f8390b);
                break;
            default:
                textPaint.setTypeface((Typeface) this.f8390b);
                break;
        }
    }
}
