From e51f699fa8632eac088782c1fbfe9d3d51552b84 Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Tue, 23 Nov 2021 17:34:25 +0000 Subject: Consider IME_VISIBLE_IMPERCEPTIBLE as shown for taskbar purposes IME_VISIBLE isn't set until the keyboard is "perceptibly" visible to the user (e.g. based on alpha). But we want to signal to taskbar as soon as we know IME will be visible. Test: tap an edit field to open keyboard, ensure taskbar reacts immediately instead of halfway through the transition Bug: 202511986 Change-Id: I39c15578ed3e5b729f4645ad76988b113f0b57a6 --- core/java/android/inputmethodservice/InputMethodService.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'core/java/android/inputmethodservice/InputMethodService.java') diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java index 9721279bcd24..e0324c0ded26 100644 --- a/core/java/android/inputmethodservice/InputMethodService.java +++ b/core/java/android/inputmethodservice/InputMethodService.java @@ -395,7 +395,7 @@ public class InputMethodService extends AbstractInputMethodService { /** * @hide - * The IME is visible. + * The IME is perceptibly visible to the user. */ public static final int IME_VISIBLE = 0x2; @@ -406,6 +406,15 @@ public class InputMethodService extends AbstractInputMethodService { */ public static final int IME_INVISIBLE = 0x4; + /** + * @hide + * The IME is visible, but not yet perceptible to the user (e.g. fading in) + * by {@link android.view.WindowInsetsController}. + * + * @see InputMethodManager#reportPerceptible + */ + public static final int IME_VISIBLE_IMPERCEPTIBLE = 0x8; + // Min and max values for back disposition. private static final int BACK_DISPOSITION_MIN = BACK_DISPOSITION_DEFAULT; private static final int BACK_DISPOSITION_MAX = BACK_DISPOSITION_ADJUST_NOTHING; -- cgit v1.2.3