package o0;

import android.view.inputmethod.ExtractedText;

/* loaded from: classes.dex */
public abstract class u1 {
    /* JADX INFO: Access modifiers changed from: private */
    public static final ExtractedText b(w2.q0 q0Var) {
        boolean T;
        ExtractedText extractedText = new ExtractedText();
        extractedText.text = q0Var.h();
        extractedText.startOffset = 0;
        extractedText.partialEndOffset = q0Var.h().length();
        extractedText.partialStartOffset = -1;
        extractedText.selectionStart = q2.m0.l(q0Var.g());
        extractedText.selectionEnd = q2.m0.k(q0Var.g());
        T = kotlin.text.z.T(q0Var.h(), '\n', false, 2, null);
        extractedText.flags = !T ? 1 : 0;
        return extractedText;
    }
}
