Loading core/java/com/android/internal/inputmethod/InputMethodDebug.java +2 −0 Original line number Original line Diff line number Diff line Loading @@ -236,6 +236,8 @@ public final class InputMethodDebug { return "HIDE_TOGGLE_SOFT_INPUT"; return "HIDE_TOGGLE_SOFT_INPUT"; case SoftInputShowHideReason.SHOW_SOFT_INPUT_BY_INSETS_API: case SoftInputShowHideReason.SHOW_SOFT_INPUT_BY_INSETS_API: return "SHOW_SOFT_INPUT_BY_INSETS_API"; return "SHOW_SOFT_INPUT_BY_INSETS_API"; case SoftInputShowHideReason.HIDE_DISPLAY_IME_POLICY_HIDE: return "HIDE_DISPLAY_IME_POLICY_HIDE"; default: default: return "Unknown=" + reason; return "Unknown=" + reason; } } Loading core/java/com/android/internal/inputmethod/SoftInputShowHideReason.java +9 −1 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.internal.inputmethod; import static java.lang.annotation.RetentionPolicy.SOURCE; import static java.lang.annotation.RetentionPolicy.SOURCE; import android.annotation.IntDef; import android.annotation.IntDef; import android.view.WindowManager; import android.view.WindowManager.LayoutParams; import android.view.WindowManager.LayoutParams; import java.lang.annotation.Retention; import java.lang.annotation.Retention; Loading Loading @@ -53,7 +54,8 @@ import java.lang.annotation.Retention; SoftInputShowHideReason.SHOW_RESTORE_IME_VISIBILITY, SoftInputShowHideReason.SHOW_RESTORE_IME_VISIBILITY, SoftInputShowHideReason.SHOW_TOGGLE_SOFT_INPUT, SoftInputShowHideReason.SHOW_TOGGLE_SOFT_INPUT, SoftInputShowHideReason.HIDE_TOGGLE_SOFT_INPUT, SoftInputShowHideReason.HIDE_TOGGLE_SOFT_INPUT, SoftInputShowHideReason.SHOW_SOFT_INPUT_BY_INSETS_API}) SoftInputShowHideReason.SHOW_SOFT_INPUT_BY_INSETS_API, SoftInputShowHideReason.HIDE_DISPLAY_IME_POLICY_HIDE}) public @interface SoftInputShowHideReason { public @interface SoftInputShowHideReason { /** Show soft input by {@link android.view.inputmethod.InputMethodManager#showSoftInput}. */ /** Show soft input by {@link android.view.inputmethod.InputMethodManager#showSoftInput}. */ int SHOW_SOFT_INPUT = 0; int SHOW_SOFT_INPUT = 0; Loading Loading @@ -195,4 +197,10 @@ public @interface SoftInputShowHideReason { * {@link android.view.InsetsController#show(int)}; * {@link android.view.InsetsController#show(int)}; */ */ int SHOW_SOFT_INPUT_BY_INSETS_API = 25; int SHOW_SOFT_INPUT_BY_INSETS_API = 25; /** * Hide soft input if Ime policy has been set to {@link WindowManager#DISPLAY_IME_POLICY_HIDE}. * See also {@code InputMethodManagerService#mImeHiddenByDisplayPolicy}. */ int HIDE_DISPLAY_IME_POLICY_HIDE = 26; } } services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +2 −0 Original line number Original line Diff line number Diff line Loading @@ -2356,6 +2356,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub if (displayIdToShowIme == INVALID_DISPLAY) { if (displayIdToShowIme == INVALID_DISPLAY) { mImeHiddenByDisplayPolicy = true; mImeHiddenByDisplayPolicy = true; hideCurrentInputLocked(mCurFocusedWindow, 0, null, SoftInputShowHideReason.HIDE_DISPLAY_IME_POLICY_HIDE); return InputBindResult.NO_IME; return InputBindResult.NO_IME; } } mImeHiddenByDisplayPolicy = false; mImeHiddenByDisplayPolicy = false; Loading Loading
core/java/com/android/internal/inputmethod/InputMethodDebug.java +2 −0 Original line number Original line Diff line number Diff line Loading @@ -236,6 +236,8 @@ public final class InputMethodDebug { return "HIDE_TOGGLE_SOFT_INPUT"; return "HIDE_TOGGLE_SOFT_INPUT"; case SoftInputShowHideReason.SHOW_SOFT_INPUT_BY_INSETS_API: case SoftInputShowHideReason.SHOW_SOFT_INPUT_BY_INSETS_API: return "SHOW_SOFT_INPUT_BY_INSETS_API"; return "SHOW_SOFT_INPUT_BY_INSETS_API"; case SoftInputShowHideReason.HIDE_DISPLAY_IME_POLICY_HIDE: return "HIDE_DISPLAY_IME_POLICY_HIDE"; default: default: return "Unknown=" + reason; return "Unknown=" + reason; } } Loading
core/java/com/android/internal/inputmethod/SoftInputShowHideReason.java +9 −1 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.internal.inputmethod; import static java.lang.annotation.RetentionPolicy.SOURCE; import static java.lang.annotation.RetentionPolicy.SOURCE; import android.annotation.IntDef; import android.annotation.IntDef; import android.view.WindowManager; import android.view.WindowManager.LayoutParams; import android.view.WindowManager.LayoutParams; import java.lang.annotation.Retention; import java.lang.annotation.Retention; Loading Loading @@ -53,7 +54,8 @@ import java.lang.annotation.Retention; SoftInputShowHideReason.SHOW_RESTORE_IME_VISIBILITY, SoftInputShowHideReason.SHOW_RESTORE_IME_VISIBILITY, SoftInputShowHideReason.SHOW_TOGGLE_SOFT_INPUT, SoftInputShowHideReason.SHOW_TOGGLE_SOFT_INPUT, SoftInputShowHideReason.HIDE_TOGGLE_SOFT_INPUT, SoftInputShowHideReason.HIDE_TOGGLE_SOFT_INPUT, SoftInputShowHideReason.SHOW_SOFT_INPUT_BY_INSETS_API}) SoftInputShowHideReason.SHOW_SOFT_INPUT_BY_INSETS_API, SoftInputShowHideReason.HIDE_DISPLAY_IME_POLICY_HIDE}) public @interface SoftInputShowHideReason { public @interface SoftInputShowHideReason { /** Show soft input by {@link android.view.inputmethod.InputMethodManager#showSoftInput}. */ /** Show soft input by {@link android.view.inputmethod.InputMethodManager#showSoftInput}. */ int SHOW_SOFT_INPUT = 0; int SHOW_SOFT_INPUT = 0; Loading Loading @@ -195,4 +197,10 @@ public @interface SoftInputShowHideReason { * {@link android.view.InsetsController#show(int)}; * {@link android.view.InsetsController#show(int)}; */ */ int SHOW_SOFT_INPUT_BY_INSETS_API = 25; int SHOW_SOFT_INPUT_BY_INSETS_API = 25; /** * Hide soft input if Ime policy has been set to {@link WindowManager#DISPLAY_IME_POLICY_HIDE}. * See also {@code InputMethodManagerService#mImeHiddenByDisplayPolicy}. */ int HIDE_DISPLAY_IME_POLICY_HIDE = 26; } }
services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +2 −0 Original line number Original line Diff line number Diff line Loading @@ -2356,6 +2356,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub if (displayIdToShowIme == INVALID_DISPLAY) { if (displayIdToShowIme == INVALID_DISPLAY) { mImeHiddenByDisplayPolicy = true; mImeHiddenByDisplayPolicy = true; hideCurrentInputLocked(mCurFocusedWindow, 0, null, SoftInputShowHideReason.HIDE_DISPLAY_IME_POLICY_HIDE); return InputBindResult.NO_IME; return InputBindResult.NO_IME; } } mImeHiddenByDisplayPolicy = false; mImeHiddenByDisplayPolicy = false; Loading