Loading api/current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -9397,6 +9397,7 @@ package android.inputmethodservice { method public void onUpdateExtractingViews(android.view.inputmethod.EditorInfo); method public void onUpdateExtractingVisibility(android.view.inputmethod.EditorInfo); method public void onUpdateSelection(int, int, int, int, int, int); method public void onViewClicked(boolean); method public void onWindowHidden(); method public void onWindowShown(); method public void requestHideSelf(int); Loading Loading @@ -9440,6 +9441,7 @@ package android.inputmethodservice { method public void updateCursor(android.graphics.Rect); method public void updateExtractedText(int, android.view.inputmethod.ExtractedText); method public void updateSelection(int, int, int, int, int, int); method public void viewClicked(boolean); } public static final class InputMethodService.Insets { Loading Loading @@ -23511,6 +23513,7 @@ package android.view.inputmethod { method public void updateCursor(android.view.View, int, int, int, int); method public void updateExtractedText(android.view.View, int, android.view.inputmethod.ExtractedText); method public void updateSelection(android.view.View, int, int, int, int); method public void viewClicked(android.view.View); field public static final int HIDE_IMPLICIT_ONLY = 1; // 0x1 field public static final int HIDE_NOT_ALWAYS = 2; // 0x2 field public static final int RESULT_HIDDEN = 3; // 0x3 Loading @@ -23531,6 +23534,7 @@ package android.view.inputmethod { method public abstract void updateCursor(android.graphics.Rect); method public abstract void updateExtractedText(int, android.view.inputmethod.ExtractedText); method public abstract void updateSelection(int, int, int, int, int, int); method public abstract void viewClicked(boolean); } public static abstract interface InputMethodSession.EventCallback { core/java/android/inputmethodservice/IInputMethodSessionWrapper.java +10 −1 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ class IInputMethodSessionWrapper extends IInputMethodSession.Stub private static final int DO_APP_PRIVATE_COMMAND = 100; private static final int DO_TOGGLE_SOFT_INPUT = 105; private static final int DO_FINISH_SESSION = 110; private static final int DO_VIEW_CLICKED = 115; HandlerCaller mCaller; InputMethodSession mInputMethodSession; Loading Loading @@ -133,6 +134,10 @@ class IInputMethodSessionWrapper extends IInputMethodSession.Stub mInputMethodSession = null; return; } case DO_VIEW_CLICKED: { mInputMethodSession.viewClicked(msg.arg1 == 1); return; } } Log.w(TAG, "Unhandled message code: " + msg.what); } Loading Loading @@ -168,6 +173,10 @@ class IInputMethodSessionWrapper extends IInputMethodSession.Stub candidatesStart, candidatesEnd)); } public void viewClicked(boolean focusChanged) { mCaller.executeOrSendMessage(mCaller.obtainMessageI(DO_VIEW_CLICKED, focusChanged ? 1 : 0)); } public void updateCursor(Rect newCursor) { mCaller.executeOrSendMessage(mCaller.obtainMessageO(DO_UPDATE_CURSOR, newCursor)); Loading core/java/android/inputmethodservice/InputMethodService.java +19 −1 Original line number Diff line number Diff line Loading @@ -489,6 +489,14 @@ public class InputMethodService extends AbstractInputMethodService { newSelStart, newSelEnd, candidatesStart, candidatesEnd); } @Override public void viewClicked(boolean focusChanged) { if (!isEnabled()) { return; } InputMethodService.this.onViewClicked(focusChanged); } /** * Call {@link InputMethodService#onUpdateCursor * InputMethodService.onUpdateCursor()}. Loading Loading @@ -1608,6 +1616,16 @@ public class InputMethodService extends AbstractInputMethodService { } } /** * Called when the user tapped or clicked a text view. * IMEs can't rely on this method being called because this was not part of the original IME * protocol, so applications with custom text editing written before this method appeared will * not call to inform the IME of this interaction. * @param focusChanged true if the user changed the focused view by this click. */ public void onViewClicked(boolean focusChanged) { } /** * Called when the application has reported a new location of its text * cursor. This is only called if explicitly requested by the input method. Loading core/java/android/view/inputmethod/InputMethodManager.java +22 −1 Original line number Diff line number Diff line Loading @@ -1241,6 +1241,27 @@ public final class InputMethodManager { } } /** * Notify the event when the user tapped or clicked the text view. */ public void viewClicked(View view) { final boolean focusChanged = mServedView != mNextServedView; checkFocus(); synchronized (mH) { if ((mServedView != view && (mServedView == null || !mServedView.checkInputConnectionProxy(view))) || mCurrentTextBoxAttribute == null || mCurMethod == null) { return; } try { if (DEBUG) Log.v(TAG, "onViewClicked: " + focusChanged); mCurMethod.viewClicked(focusChanged); } catch (RemoteException e) { Log.w(TAG, "IME died: " + mCurId, e); } } } /** * Returns true if the current input method wants to watch the location * of the input editor's cursor in its window. Loading core/java/android/view/inputmethod/InputMethodSession.java +9 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,15 @@ public interface InputMethodSession { int newSelStart, int newSelEnd, int candidatesStart, int candidatesEnd); /** * This method is called when the user tapped a text view. * IMEs can't rely on this method being called because this was not part of the original IME * protocol, so applications with custom text editing written before this method appeared will * not call to inform the IME of this interaction. * @param focusChanged true if the user changed the focused view by this click. */ public void viewClicked(boolean focusChanged); /** * This method is called when cursor location of the target input field * has changed within its window. This is not normally called, but will Loading Loading
api/current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -9397,6 +9397,7 @@ package android.inputmethodservice { method public void onUpdateExtractingViews(android.view.inputmethod.EditorInfo); method public void onUpdateExtractingVisibility(android.view.inputmethod.EditorInfo); method public void onUpdateSelection(int, int, int, int, int, int); method public void onViewClicked(boolean); method public void onWindowHidden(); method public void onWindowShown(); method public void requestHideSelf(int); Loading Loading @@ -9440,6 +9441,7 @@ package android.inputmethodservice { method public void updateCursor(android.graphics.Rect); method public void updateExtractedText(int, android.view.inputmethod.ExtractedText); method public void updateSelection(int, int, int, int, int, int); method public void viewClicked(boolean); } public static final class InputMethodService.Insets { Loading Loading @@ -23511,6 +23513,7 @@ package android.view.inputmethod { method public void updateCursor(android.view.View, int, int, int, int); method public void updateExtractedText(android.view.View, int, android.view.inputmethod.ExtractedText); method public void updateSelection(android.view.View, int, int, int, int); method public void viewClicked(android.view.View); field public static final int HIDE_IMPLICIT_ONLY = 1; // 0x1 field public static final int HIDE_NOT_ALWAYS = 2; // 0x2 field public static final int RESULT_HIDDEN = 3; // 0x3 Loading @@ -23531,6 +23534,7 @@ package android.view.inputmethod { method public abstract void updateCursor(android.graphics.Rect); method public abstract void updateExtractedText(int, android.view.inputmethod.ExtractedText); method public abstract void updateSelection(int, int, int, int, int, int); method public abstract void viewClicked(boolean); } public static abstract interface InputMethodSession.EventCallback {
core/java/android/inputmethodservice/IInputMethodSessionWrapper.java +10 −1 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ class IInputMethodSessionWrapper extends IInputMethodSession.Stub private static final int DO_APP_PRIVATE_COMMAND = 100; private static final int DO_TOGGLE_SOFT_INPUT = 105; private static final int DO_FINISH_SESSION = 110; private static final int DO_VIEW_CLICKED = 115; HandlerCaller mCaller; InputMethodSession mInputMethodSession; Loading Loading @@ -133,6 +134,10 @@ class IInputMethodSessionWrapper extends IInputMethodSession.Stub mInputMethodSession = null; return; } case DO_VIEW_CLICKED: { mInputMethodSession.viewClicked(msg.arg1 == 1); return; } } Log.w(TAG, "Unhandled message code: " + msg.what); } Loading Loading @@ -168,6 +173,10 @@ class IInputMethodSessionWrapper extends IInputMethodSession.Stub candidatesStart, candidatesEnd)); } public void viewClicked(boolean focusChanged) { mCaller.executeOrSendMessage(mCaller.obtainMessageI(DO_VIEW_CLICKED, focusChanged ? 1 : 0)); } public void updateCursor(Rect newCursor) { mCaller.executeOrSendMessage(mCaller.obtainMessageO(DO_UPDATE_CURSOR, newCursor)); Loading
core/java/android/inputmethodservice/InputMethodService.java +19 −1 Original line number Diff line number Diff line Loading @@ -489,6 +489,14 @@ public class InputMethodService extends AbstractInputMethodService { newSelStart, newSelEnd, candidatesStart, candidatesEnd); } @Override public void viewClicked(boolean focusChanged) { if (!isEnabled()) { return; } InputMethodService.this.onViewClicked(focusChanged); } /** * Call {@link InputMethodService#onUpdateCursor * InputMethodService.onUpdateCursor()}. Loading Loading @@ -1608,6 +1616,16 @@ public class InputMethodService extends AbstractInputMethodService { } } /** * Called when the user tapped or clicked a text view. * IMEs can't rely on this method being called because this was not part of the original IME * protocol, so applications with custom text editing written before this method appeared will * not call to inform the IME of this interaction. * @param focusChanged true if the user changed the focused view by this click. */ public void onViewClicked(boolean focusChanged) { } /** * Called when the application has reported a new location of its text * cursor. This is only called if explicitly requested by the input method. Loading
core/java/android/view/inputmethod/InputMethodManager.java +22 −1 Original line number Diff line number Diff line Loading @@ -1241,6 +1241,27 @@ public final class InputMethodManager { } } /** * Notify the event when the user tapped or clicked the text view. */ public void viewClicked(View view) { final boolean focusChanged = mServedView != mNextServedView; checkFocus(); synchronized (mH) { if ((mServedView != view && (mServedView == null || !mServedView.checkInputConnectionProxy(view))) || mCurrentTextBoxAttribute == null || mCurMethod == null) { return; } try { if (DEBUG) Log.v(TAG, "onViewClicked: " + focusChanged); mCurMethod.viewClicked(focusChanged); } catch (RemoteException e) { Log.w(TAG, "IME died: " + mCurId, e); } } } /** * Returns true if the current input method wants to watch the location * of the input editor's cursor in its window. Loading
core/java/android/view/inputmethod/InputMethodSession.java +9 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,15 @@ public interface InputMethodSession { int newSelStart, int newSelEnd, int candidatesStart, int candidatesEnd); /** * This method is called when the user tapped a text view. * IMEs can't rely on this method being called because this was not part of the original IME * protocol, so applications with custom text editing written before this method appeared will * not call to inform the IME of this interaction. * @param focusChanged true if the user changed the focused view by this click. */ public void viewClicked(boolean focusChanged); /** * This method is called when cursor location of the target input field * has changed within its window. This is not normally called, but will Loading