Loading core/java/android/view/inputmethod/ImeTracker.java +6 −0 Original line number Diff line number Diff line Loading @@ -221,6 +221,7 @@ public interface ImeTracker { PHASE_WM_INVOKING_IME_REQUESTED_LISTENER, PHASE_CLIENT_ALREADY_HIDDEN, PHASE_CLIENT_VIEW_HANDLER_AVAILABLE, PHASE_SERVER_UPDATE_CLIENT_VISIBILITY, }) @Retention(RetentionPolicy.SOURCE) @interface Phase {} Loading Loading @@ -430,6 +431,11 @@ public interface ImeTracker { * continue without. */ int PHASE_CLIENT_VIEW_HANDLER_AVAILABLE = ImeProtoEnums.PHASE_CLIENT_VIEW_HANDLER_AVAILABLE; /** * ImeInsetsSourceProvider sets the reported visibility of the caller/client window (either the * app or the RemoteInsetsControlTarget). */ int PHASE_SERVER_UPDATE_CLIENT_VISIBILITY = ImeProtoEnums.PHASE_SERVER_UPDATE_CLIENT_VISIBILITY; /** * Called when an IME request is started. Loading services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -4969,7 +4969,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. final var userData = getUserData(userId); if (Flags.refactorInsetsController()) { setImeVisibilityOnFocusedWindowClient(false, userData, null /* TODO(b329229469) check statsToken */); null /* TODO(b/353463205) check statsToken */); } else { hideCurrentInputLocked(userData.mImeBindingState.mFocusedWindow, Loading services/core/java/com/android/server/wm/DisplayContent.java +1 −1 Original line number Diff line number Diff line Loading @@ -7072,7 +7072,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp @Override public void setImeInputTargetRequestedVisibility(boolean visible) { if (android.view.inputmethod.Flags.refactorInsetsController()) { // TODO(b/329229469) we won't have the statsToken in all cases, but should still log // TODO(b/353463205) we won't have the statsToken in all cases, but should still log try { mRemoteInsetsController.setImeInputTargetRequestedVisibility(visible); } catch (RemoteException e) { Loading services/core/java/com/android/server/wm/ImeInsetsSourceProvider.java +6 −4 Original line number Diff line number Diff line Loading @@ -258,7 +258,7 @@ final class ImeInsetsSourceProvider extends InsetsSourceProvider { // Refer WindowState#getImeControlTarget(). target = target.getWindow().getImeControlTarget(); } // TODO(b/329229469) make sure that the statsToken of all callers is non-null (currently // TODO(b/353463205) make sure that the statsToken of all callers is non-null (currently // not the case) super.updateControlForTarget(target, force, statsToken); if (Flags.refactorInsetsController()) { Loading Loading @@ -294,12 +294,14 @@ final class ImeInsetsSourceProvider extends InsetsSourceProvider { changed |= mDisplayContent.onImeInsetsClientVisibilityUpdate(); if (Flags.refactorInsetsController()) { if (changed) { ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_SERVER_UPDATE_CLIENT_VISIBILITY); invokeOnImeRequestedChangedListener(mDisplayContent.getImeInputTarget(), statsToken); } else { // TODO(b/329229469) change phase and check cancelled / failed // TODO(b/353463205) check cancelled / failed ImeTracker.forLogging().onCancelled(statsToken, ImeTracker.PHASE_CLIENT_REPORT_REQUESTED_VISIBLE_TYPES); ImeTracker.PHASE_SERVER_UPDATE_CLIENT_VISIBILITY); } } return changed; Loading Loading @@ -464,7 +466,7 @@ final class ImeInsetsSourceProvider extends InsetsSourceProvider { // This can later become ready, so we don't want to cancel the pending request here. return; } // TODO(b/329229469) check if this is still triggered, as we don't go into STATE_SHOW_IME // TODO(b/353463205) check if this is still triggered, as we don't go into STATE_SHOW_IME // (DefaultImeVisibilityApplier) if (android.view.inputmethod.Flags.refactorInsetsController()) { // The IME is drawn, so call into {@link WindowState#notifyInsetsControlChanged} Loading services/core/java/com/android/server/wm/InsetsStateController.java +2 −2 Original line number Diff line number Diff line Loading @@ -317,9 +317,9 @@ class InsetsStateController { // aborted. provider.updateFakeControlTarget(target); } else { // TODO(b/329229469) if the IME controlTarget changes, any pending requests should fail // TODO(b/353463205) if the IME controlTarget changes, any pending requests should fail provider.updateControlForTarget(target, false /* force */, null /* TODO(b/329229469) check if needed here */); null /* TODO(b/353463205) check if needed here */); // Get control target again in case the provider didn't accept the one we passed to it. target = provider.getControlTarget(); Loading Loading
core/java/android/view/inputmethod/ImeTracker.java +6 −0 Original line number Diff line number Diff line Loading @@ -221,6 +221,7 @@ public interface ImeTracker { PHASE_WM_INVOKING_IME_REQUESTED_LISTENER, PHASE_CLIENT_ALREADY_HIDDEN, PHASE_CLIENT_VIEW_HANDLER_AVAILABLE, PHASE_SERVER_UPDATE_CLIENT_VISIBILITY, }) @Retention(RetentionPolicy.SOURCE) @interface Phase {} Loading Loading @@ -430,6 +431,11 @@ public interface ImeTracker { * continue without. */ int PHASE_CLIENT_VIEW_HANDLER_AVAILABLE = ImeProtoEnums.PHASE_CLIENT_VIEW_HANDLER_AVAILABLE; /** * ImeInsetsSourceProvider sets the reported visibility of the caller/client window (either the * app or the RemoteInsetsControlTarget). */ int PHASE_SERVER_UPDATE_CLIENT_VISIBILITY = ImeProtoEnums.PHASE_SERVER_UPDATE_CLIENT_VISIBILITY; /** * Called when an IME request is started. Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -4969,7 +4969,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. final var userData = getUserData(userId); if (Flags.refactorInsetsController()) { setImeVisibilityOnFocusedWindowClient(false, userData, null /* TODO(b329229469) check statsToken */); null /* TODO(b/353463205) check statsToken */); } else { hideCurrentInputLocked(userData.mImeBindingState.mFocusedWindow, Loading
services/core/java/com/android/server/wm/DisplayContent.java +1 −1 Original line number Diff line number Diff line Loading @@ -7072,7 +7072,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp @Override public void setImeInputTargetRequestedVisibility(boolean visible) { if (android.view.inputmethod.Flags.refactorInsetsController()) { // TODO(b/329229469) we won't have the statsToken in all cases, but should still log // TODO(b/353463205) we won't have the statsToken in all cases, but should still log try { mRemoteInsetsController.setImeInputTargetRequestedVisibility(visible); } catch (RemoteException e) { Loading
services/core/java/com/android/server/wm/ImeInsetsSourceProvider.java +6 −4 Original line number Diff line number Diff line Loading @@ -258,7 +258,7 @@ final class ImeInsetsSourceProvider extends InsetsSourceProvider { // Refer WindowState#getImeControlTarget(). target = target.getWindow().getImeControlTarget(); } // TODO(b/329229469) make sure that the statsToken of all callers is non-null (currently // TODO(b/353463205) make sure that the statsToken of all callers is non-null (currently // not the case) super.updateControlForTarget(target, force, statsToken); if (Flags.refactorInsetsController()) { Loading Loading @@ -294,12 +294,14 @@ final class ImeInsetsSourceProvider extends InsetsSourceProvider { changed |= mDisplayContent.onImeInsetsClientVisibilityUpdate(); if (Flags.refactorInsetsController()) { if (changed) { ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_SERVER_UPDATE_CLIENT_VISIBILITY); invokeOnImeRequestedChangedListener(mDisplayContent.getImeInputTarget(), statsToken); } else { // TODO(b/329229469) change phase and check cancelled / failed // TODO(b/353463205) check cancelled / failed ImeTracker.forLogging().onCancelled(statsToken, ImeTracker.PHASE_CLIENT_REPORT_REQUESTED_VISIBLE_TYPES); ImeTracker.PHASE_SERVER_UPDATE_CLIENT_VISIBILITY); } } return changed; Loading Loading @@ -464,7 +466,7 @@ final class ImeInsetsSourceProvider extends InsetsSourceProvider { // This can later become ready, so we don't want to cancel the pending request here. return; } // TODO(b/329229469) check if this is still triggered, as we don't go into STATE_SHOW_IME // TODO(b/353463205) check if this is still triggered, as we don't go into STATE_SHOW_IME // (DefaultImeVisibilityApplier) if (android.view.inputmethod.Flags.refactorInsetsController()) { // The IME is drawn, so call into {@link WindowState#notifyInsetsControlChanged} Loading
services/core/java/com/android/server/wm/InsetsStateController.java +2 −2 Original line number Diff line number Diff line Loading @@ -317,9 +317,9 @@ class InsetsStateController { // aborted. provider.updateFakeControlTarget(target); } else { // TODO(b/329229469) if the IME controlTarget changes, any pending requests should fail // TODO(b/353463205) if the IME controlTarget changes, any pending requests should fail provider.updateControlForTarget(target, false /* force */, null /* TODO(b/329229469) check if needed here */); null /* TODO(b/353463205) check if needed here */); // Get control target again in case the provider didn't accept the one we passed to it. target = provider.getControlTarget(); Loading