package androidx.emoji2.text;

import android.graphics.Canvas;
import android.graphics.Paint;
import android.text.TextPaint;

/* renamed from: androidx.emoji2.text.r */
/* loaded from: classes.dex */
public final class C0259r extends AbstractC0246l {

    /* renamed from: i */
    public static Paint f1148i;

    public C0259r(C0241i c0241i) {
        super(c0241i);
    }

    /* renamed from: c */
    public static Paint m4299c() {
        if (f1148i == null) {
            TextPaint textPaint = new TextPaint();
            f1148i = textPaint;
            textPaint.setColor(C0229g.m4403b().m4402c());
            f1148i.setStyle(Paint.Style.FILL);
        }
        return f1148i;
    }

    @Override // android.text.style.ReplacementSpan
    public void draw(Canvas canvas, CharSequence charSequence, int i, int i2, float f, int i3, int i4, int i5, Paint paint) {
        if (C0229g.m4403b().m4396i()) {
            canvas.drawRect(f, i3, f + m4341b(), i5, m4299c());
        }
        m4342a().m4372a(canvas, f, i4, paint);
    }
}