Loading core/java/android/view/inputmethod/ImeTracker.java +6 −0 Original line number Diff line number Diff line Loading @@ -423,6 +423,12 @@ public interface ImeTracker { mTag = tag; } /** Returns the {@link Token#mTag} */ @NonNull public String getTag() { return mTag; } /** For Parcelable, no special marshalled objects. */ @Override public int describeContents() { Loading services/core/java/com/android/server/EventLogTags.logtags +4 −0 Original line number Diff line number Diff line Loading @@ -185,6 +185,10 @@ option java_package com.android.server # --------------------------- # Re-connecting to input method service because we haven't received its interface 32000 imf_force_reconnect_ime (IME|4),(Time Since Connect|2|3),(Showing|1|1) # Indicates server show input method 32001 imf_show_ime (token|3),(window|3),(reason|3),(softInputMode|3) # Indicates server hide input method 32002 imf_hide_ime (token|3),(window|3),(reason|3),(softInputMode|3) # --------------------------- Loading services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +15 −0 Original line number Diff line number Diff line Loading @@ -49,8 +49,11 @@ import static android.view.Display.INVALID_DISPLAY; import static android.view.WindowManager.DISPLAY_IME_POLICY_HIDE; import static android.view.WindowManager.DISPLAY_IME_POLICY_LOCAL; import static com.android.server.EventLogTags.IMF_HIDE_IME; import static com.android.server.EventLogTags.IMF_SHOW_IME; import static com.android.server.inputmethod.InputMethodBindingController.TIME_TO_RECONNECT; import static com.android.server.inputmethod.InputMethodUtils.isSoftInputModeStateVisibleAllowed; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_IME_VISIBILITY; import static java.lang.annotation.RetentionPolicy.SOURCE; Loading Loading @@ -3439,6 +3442,12 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub } // TODO(b/192412909): Check if we can always call onShowHideSoftInputRequested() or not. if (curMethod.showSoftInput(showInputToken, statsToken, showFlags, resultReceiver)) { if (DEBUG_IME_VISIBILITY) { EventLog.writeEvent(IMF_SHOW_IME, statsToken.getTag(), Objects.toString(mCurFocusedWindow), InputMethodDebug.softInputDisplayReasonToString(reason), InputMethodDebug.softInputModeToString(mCurFocusedWindowSoftInputMode)); } onShowHideSoftInputRequested(true /* show */, windowToken, reason); } mInputShown = true; Loading Loading @@ -3537,6 +3546,12 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub // TODO(b/192412909): Check if we can always call onShowHideSoftInputRequested() or not. if (curMethod.hideSoftInput(hideInputToken, statsToken, 0 /* flags */, resultReceiver)) { if (DEBUG_IME_VISIBILITY) { EventLog.writeEvent(IMF_HIDE_IME, statsToken.getTag(), Objects.toString(mCurFocusedWindow), InputMethodDebug.softInputDisplayReasonToString(reason), InputMethodDebug.softInputModeToString(mCurFocusedWindowSoftInputMode)); } onShowHideSoftInputRequested(false /* show */, windowToken, reason); } res = true; Loading services/core/java/com/android/server/wm/WindowManagerDebugConfig.java +3 −0 Original line number Diff line number Diff line Loading @@ -56,4 +56,7 @@ public class WindowManagerDebugConfig { static final boolean SHOW_STACK_CRAWLS = false; static final boolean DEBUG_WINDOW_CROP = false; static final boolean DEBUG_UNKNOWN_APP_VISIBILITY = false; // TODO(b/239501597) : Have a system property to control this flag. public static final boolean DEBUG_IME_VISIBILITY = false; } Loading
core/java/android/view/inputmethod/ImeTracker.java +6 −0 Original line number Diff line number Diff line Loading @@ -423,6 +423,12 @@ public interface ImeTracker { mTag = tag; } /** Returns the {@link Token#mTag} */ @NonNull public String getTag() { return mTag; } /** For Parcelable, no special marshalled objects. */ @Override public int describeContents() { Loading
services/core/java/com/android/server/EventLogTags.logtags +4 −0 Original line number Diff line number Diff line Loading @@ -185,6 +185,10 @@ option java_package com.android.server # --------------------------- # Re-connecting to input method service because we haven't received its interface 32000 imf_force_reconnect_ime (IME|4),(Time Since Connect|2|3),(Showing|1|1) # Indicates server show input method 32001 imf_show_ime (token|3),(window|3),(reason|3),(softInputMode|3) # Indicates server hide input method 32002 imf_hide_ime (token|3),(window|3),(reason|3),(softInputMode|3) # --------------------------- Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +15 −0 Original line number Diff line number Diff line Loading @@ -49,8 +49,11 @@ import static android.view.Display.INVALID_DISPLAY; import static android.view.WindowManager.DISPLAY_IME_POLICY_HIDE; import static android.view.WindowManager.DISPLAY_IME_POLICY_LOCAL; import static com.android.server.EventLogTags.IMF_HIDE_IME; import static com.android.server.EventLogTags.IMF_SHOW_IME; import static com.android.server.inputmethod.InputMethodBindingController.TIME_TO_RECONNECT; import static com.android.server.inputmethod.InputMethodUtils.isSoftInputModeStateVisibleAllowed; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_IME_VISIBILITY; import static java.lang.annotation.RetentionPolicy.SOURCE; Loading Loading @@ -3439,6 +3442,12 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub } // TODO(b/192412909): Check if we can always call onShowHideSoftInputRequested() or not. if (curMethod.showSoftInput(showInputToken, statsToken, showFlags, resultReceiver)) { if (DEBUG_IME_VISIBILITY) { EventLog.writeEvent(IMF_SHOW_IME, statsToken.getTag(), Objects.toString(mCurFocusedWindow), InputMethodDebug.softInputDisplayReasonToString(reason), InputMethodDebug.softInputModeToString(mCurFocusedWindowSoftInputMode)); } onShowHideSoftInputRequested(true /* show */, windowToken, reason); } mInputShown = true; Loading Loading @@ -3537,6 +3546,12 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub // TODO(b/192412909): Check if we can always call onShowHideSoftInputRequested() or not. if (curMethod.hideSoftInput(hideInputToken, statsToken, 0 /* flags */, resultReceiver)) { if (DEBUG_IME_VISIBILITY) { EventLog.writeEvent(IMF_HIDE_IME, statsToken.getTag(), Objects.toString(mCurFocusedWindow), InputMethodDebug.softInputDisplayReasonToString(reason), InputMethodDebug.softInputModeToString(mCurFocusedWindowSoftInputMode)); } onShowHideSoftInputRequested(false /* show */, windowToken, reason); } res = true; Loading
services/core/java/com/android/server/wm/WindowManagerDebugConfig.java +3 −0 Original line number Diff line number Diff line Loading @@ -56,4 +56,7 @@ public class WindowManagerDebugConfig { static final boolean SHOW_STACK_CRAWLS = false; static final boolean DEBUG_WINDOW_CROP = false; static final boolean DEBUG_UNKNOWN_APP_VISIBILITY = false; // TODO(b/239501597) : Have a system property to control this flag. public static final boolean DEBUG_IME_VISIBILITY = false; }