diff options
3 files changed, 17 insertions, 1 deletions
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java index d3fd0cfc0b22..0ecd09fa8d71 100644 --- a/core/java/android/view/inputmethod/InputMethodManager.java +++ b/core/java/android/view/inputmethod/InputMethodManager.java @@ -2333,7 +2333,13 @@ public final class InputMethodManager { } /** - * @return The current height of the input method window. + * This is kept due to {@link android.annotation.UnsupportedAppUsage}. + * + * <p>TODO(Bug 113914148): Check if we can remove this. We have accidentally exposed + * WindowManagerInternal#getInputMethodWindowVisibleHeight to app developers and some of them + * started relying on it.</p> + * + * @return Something that is not well-defined. * @hide */ @UnsupportedAppUsage diff --git a/core/java/com/android/internal/view/IInputMethodManager.aidl b/core/java/com/android/internal/view/IInputMethodManager.aidl index 4b004e2952b9..09ccf67a775e 100644 --- a/core/java/com/android/internal/view/IInputMethodManager.aidl +++ b/core/java/com/android/internal/view/IInputMethodManager.aidl @@ -79,6 +79,8 @@ interface IInputMethodManager { boolean switchToNextInputMethod(in IBinder token, boolean onlyCurrentIme); boolean shouldOfferSwitchingToNextInputMethod(in IBinder token); void setAdditionalInputMethodSubtypes(String id, in InputMethodSubtype[] subtypes); + // This is kept due to @UnsupportedAppUsage. + // TODO(Bug 113914148): Consider removing this. int getInputMethodWindowVisibleHeight(); void clearLastInputMethodWindowForTransition(in IBinder token); diff --git a/services/core/java/com/android/server/InputMethodManagerService.java b/services/core/java/com/android/server/InputMethodManagerService.java index 4d3468e21e75..e8f6382bec38 100644 --- a/services/core/java/com/android/server/InputMethodManagerService.java +++ b/services/core/java/com/android/server/InputMethodManagerService.java @@ -3145,6 +3145,14 @@ public class InputMethodManagerService extends IInputMethodManager.Stub return; } + /** + * This is kept due to {@link android.annotation.UnsupportedAppUsage} in + * {@link InputMethodManager#getInputMethodWindowVisibleHeight()} and a dependency in + * {@link InputMethodService#onCreate()}. + * + * <p>TODO(Bug 113914148): Check if we can remove this.</p> + * @return {@link WindowManagerInternal#getInputMethodWindowVisibleHeight()} + */ @Override public int getInputMethodWindowVisibleHeight() { return mWindowManagerInternal.getInputMethodWindowVisibleHeight(); |