Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79e3e5f5 authored by Gilles Debunne's avatar Gilles Debunne Committed by Android (Google) Code Review
Browse files

Merge "Removed SoftInputShownOnFocus methods in TextView"

parents 12df3cf1 e62beb5c
Loading
Loading
Loading
Loading
+3 −28
Original line number Diff line number Diff line
@@ -362,8 +362,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener

    private SpellChecker mSpellChecker;

    private boolean mSoftInputShownOnFocus = true;

    // The alignment to pass to Layout, or null if not resolved.
    private Layout.Alignment mLayoutAlignment;

@@ -2380,29 +2378,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
        return mLinksClickable;
    }

    /**
     * Sets whether the soft input method will be made visible when this
     * TextView gets focused. The default is true.
     *
     * @attr ref android.R.styleable#TextView_softInputShownOnFocus
     * @hide
     */
    @android.view.RemotableViewMethod
    public final void setSoftInputShownOnFocus(boolean show) {
        mSoftInputShownOnFocus = show;
    }

    /**
     * Returns whether the soft input method will be made visible when this
     * TextView gets focused. The default is true.
     *
     * @attr ref android.R.styleable#TextView_softInputShownOnFocus
     * @hide
     */
    public final boolean getSoftInputShownOnFocus() {
        return mSoftInputShownOnFocus;
    }

    /**
     * Returns the list of URLSpans attached to the text
     * (by {@link Linkify} or otherwise) if any.  You can call
@@ -5521,7 +5496,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                                && mLayout != null && onCheckIsTextEditor()) {
                            InputMethodManager imm = InputMethodManager.peekInstance();
                            viewClicked(imm);
                            if (imm != null && mSoftInputShownOnFocus) {
                            if (imm != null) {
                                imm.showSoftInput(this, 0);
                            }
                        }
@@ -8377,7 +8352,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                // Show the IME, except when selecting in read-only text.
                final InputMethodManager imm = InputMethodManager.peekInstance();
                viewClicked(imm);
                if (!mTextIsSelectable && mSoftInputShownOnFocus) {
                if (!mTextIsSelectable) {
                    handled |= imm != null && imm.showSoftInput(this, 0);
                }

@@ -10172,7 +10147,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
        }

        final boolean selectionStarted = mSelectionActionMode != null || willExtract;
        if (selectionStarted && !mTextIsSelectable && mSoftInputShownOnFocus) {
        if (selectionStarted && !mTextIsSelectable) {
            // Show the IME to be able to replace text, except when selecting non editable text.
            final InputMethodManager imm = InputMethodManager.peekInstance();
            if (imm != null) {