2021-06-27 20:44:35 +00:00
|
|
|
package defpackage;
|
|
|
|
|
|
|
|
import android.text.TextPaint;
|
|
|
|
import android.text.style.BackgroundColorSpan;
|
|
|
|
import androidx.annotation.ColorInt;
|
2021-11-08 18:25:28 +00:00
|
|
|
import d0.z.d.m;
|
2021-06-27 20:44:35 +00:00
|
|
|
/* 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);
|
|
|
|
}
|
|
|
|
}
|