diff options
| author | Vishnu Nair <vishnun@google.com> | 2021-10-19 17:33:41 -0700 |
|---|---|---|
| committer | Vishnu Nair <vishnun@google.com> | 2021-10-20 10:42:01 -0700 |
| commit | 426124bc8a4eabacedc78db4547285e503cdabb8 (patch) | |
| tree | af6b61fb31058a44fe9f133592cdbc59d750a1ed /core/java/android | |
| parent | 4743b44cf98f16c84735d66cc46dc2ba90138d1c (diff) | |
WM: Use task bounds for modal window touchable region
If the task is organized and the window is modal then use the parent
surface control to set the touchable region.
Bug: 168252846
Test: Dismiss dialog in splitscreen mode by tapping outside
Change-Id: I8fdd850a142022f979b12a66bb8ead32438123e3
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/view/WindowManager.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java index 51cd95e42742..c25fde472431 100644 --- a/core/java/android/view/WindowManager.java +++ b/core/java/android/view/WindowManager.java @@ -4750,6 +4750,16 @@ public interface WindowManager extends ViewManager { return Integer.toString(inputFeature); } } + + /** + * True if the window should consume all pointer events itself, regardless of whether they + * are inside of the window. If the window is modal, its touchable region will expand to the + * size of its task. + * @hide + */ + public boolean isModal() { + return (flags & (FLAG_NOT_TOUCH_MODAL | FLAG_NOT_FOCUSABLE)) == 0; + } } /** |
