Loading core/java/com/android/internal/view/InputBindResult.java +10 −0 Original line number Original line Diff line number Diff line Loading @@ -139,6 +139,10 @@ public final class InputBindResult implements Parcelable { * @see com.android.server.wm.WindowManagerService#inputMethodClientHasFocus(IInputMethodClient) * @see com.android.server.wm.WindowManagerService#inputMethodClientHasFocus(IInputMethodClient) */ */ int ERROR_NOT_IME_TARGET_WINDOW = 11; int ERROR_NOT_IME_TARGET_WINDOW = 11; /** * Indicates that focused view in the current window is not an editor. */ int ERROR_NO_EDITOR = 12; } } @ResultCode @ResultCode Loading Loading @@ -258,6 +262,8 @@ public final class InputBindResult implements Parcelable { return "ERROR_NULL"; return "ERROR_NULL"; case ResultCode.ERROR_NO_IME: case ResultCode.ERROR_NO_IME: return "ERROR_NO_IME"; return "ERROR_NO_IME"; case ResultCode.ERROR_NO_EDITOR: return "ERROR_NO_EDITOR"; case ResultCode.ERROR_INVALID_PACKAGE_NAME: case ResultCode.ERROR_INVALID_PACKAGE_NAME: return "ERROR_INVALID_PACKAGE_NAME"; return "ERROR_INVALID_PACKAGE_NAME"; case ResultCode.ERROR_SYSTEM_NOT_READY: case ResultCode.ERROR_SYSTEM_NOT_READY: Loading Loading @@ -287,6 +293,10 @@ public final class InputBindResult implements Parcelable { * Predefined error object for {@link ResultCode#NO_IME}. * Predefined error object for {@link ResultCode#NO_IME}. */ */ public static final InputBindResult NO_IME = error(ResultCode.ERROR_NO_IME); public static final InputBindResult NO_IME = error(ResultCode.ERROR_NO_IME); /** * Predefined error object for {@link ResultCode#NO_EDITOR}. */ public static final InputBindResult NO_EDITOR = error(ResultCode.ERROR_NO_EDITOR); /** /** * Predefined error object for {@link ResultCode#ERROR_INVALID_PACKAGE_NAME}. * Predefined error object for {@link ResultCode#ERROR_INVALID_PACKAGE_NAME}. */ */ Loading services/core/java/com/android/server/InputMethodManagerService.java +13 −6 Original line number Original line Diff line number Diff line Loading @@ -2970,12 +2970,19 @@ public class InputMethodManagerService extends IInputMethodManager.Stub break; break; } } if (!didStart && attribute != null) { if (!didStart) { if (attribute != null) { if (!DebugFlags.FLAG_OPTIMIZE_START_INPUT.value() if (!DebugFlags.FLAG_OPTIMIZE_START_INPUT.value() || (controlFlags || (controlFlags & InputMethodManager.CONTROL_WINDOW_IS_TEXT_EDITOR) != 0) { & InputMethodManager.CONTROL_WINDOW_IS_TEXT_EDITOR) != 0) { res = startInputUncheckedLocked(cs, inputContext, missingMethods, attribute, res = startInputUncheckedLocked(cs, inputContext, missingMethods, attribute, controlFlags, startInputReason); controlFlags, startInputReason); } else { res = InputBindResult.NO_EDITOR; } } else { res = InputBindResult.NULL_EDITOR_INFO; } } } } } } Loading Loading
core/java/com/android/internal/view/InputBindResult.java +10 −0 Original line number Original line Diff line number Diff line Loading @@ -139,6 +139,10 @@ public final class InputBindResult implements Parcelable { * @see com.android.server.wm.WindowManagerService#inputMethodClientHasFocus(IInputMethodClient) * @see com.android.server.wm.WindowManagerService#inputMethodClientHasFocus(IInputMethodClient) */ */ int ERROR_NOT_IME_TARGET_WINDOW = 11; int ERROR_NOT_IME_TARGET_WINDOW = 11; /** * Indicates that focused view in the current window is not an editor. */ int ERROR_NO_EDITOR = 12; } } @ResultCode @ResultCode Loading Loading @@ -258,6 +262,8 @@ public final class InputBindResult implements Parcelable { return "ERROR_NULL"; return "ERROR_NULL"; case ResultCode.ERROR_NO_IME: case ResultCode.ERROR_NO_IME: return "ERROR_NO_IME"; return "ERROR_NO_IME"; case ResultCode.ERROR_NO_EDITOR: return "ERROR_NO_EDITOR"; case ResultCode.ERROR_INVALID_PACKAGE_NAME: case ResultCode.ERROR_INVALID_PACKAGE_NAME: return "ERROR_INVALID_PACKAGE_NAME"; return "ERROR_INVALID_PACKAGE_NAME"; case ResultCode.ERROR_SYSTEM_NOT_READY: case ResultCode.ERROR_SYSTEM_NOT_READY: Loading Loading @@ -287,6 +293,10 @@ public final class InputBindResult implements Parcelable { * Predefined error object for {@link ResultCode#NO_IME}. * Predefined error object for {@link ResultCode#NO_IME}. */ */ public static final InputBindResult NO_IME = error(ResultCode.ERROR_NO_IME); public static final InputBindResult NO_IME = error(ResultCode.ERROR_NO_IME); /** * Predefined error object for {@link ResultCode#NO_EDITOR}. */ public static final InputBindResult NO_EDITOR = error(ResultCode.ERROR_NO_EDITOR); /** /** * Predefined error object for {@link ResultCode#ERROR_INVALID_PACKAGE_NAME}. * Predefined error object for {@link ResultCode#ERROR_INVALID_PACKAGE_NAME}. */ */ Loading
services/core/java/com/android/server/InputMethodManagerService.java +13 −6 Original line number Original line Diff line number Diff line Loading @@ -2970,12 +2970,19 @@ public class InputMethodManagerService extends IInputMethodManager.Stub break; break; } } if (!didStart && attribute != null) { if (!didStart) { if (attribute != null) { if (!DebugFlags.FLAG_OPTIMIZE_START_INPUT.value() if (!DebugFlags.FLAG_OPTIMIZE_START_INPUT.value() || (controlFlags || (controlFlags & InputMethodManager.CONTROL_WINDOW_IS_TEXT_EDITOR) != 0) { & InputMethodManager.CONTROL_WINDOW_IS_TEXT_EDITOR) != 0) { res = startInputUncheckedLocked(cs, inputContext, missingMethods, attribute, res = startInputUncheckedLocked(cs, inputContext, missingMethods, attribute, controlFlags, startInputReason); controlFlags, startInputReason); } else { res = InputBindResult.NO_EDITOR; } } else { res = InputBindResult.NULL_EDITOR_INFO; } } } } } } Loading