package k4;

import android.text.Editable;
import androidx.emoji2.text.n;

/* loaded from: classes.dex */
final class b extends Editable.Factory {

    /* renamed from: a, reason: collision with root package name */
    private static final Object f25360a = new Object();

    /* renamed from: b, reason: collision with root package name */
    private static volatile Editable.Factory f25361b;

    /* renamed from: c, reason: collision with root package name */
    private static Class f25362c;

    private b() {
        try {
            f25362c = Class.forName("android.text.DynamicLayout$ChangeWatcher", false, b.class.getClassLoader());
        } catch (Throwable unused) {
        }
    }

    public static Editable.Factory getInstance() {
        if (f25361b == null) {
            synchronized (f25360a) {
                if (f25361b == null) {
                    f25361b = new b();
                }
            }
        }
        return f25361b;
    }

    @Override // android.text.Editable.Factory
    public Editable newEditable(CharSequence charSequence) {
        Class cls = f25362c;
        return cls != null ? n.c(cls, charSequence) : super.newEditable(charSequence);
    }
}
