Loading core/java/android/inputmethodservice/ExtractEditText.java +14 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.inputmethodservice; import android.content.Context; import android.util.AttributeSet; import android.view.inputmethod.ExtractedText; import android.view.inputmethod.InputMethodManager; import android.widget.EditText; /*** Loading Loading @@ -142,4 +143,17 @@ public class ExtractEditText extends EditText { @Override public boolean hasFocus() { return this.isEnabled(); } /** * @hide */ @Override protected void viewClicked(InputMethodManager imm) { // As an instance of this class is supposed to be owned by IMS, // and it has a reference to the IMS (the current IME), // we just need to call back its onViewClicked() here. // It should be good to avoid unnecessary IPCs by doing this as well. if (mIME != null) { mIME.onViewClicked(false); } } } core/java/android/widget/TextView.java +11 −4 Original line number Diff line number Diff line Loading @@ -5432,8 +5432,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (mMovement != null && mText instanceof Editable && mLayout != null && onCheckIsTextEditor()) { InputMethodManager imm = InputMethodManager.peekInstance(); viewClicked(imm); if (imm != null) { imm.viewClicked(this); imm.showSoftInput(this, 0); } } Loading Loading @@ -8346,9 +8346,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (touchIsFinished && (isTextEditable() || mTextIsSelectable)) { // Show the IME, except when selecting in read-only text. final InputMethodManager imm = InputMethodManager.peekInstance(); if (imm != null) { imm.viewClicked(this); } viewClicked(imm); if (!mTextIsSelectable) { handled |= imm != null && imm.showSoftInput(this, 0); } Loading Loading @@ -11310,6 +11308,15 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener mResolvedDrawables = false; } /** * @hide */ protected void viewClicked(InputMethodManager imm) { if (imm != null) { imm.viewClicked(this); } } @ViewDebug.ExportedProperty(category = "text") private CharSequence mText; private CharSequence mTransformed; Loading Loading
core/java/android/inputmethodservice/ExtractEditText.java +14 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.inputmethodservice; import android.content.Context; import android.util.AttributeSet; import android.view.inputmethod.ExtractedText; import android.view.inputmethod.InputMethodManager; import android.widget.EditText; /*** Loading Loading @@ -142,4 +143,17 @@ public class ExtractEditText extends EditText { @Override public boolean hasFocus() { return this.isEnabled(); } /** * @hide */ @Override protected void viewClicked(InputMethodManager imm) { // As an instance of this class is supposed to be owned by IMS, // and it has a reference to the IMS (the current IME), // we just need to call back its onViewClicked() here. // It should be good to avoid unnecessary IPCs by doing this as well. if (mIME != null) { mIME.onViewClicked(false); } } }
core/java/android/widget/TextView.java +11 −4 Original line number Diff line number Diff line Loading @@ -5432,8 +5432,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (mMovement != null && mText instanceof Editable && mLayout != null && onCheckIsTextEditor()) { InputMethodManager imm = InputMethodManager.peekInstance(); viewClicked(imm); if (imm != null) { imm.viewClicked(this); imm.showSoftInput(this, 0); } } Loading Loading @@ -8346,9 +8346,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (touchIsFinished && (isTextEditable() || mTextIsSelectable)) { // Show the IME, except when selecting in read-only text. final InputMethodManager imm = InputMethodManager.peekInstance(); if (imm != null) { imm.viewClicked(this); } viewClicked(imm); if (!mTextIsSelectable) { handled |= imm != null && imm.showSoftInput(this, 0); } Loading Loading @@ -11310,6 +11308,15 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener mResolvedDrawables = false; } /** * @hide */ protected void viewClicked(InputMethodManager imm) { if (imm != null) { imm.viewClicked(this); } } @ViewDebug.ExportedProperty(category = "text") private CharSequence mText; private CharSequence mTransformed; Loading