Loading core/java/android/view/inputmethod/InputMethodManager.java +11 −11 Original line number Diff line number Diff line Loading @@ -2463,12 +2463,12 @@ public final class InputMethodManager { public boolean hideSoftInputFromView(@NonNull View view, @HideFlags int flags) { final boolean isFocusedAndWindowFocused = view.hasWindowFocus() && view.isFocused(); synchronized (mH) { if (!isFocusedAndWindowFocused && !hasServedByInputMethodLocked(view)) { final boolean hasServedByInputMethod = hasServedByInputMethodLocked(view); if (!isFocusedAndWindowFocused && !hasServedByInputMethod) { // Fail early if the view is not focused and not served // to avoid logging many erroneous calls. return false; } } final int reason = SoftInputShowHideReason.HIDE_SOFT_INPUT_FROM_VIEW; final var statsToken = ImeTracker.forLogging().onStart(ImeTracker.TYPE_HIDE, Loading @@ -2477,8 +2477,8 @@ public final class InputMethodManager { ImeTracker.ORIGIN_CLIENT, reason, ActivityThread::currentApplication); ImeTracing.getInstance().triggerClientDump("InputMethodManager#hideSoftInputFromView", this, null /* icProto */); synchronized (mH) { if (!hasServedByInputMethodLocked(view)) { if (!hasServedByInputMethod) { ImeTracker.forLogging().onFailed(statsToken, ImeTracker.PHASE_CLIENT_VIEW_SERVED); ImeTracker.forLatency().onShowFailed(statsToken, ImeTracker.PHASE_CLIENT_VIEW_SERVED, ActivityThread::currentApplication); Loading Loading
core/java/android/view/inputmethod/InputMethodManager.java +11 −11 Original line number Diff line number Diff line Loading @@ -2463,12 +2463,12 @@ public final class InputMethodManager { public boolean hideSoftInputFromView(@NonNull View view, @HideFlags int flags) { final boolean isFocusedAndWindowFocused = view.hasWindowFocus() && view.isFocused(); synchronized (mH) { if (!isFocusedAndWindowFocused && !hasServedByInputMethodLocked(view)) { final boolean hasServedByInputMethod = hasServedByInputMethodLocked(view); if (!isFocusedAndWindowFocused && !hasServedByInputMethod) { // Fail early if the view is not focused and not served // to avoid logging many erroneous calls. return false; } } final int reason = SoftInputShowHideReason.HIDE_SOFT_INPUT_FROM_VIEW; final var statsToken = ImeTracker.forLogging().onStart(ImeTracker.TYPE_HIDE, Loading @@ -2477,8 +2477,8 @@ public final class InputMethodManager { ImeTracker.ORIGIN_CLIENT, reason, ActivityThread::currentApplication); ImeTracing.getInstance().triggerClientDump("InputMethodManager#hideSoftInputFromView", this, null /* icProto */); synchronized (mH) { if (!hasServedByInputMethodLocked(view)) { if (!hasServedByInputMethod) { ImeTracker.forLogging().onFailed(statsToken, ImeTracker.PHASE_CLIENT_VIEW_SERVED); ImeTracker.forLatency().onShowFailed(statsToken, ImeTracker.PHASE_CLIENT_VIEW_SERVED, ActivityThread::currentApplication); Loading