package defpackage; import android.text.TextPaint; import android.text.style.BackgroundColorSpan; import androidx.annotation.ColorInt; import d0.z.d.m; /* compiled from: SpoilerSpan.kt */ /* renamed from: SpoilerSpan reason: default package */ public final class SpoilerSpan extends BackgroundColorSpan { public int i; public int j; public boolean k; public SpoilerSpan() { super(0); this.i = 0; this.j = 0; this.k = false; } public SpoilerSpan(@ColorInt int i, @ColorInt int i2, boolean z2) { super(i); this.i = i; this.j = i2; this.k = z2; } @Override // android.text.style.BackgroundColorSpan public int getBackgroundColor() { return this.k ? this.j : this.i; } @Override // android.text.style.BackgroundColorSpan, android.text.style.CharacterStyle public void updateDrawState(TextPaint textPaint) { m.checkNotNullParameter(textPaint, "textPaint"); if (this.k) { textPaint.bgColor = this.j; return; } int i = this.i; textPaint.bgColor = i; textPaint.setColor(i); } }