diff options
5 files changed, 18 insertions, 19 deletions
diff --git a/core/java/android/view/ImeInsetsSourceConsumer.java b/core/java/android/view/ImeInsetsSourceConsumer.java index 83abf1a33b2d..749e93972602 100644 --- a/core/java/android/view/ImeInsetsSourceConsumer.java +++ b/core/java/android/view/ImeInsetsSourceConsumer.java @@ -61,7 +61,7 @@ public final class ImeInsetsSourceConsumer extends InsetsSourceConsumer { } public void onServedEditorChanged(EditorInfo info) { - if (isDummyOrEmptyEditor(info)) { + if (isFallbackOrEmptyEditor(info)) { mShowOnNextImeRender = false; } mFocusedEditor = info; @@ -112,15 +112,15 @@ public final class ImeInsetsSourceConsumer extends InsetsSourceConsumer { getImm().notifyImeHidden(); } - 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; } diff --git a/core/java/android/view/inputmethod/BaseInputConnection.java b/core/java/android/view/inputmethod/BaseInputConnection.java index 090e19f91e38..a211a1a3d197 100644 --- a/core/java/android/view/inputmethod/BaseInputConnection.java +++ b/core/java/android/view/inputmethod/BaseInputConnection.java @@ -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; @@ -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) { @@ -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) { @@ -428,7 +428,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() { @@ -437,7 +437,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(); } @@ -447,10 +447,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; @@ -647,7 +647,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(); } @@ -698,7 +698,7 @@ public class BaseInputConnection implements InputConnection { } private void sendCurrentText() { - if (!mDummyMode) { + if (!mFallbackMode) { return; } diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java index 944a95dda99b..75f51d82a8d6 100644 --- a/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java +++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java @@ -81,7 +81,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() { diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java index 69cbc22f41bf..70a3054d8ec3 100644 --- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java @@ -1869,8 +1869,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 diff --git a/services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java index 3dd730471dca..956de656ab65 100644 --- a/services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java +++ b/services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java @@ -1590,7 +1590,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: |