Rabbit-R1/original r1/java/sources/androidx/media3/common/text/SpanUtil.java
2024-05-21 17:08:36 -04:00

18 lines
580 B
Java

package androidx.media3.common.text;
import android.text.Spannable;
/* loaded from: classes2.dex */
public final class SpanUtil {
public static void addOrReplaceSpan(Spannable spannable, Object obj, int i, int i2, int i3) {
for (Object obj2 : spannable.getSpans(i, i2, obj.getClass())) {
if (spannable.getSpanStart(obj2) == i && spannable.getSpanEnd(obj2) == i2 && spannable.getSpanFlags(obj2) == i3) {
spannable.removeSpan(obj2);
}
}
spannable.setSpan(obj, i, i2, i3);
}
private SpanUtil() {
}
}