Loading core/java/android/view/inputmethod/ImeTracker.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -225,6 +225,7 @@ public interface ImeTracker { PHASE_SERVER_UPDATE_CLIENT_VISIBILITY, PHASE_SERVER_UPDATE_CLIENT_VISIBILITY, PHASE_WM_DISPLAY_IME_CONTROLLER_SET_IME_REQUESTED_VISIBLE, PHASE_WM_DISPLAY_IME_CONTROLLER_SET_IME_REQUESTED_VISIBLE, PHASE_WM_UPDATE_DISPLAY_WINDOW_REQUESTED_VISIBLE_TYPES, PHASE_WM_UPDATE_DISPLAY_WINDOW_REQUESTED_VISIBLE_TYPES, PHASE_WM_REQUESTED_VISIBLE_TYPES_NOT_CHANGED, }) }) @Retention(RetentionPolicy.SOURCE) @Retention(RetentionPolicy.SOURCE) @interface Phase {} @interface Phase {} Loading Loading @@ -445,6 +446,9 @@ public interface ImeTracker { /** The control target reported its requestedVisibleTypes back to WindowManagerService. */ /** The control target reported its requestedVisibleTypes back to WindowManagerService. */ int PHASE_WM_UPDATE_DISPLAY_WINDOW_REQUESTED_VISIBLE_TYPES = int PHASE_WM_UPDATE_DISPLAY_WINDOW_REQUESTED_VISIBLE_TYPES = ImeProtoEnums.PHASE_WM_UPDATE_DISPLAY_WINDOW_REQUESTED_VISIBLE_TYPES; ImeProtoEnums.PHASE_WM_UPDATE_DISPLAY_WINDOW_REQUESTED_VISIBLE_TYPES; /** The requestedVisibleTypes have not been changed, so this request is not continued. */ int PHASE_WM_REQUESTED_VISIBLE_TYPES_NOT_CHANGED = ImeProtoEnums.PHASE_WM_REQUESTED_VISIBLE_TYPES_NOT_CHANGED; /** /** * Called when an IME request is started. * Called when an IME request is started. Loading services/core/java/com/android/server/wm/InsetsStateController.java +5 −2 Original line number Original line Diff line number Diff line Loading @@ -225,13 +225,16 @@ class InsetsStateController { for (int i = mProviders.size() - 1; i >= 0; i--) { for (int i = mProviders.size() - 1; i >= 0; i--) { final InsetsSourceProvider provider = mProviders.valueAt(i); final InsetsSourceProvider provider = mProviders.valueAt(i); final @InsetsType int type = provider.getSource().getType(); final @InsetsType int type = provider.getSource().getType(); if ((type & changedTypes) != 0) { final boolean isImeProvider = type == WindowInsets.Type.ime(); final boolean isImeProvider = type == WindowInsets.Type.ime(); if ((type & changedTypes) != 0) { changed |= provider.updateClientVisibility( changed |= provider.updateClientVisibility( caller, isImeProvider ? statsToken : null) caller, isImeProvider ? statsToken : null) // Fake control target cannot change the client visibility, but it should // Fake control target cannot change the client visibility, but it should // change the insets with its newly requested visibility. // change the insets with its newly requested visibility. || (caller == provider.getFakeControlTarget()); || (caller == provider.getFakeControlTarget()); } else if (isImeProvider && android.view.inputmethod.Flags.refactorInsetsController()) { ImeTracker.forLogging().onCancelled(statsToken, ImeTracker.PHASE_WM_SET_REMOTE_TARGET_IME_VISIBILITY); } } } } if (changed) { if (changed) { Loading Loading
core/java/android/view/inputmethod/ImeTracker.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -225,6 +225,7 @@ public interface ImeTracker { PHASE_SERVER_UPDATE_CLIENT_VISIBILITY, PHASE_SERVER_UPDATE_CLIENT_VISIBILITY, PHASE_WM_DISPLAY_IME_CONTROLLER_SET_IME_REQUESTED_VISIBLE, PHASE_WM_DISPLAY_IME_CONTROLLER_SET_IME_REQUESTED_VISIBLE, PHASE_WM_UPDATE_DISPLAY_WINDOW_REQUESTED_VISIBLE_TYPES, PHASE_WM_UPDATE_DISPLAY_WINDOW_REQUESTED_VISIBLE_TYPES, PHASE_WM_REQUESTED_VISIBLE_TYPES_NOT_CHANGED, }) }) @Retention(RetentionPolicy.SOURCE) @Retention(RetentionPolicy.SOURCE) @interface Phase {} @interface Phase {} Loading Loading @@ -445,6 +446,9 @@ public interface ImeTracker { /** The control target reported its requestedVisibleTypes back to WindowManagerService. */ /** The control target reported its requestedVisibleTypes back to WindowManagerService. */ int PHASE_WM_UPDATE_DISPLAY_WINDOW_REQUESTED_VISIBLE_TYPES = int PHASE_WM_UPDATE_DISPLAY_WINDOW_REQUESTED_VISIBLE_TYPES = ImeProtoEnums.PHASE_WM_UPDATE_DISPLAY_WINDOW_REQUESTED_VISIBLE_TYPES; ImeProtoEnums.PHASE_WM_UPDATE_DISPLAY_WINDOW_REQUESTED_VISIBLE_TYPES; /** The requestedVisibleTypes have not been changed, so this request is not continued. */ int PHASE_WM_REQUESTED_VISIBLE_TYPES_NOT_CHANGED = ImeProtoEnums.PHASE_WM_REQUESTED_VISIBLE_TYPES_NOT_CHANGED; /** /** * Called when an IME request is started. * Called when an IME request is started. Loading
services/core/java/com/android/server/wm/InsetsStateController.java +5 −2 Original line number Original line Diff line number Diff line Loading @@ -225,13 +225,16 @@ class InsetsStateController { for (int i = mProviders.size() - 1; i >= 0; i--) { for (int i = mProviders.size() - 1; i >= 0; i--) { final InsetsSourceProvider provider = mProviders.valueAt(i); final InsetsSourceProvider provider = mProviders.valueAt(i); final @InsetsType int type = provider.getSource().getType(); final @InsetsType int type = provider.getSource().getType(); if ((type & changedTypes) != 0) { final boolean isImeProvider = type == WindowInsets.Type.ime(); final boolean isImeProvider = type == WindowInsets.Type.ime(); if ((type & changedTypes) != 0) { changed |= provider.updateClientVisibility( changed |= provider.updateClientVisibility( caller, isImeProvider ? statsToken : null) caller, isImeProvider ? statsToken : null) // Fake control target cannot change the client visibility, but it should // Fake control target cannot change the client visibility, but it should // change the insets with its newly requested visibility. // change the insets with its newly requested visibility. || (caller == provider.getFakeControlTarget()); || (caller == provider.getFakeControlTarget()); } else if (isImeProvider && android.view.inputmethod.Flags.refactorInsetsController()) { ImeTracker.forLogging().onCancelled(statsToken, ImeTracker.PHASE_WM_SET_REMOTE_TARGET_IME_VISIBILITY); } } } } if (changed) { if (changed) { Loading