package o; import android.os.Build; import android.text.PrecomputedText; import android.text.Spannable; import android.text.SpannableString; import androidx.core.text.PrecomputedTextCompat; import java.util.stream.IntStream; /* loaded from: classes.dex */ final class zDK implements Spannable { private boolean b = false; Spannable c; /* JADX INFO: Access modifiers changed from: package-private */ public zDK(Spannable spannable) { this.c = spannable; } /* JADX INFO: Access modifiers changed from: package-private */ public zDK(CharSequence charSequence) { this.c = new SpannableString(charSequence); } private void a() { Spannable spannable = this.c; if (!this.b) { if ((Build.VERSION.SDK_INT < 28 ? new LWm() : new HBt()).a(spannable)) { this.c = new SpannableString(spannable); } } this.b = true; } @Override // android.text.Spannable public final void setSpan(Object obj, int i, int i2, int i3) { a(); this.c.setSpan(obj, i, i2, i3); } @Override // android.text.Spannable public final void removeSpan(Object obj) { a(); this.c.removeSpan(obj); } @Override // android.text.Spanned public final T[] getSpans(int i, int i2, Class cls) { return (T[]) this.c.getSpans(i, i2, cls); } @Override // android.text.Spanned public final int getSpanStart(Object obj) { return this.c.getSpanStart(obj); } @Override // android.text.Spanned public final int getSpanEnd(Object obj) { return this.c.getSpanEnd(obj); } @Override // android.text.Spanned public final int getSpanFlags(Object obj) { return this.c.getSpanFlags(obj); } @Override // android.text.Spanned public final int nextSpanTransition(int i, int i2, Class cls) { return this.c.nextSpanTransition(i, i2, cls); } @Override // java.lang.CharSequence public final int length() { return this.c.length(); } @Override // java.lang.CharSequence public final char charAt(int i) { return this.c.charAt(i); } @Override // java.lang.CharSequence public final CharSequence subSequence(int i, int i2) { return this.c.subSequence(i, i2); } @Override // java.lang.CharSequence public final String toString() { return this.c.toString(); } @Override // java.lang.CharSequence public final IntStream chars() { return IeS.c(this.c); } @Override // java.lang.CharSequence public final IntStream codePoints() { return IeS.e(this.c); } /* loaded from: classes.dex */ static class IeS { static IntStream e(CharSequence charSequence) { return charSequence.codePoints(); } static IntStream c(CharSequence charSequence) { return charSequence.chars(); } } /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes.dex */ public static class LWm { LWm() { } boolean a(CharSequence charSequence) { return charSequence instanceof PrecomputedTextCompat; } } /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes.dex */ public static class HBt extends LWm { HBt() { } @Override // o.zDK.LWm final boolean a(CharSequence charSequence) { return (charSequence instanceof PrecomputedText) || (charSequence instanceof PrecomputedTextCompat); } } }