Loading core/java/android/view/inputmethod/InputMethodManager.java +4 −3 Original line number Diff line number Diff line Loading @@ -3019,9 +3019,10 @@ public final class InputMethodManager { void closeCurrentInput() { final ImeTracker.Token statsToken = ImeTracker.forLogging().onRequestHide( null /* component */, Process.myUid(), ImeTracker.ORIGIN_CLIENT_HIDE_SOFT_INPUT, SoftInputShowHideReason.HIDE_SOFT_INPUT); SoftInputShowHideReason.HIDE_CLOSE_CURRENT_SESSION); ImeTracker.forLatency().onRequestHide(statsToken, ImeTracker.ORIGIN_CLIENT_HIDE_SOFT_INPUT, SoftInputShowHideReason.HIDE_SOFT_INPUT, ActivityThread::currentApplication); SoftInputShowHideReason.HIDE_CLOSE_CURRENT_SESSION, ActivityThread::currentApplication); synchronized (mH) { if (mCurRootView == null || mCurRootView.getView() == null) { Loading @@ -3040,7 +3041,7 @@ public final class InputMethodManager { statsToken, HIDE_NOT_ALWAYS, null, SoftInputShowHideReason.HIDE_SOFT_INPUT); SoftInputShowHideReason.HIDE_CLOSE_CURRENT_SESSION); } } Loading core/java/com/android/internal/inputmethod/InputMethodDebug.java +2 −0 Original line number Diff line number Diff line Loading @@ -261,6 +261,8 @@ public final class InputMethodDebug { return "REMOVE_IME_SCREENSHOT_FROM_IMMS"; case SoftInputShowHideReason.HIDE_WHEN_INPUT_TARGET_INVISIBLE: return "HIDE_WHEN_INPUT_TARGET_INVISIBLE"; case SoftInputShowHideReason.HIDE_CLOSE_CURRENT_SESSION: return "HIDE_SOFT_INPUT_CLOSE_CURRENT_SESSION"; default: return "Unknown=" + reason; } Loading core/java/com/android/internal/inputmethod/SoftInputShowHideReason.java +6 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ import java.lang.annotation.Retention; SoftInputShowHideReason.SHOW_IME_SCREENSHOT_FROM_IMMS, SoftInputShowHideReason.REMOVE_IME_SCREENSHOT_FROM_IMMS, SoftInputShowHideReason.HIDE_WHEN_INPUT_TARGET_INVISIBLE, SoftInputShowHideReason.HIDE_CLOSE_CURRENT_SESSION, }) public @interface SoftInputShowHideReason { /** Show soft input by {@link android.view.inputmethod.InputMethodManager#showSoftInput}. */ Loading Loading @@ -278,4 +279,9 @@ public @interface SoftInputShowHideReason { * focusable overlay window. */ int HIDE_WHEN_INPUT_TARGET_INVISIBLE = ImeProtoEnums.REASON_HIDE_WHEN_INPUT_TARGET_INVISIBLE; /** * Hide soft input when {@link InputMethodManager#closeCurrentInput()} gets called. */ int HIDE_CLOSE_CURRENT_SESSION = ImeProtoEnums.REASON_HIDE_CLOSE_CURRENT_SESSION; } Loading
core/java/android/view/inputmethod/InputMethodManager.java +4 −3 Original line number Diff line number Diff line Loading @@ -3019,9 +3019,10 @@ public final class InputMethodManager { void closeCurrentInput() { final ImeTracker.Token statsToken = ImeTracker.forLogging().onRequestHide( null /* component */, Process.myUid(), ImeTracker.ORIGIN_CLIENT_HIDE_SOFT_INPUT, SoftInputShowHideReason.HIDE_SOFT_INPUT); SoftInputShowHideReason.HIDE_CLOSE_CURRENT_SESSION); ImeTracker.forLatency().onRequestHide(statsToken, ImeTracker.ORIGIN_CLIENT_HIDE_SOFT_INPUT, SoftInputShowHideReason.HIDE_SOFT_INPUT, ActivityThread::currentApplication); SoftInputShowHideReason.HIDE_CLOSE_CURRENT_SESSION, ActivityThread::currentApplication); synchronized (mH) { if (mCurRootView == null || mCurRootView.getView() == null) { Loading @@ -3040,7 +3041,7 @@ public final class InputMethodManager { statsToken, HIDE_NOT_ALWAYS, null, SoftInputShowHideReason.HIDE_SOFT_INPUT); SoftInputShowHideReason.HIDE_CLOSE_CURRENT_SESSION); } } Loading
core/java/com/android/internal/inputmethod/InputMethodDebug.java +2 −0 Original line number Diff line number Diff line Loading @@ -261,6 +261,8 @@ public final class InputMethodDebug { return "REMOVE_IME_SCREENSHOT_FROM_IMMS"; case SoftInputShowHideReason.HIDE_WHEN_INPUT_TARGET_INVISIBLE: return "HIDE_WHEN_INPUT_TARGET_INVISIBLE"; case SoftInputShowHideReason.HIDE_CLOSE_CURRENT_SESSION: return "HIDE_SOFT_INPUT_CLOSE_CURRENT_SESSION"; default: return "Unknown=" + reason; } Loading
core/java/com/android/internal/inputmethod/SoftInputShowHideReason.java +6 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ import java.lang.annotation.Retention; SoftInputShowHideReason.SHOW_IME_SCREENSHOT_FROM_IMMS, SoftInputShowHideReason.REMOVE_IME_SCREENSHOT_FROM_IMMS, SoftInputShowHideReason.HIDE_WHEN_INPUT_TARGET_INVISIBLE, SoftInputShowHideReason.HIDE_CLOSE_CURRENT_SESSION, }) public @interface SoftInputShowHideReason { /** Show soft input by {@link android.view.inputmethod.InputMethodManager#showSoftInput}. */ Loading Loading @@ -278,4 +279,9 @@ public @interface SoftInputShowHideReason { * focusable overlay window. */ int HIDE_WHEN_INPUT_TARGET_INVISIBLE = ImeProtoEnums.REASON_HIDE_WHEN_INPUT_TARGET_INVISIBLE; /** * Hide soft input when {@link InputMethodManager#closeCurrentInput()} gets called. */ int HIDE_CLOSE_CURRENT_SESSION = ImeProtoEnums.REASON_HIDE_CLOSE_CURRENT_SESSION; }