diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-07-02 13:41:54 +0000 |
|---|---|---|
| committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-07-02 13:41:54 +0000 |
| commit | 49cef7a47c6c4f91b599ef621cbf261ffde24ee8 (patch) | |
| tree | eb0a15d00a08bb9bdaccd64106a76729ac587c20 /core/java | |
| parent | b79a00b3b520565c949dafdf984af11b164755ad (diff) | |
| parent | 0ef33bcb35a60a18e89e08e6b37979b268026617 (diff) | |
Merge "Revert new logic around FLAG_ALT_FOCUSABLE_IM" into rvc-dev am: 0ef33bcb35
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12059199
Change-Id: I0a6849c53947d5e663ae9be0b412bdb3d9270fb5
Diffstat (limited to 'core/java')
| -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 |
