Loading core/java/android/view/inputmethod/ImeTracker.java +4 −0 Original line number Diff line number Diff line Loading @@ -234,6 +234,7 @@ public interface ImeTracker { PHASE_CLIENT_ON_CONTROLS_CHANGED, PHASE_SERVER_IME_INVOKER, PHASE_SERVER_CLIENT_INVOKER, PHASE_SERVER_ALREADY_VISIBLE, }) @Retention(RetentionPolicy.SOURCE) @interface Phase {} Loading Loading @@ -479,6 +480,9 @@ public interface ImeTracker { int PHASE_SERVER_IME_INVOKER = ImeProtoEnums.PHASE_SERVER_IME_INVOKER; /** Reached the IME client invoker on the server. */ int PHASE_SERVER_CLIENT_INVOKER = ImeProtoEnums.PHASE_SERVER_CLIENT_INVOKER; /** The server will dispatch the show request to the IME, but this is already visible. */ int PHASE_SERVER_ALREADY_VISIBLE = ImeProtoEnums.PHASE_SERVER_ALREADY_VISIBLE; /** * Called when an IME request is started. Loading services/core/java/com/android/server/inputmethod/InputMethodBindingController.java +5 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import android.util.EventLog; import android.util.Slog; import android.view.Display; import android.view.WindowManager; import android.view.inputmethod.Flags; import android.view.inputmethod.InputMethod; import android.view.inputmethod.InputMethodInfo; import android.view.inputmethod.InputMethodManager; Loading Loading @@ -512,6 +513,10 @@ final class InputMethodBindingController { @GuardedBy("ImfLock.class") private void clearCurMethodAndSessions() { if (Flags.reportAnimatingInsetsTypes()) { final var userData = mService.getUserData(mUserId); userData.mVisibilityStateComputer.setInputShown(false); } mService.clearClientSessionsLocked(this); mCurMethod = null; mCurMethodUid = Process.INVALID_UID; Loading services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +6 −0 Original line number Diff line number Diff line Loading @@ -3519,6 +3519,12 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. } ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_SERVER_SYSTEM_READY); if (Flags.reportAnimatingInsetsTypes() && visibilityStateComputer.isInputShown()) { // We already called showSoftInput on the IME, no need to dispatch a new show request. ImeTracker.forLogging().onCancelled(statsToken, ImeTracker.PHASE_SERVER_ALREADY_VISIBLE); return false; } visibilityStateComputer.requestImeVisibility(windowToken, true); // Ensure binding the connection when IME is going to show. Loading Loading
core/java/android/view/inputmethod/ImeTracker.java +4 −0 Original line number Diff line number Diff line Loading @@ -234,6 +234,7 @@ public interface ImeTracker { PHASE_CLIENT_ON_CONTROLS_CHANGED, PHASE_SERVER_IME_INVOKER, PHASE_SERVER_CLIENT_INVOKER, PHASE_SERVER_ALREADY_VISIBLE, }) @Retention(RetentionPolicy.SOURCE) @interface Phase {} Loading Loading @@ -479,6 +480,9 @@ public interface ImeTracker { int PHASE_SERVER_IME_INVOKER = ImeProtoEnums.PHASE_SERVER_IME_INVOKER; /** Reached the IME client invoker on the server. */ int PHASE_SERVER_CLIENT_INVOKER = ImeProtoEnums.PHASE_SERVER_CLIENT_INVOKER; /** The server will dispatch the show request to the IME, but this is already visible. */ int PHASE_SERVER_ALREADY_VISIBLE = ImeProtoEnums.PHASE_SERVER_ALREADY_VISIBLE; /** * Called when an IME request is started. Loading
services/core/java/com/android/server/inputmethod/InputMethodBindingController.java +5 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import android.util.EventLog; import android.util.Slog; import android.view.Display; import android.view.WindowManager; import android.view.inputmethod.Flags; import android.view.inputmethod.InputMethod; import android.view.inputmethod.InputMethodInfo; import android.view.inputmethod.InputMethodManager; Loading Loading @@ -512,6 +513,10 @@ final class InputMethodBindingController { @GuardedBy("ImfLock.class") private void clearCurMethodAndSessions() { if (Flags.reportAnimatingInsetsTypes()) { final var userData = mService.getUserData(mUserId); userData.mVisibilityStateComputer.setInputShown(false); } mService.clearClientSessionsLocked(this); mCurMethod = null; mCurMethodUid = Process.INVALID_UID; Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +6 −0 Original line number Diff line number Diff line Loading @@ -3519,6 +3519,12 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. } ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_SERVER_SYSTEM_READY); if (Flags.reportAnimatingInsetsTypes() && visibilityStateComputer.isInputShown()) { // We already called showSoftInput on the IME, no need to dispatch a new show request. ImeTracker.forLogging().onCancelled(statsToken, ImeTracker.PHASE_SERVER_ALREADY_VISIBLE); return false; } visibilityStateComputer.requestImeVisibility(windowToken, true); // Ensure binding the connection when IME is going to show. Loading