diff options
| author | android-build-team Robot <android-build-team-robot@google.com> | 2020-07-03 01:12:28 +0000 |
|---|---|---|
| committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-07-03 01:12:28 +0000 |
| commit | d61a4da65e990ec07d8ec940bbe45a4880e94f6c (patch) | |
| tree | 9852aff2bbb774b8da4b2158eccf405942f72ec6 /core/java/android | |
| parent | f1a7aa47660253c1176abaf4b04cfd867c365afc (diff) | |
| parent | f1f700094c8100b9a4a67815bf57ae50db1efab5 (diff) | |
Snap for 6650198 from f1f700094c8100b9a4a67815bf57ae50db1efab5 to rvc-release
Change-Id: Ida95aeac0a9ad731bbb93131ce75d823f0a9b59d
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/view/WindowManager.java | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java index 76071278edf8..5c6269421a1f 100644 --- a/core/java/android/view/WindowManager.java +++ b/core/java/android/view/WindowManager.java @@ -1454,11 +1454,22 @@ public interface WindowManager extends ViewManager { @Deprecated public static final int FLAG_LAYOUT_INSET_DECOR = 0x00010000; - /** Window flag: When set, input method can't interact with the focusable window - * and can be placed to use more space and cover the input method. - * Note: When combined with {@link #FLAG_NOT_FOCUSABLE}, this flag has no - * effect since input method cannot interact with windows having {@link #FLAG_NOT_FOCUSABLE} - * flag set. + /** Window flag: when set, inverts the input method focusability of the window. + * + * The effect of setting this flag depends on whether {@link #FLAG_NOT_FOCUSABLE} is set: + * <p> + * If {@link #FLAG_NOT_FOCUSABLE} is <em>not</em> set, i.e. when the window is focusable, + * setting this flag prevents this window from becoming the target of the input method. + * Consequently, it will <em>not</em> be able to interact with the input method, + * and will be layered above the input method (unless there is another input method + * target above it). + * + * <p> + * If {@link #FLAG_NOT_FOCUSABLE} <em>is</em> set, setting this flag requests for the window + * to be the input method target even though the window is <em>not</em> focusable. + * Consequently, it will be layered below the input method. + * Note: Windows that set {@link #FLAG_NOT_FOCUSABLE} cannot interact with the input method, + * regardless of this flag. */ public static final int FLAG_ALT_FOCUSABLE_IM = 0x00020000; @@ -2142,13 +2153,12 @@ public interface WindowManager extends ViewManager { * focus. In particular, this checks the * {@link #FLAG_NOT_FOCUSABLE} and {@link #FLAG_ALT_FOCUSABLE_IM} * flags and returns true if the combination of the two corresponds - * to a window that needs to be behind the input method so that the - * user can type into it. + * to a window that can use the input method. * * @param flags The current window manager flags. * - * @return Returns {@code true} if such a window should be behind/interact - * with an input method, {@code false} if not. + * @return Returns {@code true} if a window with the given flags would be able to + * use the input method, {@code false} if not. */ public static boolean mayUseInputMethod(int flags) { return (flags & FLAG_NOT_FOCUSABLE) != FLAG_NOT_FOCUSABLE |
