Loading core/java/android/view/ImeInsetsSourceConsumer.java +5 −5 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ public final class ImeInsetsSourceConsumer extends InsetsSourceConsumer { } public void onServedEditorChanged(EditorInfo info) { if (isDummyOrEmptyEditor(info)) { if (isFallbackOrEmptyEditor(info)) { mShowOnNextImeRender = false; } mFocusedEditor = info; Loading Loading @@ -167,15 +167,15 @@ public final class ImeInsetsSourceConsumer extends InsetsSourceConsumer { } } private boolean isDummyOrEmptyEditor(EditorInfo info) { // TODO(b/123044812): Handle dummy input gracefully in IME Insets API private boolean isFallbackOrEmptyEditor(EditorInfo info) { // TODO(b/123044812): Handle fallback input gracefully in IME Insets API return info == null || (info.fieldId <= 0 && info.inputType <= 0); } private boolean isServedEditorRendered() { if (mFocusedEditor == null || mPreRenderedEditor == null || isDummyOrEmptyEditor(mFocusedEditor) || isDummyOrEmptyEditor(mPreRenderedEditor)) { || isFallbackOrEmptyEditor(mFocusedEditor) || isFallbackOrEmptyEditor(mPreRenderedEditor)) { // No view is focused or ready. return false; } Loading core/java/android/view/inputmethod/BaseInputConnection.java +10 −10 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ public class BaseInputConnection implements InputConnection { /** @hide */ protected final InputMethodManager mIMM; final View mTargetView; final boolean mDummyMode; final boolean mFallbackMode; private Object[] mDefaultComposingSpans; Loading @@ -64,14 +64,14 @@ public class BaseInputConnection implements InputConnection { BaseInputConnection(InputMethodManager mgr, boolean fullEditor) { mIMM = mgr; mTargetView = null; mDummyMode = !fullEditor; mFallbackMode = !fullEditor; } public BaseInputConnection(View targetView, boolean fullEditor) { mIMM = (InputMethodManager)targetView.getContext().getSystemService( Context.INPUT_METHOD_SERVICE); mTargetView = targetView; mDummyMode = !fullEditor; mFallbackMode = !fullEditor; } public static final void removeComposingSpans(Spannable text) { Loading Loading @@ -189,7 +189,7 @@ public class BaseInputConnection implements InputConnection { /** * Default implementation replaces any existing composing text with * the given text. In addition, only if dummy mode, a key event is * the given text. In addition, only if fallback mode, a key event is * sent for the new text and the current editable buffer cleared. */ public boolean commitText(CharSequence text, int newCursorPosition) { Loading Loading @@ -445,7 +445,7 @@ public class BaseInputConnection implements InputConnection { /** * The default implementation removes the composing state from the * current editable text. In addition, only if dummy mode, a key event is * current editable text. In addition, only if fallback mode, a key event is * sent for the new text and the current editable buffer cleared. */ public boolean finishComposingText() { Loading @@ -454,7 +454,7 @@ public class BaseInputConnection implements InputConnection { if (content != null) { beginBatchEdit(); removeComposingSpans(content); // Note: sendCurrentText does nothing unless mDummyMode is set // Note: sendCurrentText does nothing unless mFallbackMode is set sendCurrentText(); endBatchEdit(); } Loading @@ -464,10 +464,10 @@ public class BaseInputConnection implements InputConnection { /** * The default implementation uses TextUtils.getCapsMode to get the * cursor caps mode for the current selection position in the editable * text, unless in dummy mode in which case 0 is always returned. * text, unless in fallback mode in which case 0 is always returned. */ public int getCursorCapsMode(int reqModes) { if (mDummyMode) return 0; if (mFallbackMode) return 0; final Editable content = getEditable(); if (content == null) return 0; Loading Loading @@ -664,7 +664,7 @@ public class BaseInputConnection implements InputConnection { content.setSpan(COMPOSING, a, b, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE | Spanned.SPAN_COMPOSING); // Note: sendCurrentText does nothing unless mDummyMode is set // Note: sendCurrentText does nothing unless mFallbackMode is set sendCurrentText(); endBatchEdit(); } Loading Loading @@ -715,7 +715,7 @@ public class BaseInputConnection implements InputConnection { } private void sendCurrentText() { if (!mDummyMode) { if (!mFallbackMode) { return; } Loading services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java +1 −1 Original line number Diff line number Diff line Loading @@ -178,7 +178,7 @@ public abstract class InputMethodManagerInternal { }; /** * @return Global instance if exists. Otherwise, a dummy no-op instance. * @return Global instance if exists. Otherwise, a fallback no-op instance. */ @NonNull public static InputMethodManagerInternal get() { Loading services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +1 −2 Original line number Diff line number Diff line Loading @@ -2213,8 +2213,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub * @param client {@link android.os.Binder} proxy that is associated with the singleton instance * of {@link android.view.inputmethod.InputMethodManager} that runs on the client * process * @param inputContext communication channel for the dummy * {@link android.view.inputmethod.InputConnection} * @param inputContext communication channel for the fallback {@link InputConnection} * @param selfReportedDisplayId self-reported display ID to which the client is associated. * Whether the client is still allowed to access to this display * or not needs to be evaluated every time the client interacts Loading services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -1663,7 +1663,7 @@ public final class MultiClientInputMethodManagerService { } if (editorInfo == null) { // So-called dummy InputConnection scenario. For app compatibility, we still // So-called fallback InputConnection scenario. For app compatibility, we still // notify this to the IME. switch (clientInfo.mState) { case InputMethodClientState.READY_TO_SEND_FIRST_BIND_RESULT: Loading Loading
core/java/android/view/ImeInsetsSourceConsumer.java +5 −5 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ public final class ImeInsetsSourceConsumer extends InsetsSourceConsumer { } public void onServedEditorChanged(EditorInfo info) { if (isDummyOrEmptyEditor(info)) { if (isFallbackOrEmptyEditor(info)) { mShowOnNextImeRender = false; } mFocusedEditor = info; Loading Loading @@ -167,15 +167,15 @@ public final class ImeInsetsSourceConsumer extends InsetsSourceConsumer { } } private boolean isDummyOrEmptyEditor(EditorInfo info) { // TODO(b/123044812): Handle dummy input gracefully in IME Insets API private boolean isFallbackOrEmptyEditor(EditorInfo info) { // TODO(b/123044812): Handle fallback input gracefully in IME Insets API return info == null || (info.fieldId <= 0 && info.inputType <= 0); } private boolean isServedEditorRendered() { if (mFocusedEditor == null || mPreRenderedEditor == null || isDummyOrEmptyEditor(mFocusedEditor) || isDummyOrEmptyEditor(mPreRenderedEditor)) { || isFallbackOrEmptyEditor(mFocusedEditor) || isFallbackOrEmptyEditor(mPreRenderedEditor)) { // No view is focused or ready. return false; } Loading
core/java/android/view/inputmethod/BaseInputConnection.java +10 −10 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ public class BaseInputConnection implements InputConnection { /** @hide */ protected final InputMethodManager mIMM; final View mTargetView; final boolean mDummyMode; final boolean mFallbackMode; private Object[] mDefaultComposingSpans; Loading @@ -64,14 +64,14 @@ public class BaseInputConnection implements InputConnection { BaseInputConnection(InputMethodManager mgr, boolean fullEditor) { mIMM = mgr; mTargetView = null; mDummyMode = !fullEditor; mFallbackMode = !fullEditor; } public BaseInputConnection(View targetView, boolean fullEditor) { mIMM = (InputMethodManager)targetView.getContext().getSystemService( Context.INPUT_METHOD_SERVICE); mTargetView = targetView; mDummyMode = !fullEditor; mFallbackMode = !fullEditor; } public static final void removeComposingSpans(Spannable text) { Loading Loading @@ -189,7 +189,7 @@ public class BaseInputConnection implements InputConnection { /** * Default implementation replaces any existing composing text with * the given text. In addition, only if dummy mode, a key event is * the given text. In addition, only if fallback mode, a key event is * sent for the new text and the current editable buffer cleared. */ public boolean commitText(CharSequence text, int newCursorPosition) { Loading Loading @@ -445,7 +445,7 @@ public class BaseInputConnection implements InputConnection { /** * The default implementation removes the composing state from the * current editable text. In addition, only if dummy mode, a key event is * current editable text. In addition, only if fallback mode, a key event is * sent for the new text and the current editable buffer cleared. */ public boolean finishComposingText() { Loading @@ -454,7 +454,7 @@ public class BaseInputConnection implements InputConnection { if (content != null) { beginBatchEdit(); removeComposingSpans(content); // Note: sendCurrentText does nothing unless mDummyMode is set // Note: sendCurrentText does nothing unless mFallbackMode is set sendCurrentText(); endBatchEdit(); } Loading @@ -464,10 +464,10 @@ public class BaseInputConnection implements InputConnection { /** * The default implementation uses TextUtils.getCapsMode to get the * cursor caps mode for the current selection position in the editable * text, unless in dummy mode in which case 0 is always returned. * text, unless in fallback mode in which case 0 is always returned. */ public int getCursorCapsMode(int reqModes) { if (mDummyMode) return 0; if (mFallbackMode) return 0; final Editable content = getEditable(); if (content == null) return 0; Loading Loading @@ -664,7 +664,7 @@ public class BaseInputConnection implements InputConnection { content.setSpan(COMPOSING, a, b, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE | Spanned.SPAN_COMPOSING); // Note: sendCurrentText does nothing unless mDummyMode is set // Note: sendCurrentText does nothing unless mFallbackMode is set sendCurrentText(); endBatchEdit(); } Loading Loading @@ -715,7 +715,7 @@ public class BaseInputConnection implements InputConnection { } private void sendCurrentText() { if (!mDummyMode) { if (!mFallbackMode) { return; } Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java +1 −1 Original line number Diff line number Diff line Loading @@ -178,7 +178,7 @@ public abstract class InputMethodManagerInternal { }; /** * @return Global instance if exists. Otherwise, a dummy no-op instance. * @return Global instance if exists. Otherwise, a fallback no-op instance. */ @NonNull public static InputMethodManagerInternal get() { Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +1 −2 Original line number Diff line number Diff line Loading @@ -2213,8 +2213,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub * @param client {@link android.os.Binder} proxy that is associated with the singleton instance * of {@link android.view.inputmethod.InputMethodManager} that runs on the client * process * @param inputContext communication channel for the dummy * {@link android.view.inputmethod.InputConnection} * @param inputContext communication channel for the fallback {@link InputConnection} * @param selfReportedDisplayId self-reported display ID to which the client is associated. * Whether the client is still allowed to access to this display * or not needs to be evaluated every time the client interacts Loading
services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -1663,7 +1663,7 @@ public final class MultiClientInputMethodManagerService { } if (editorInfo == null) { // So-called dummy InputConnection scenario. For app compatibility, we still // So-called fallback InputConnection scenario. For app compatibility, we still // notify this to the IME. switch (clientInfo.mState) { case InputMethodClientState.READY_TO_SEND_FIRST_BIND_RESULT: Loading