summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Winson Chung <winsonc@google.com> 2017-07-12 02:53:59 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2017-07-12 02:53:59 +0000
commitbd2682d0568cb5730c8749e7749698ed1d60f45f (patch)
treeadf57a507a037b06d033d959dd821dd445fe5e8e
parentb822ad3e06a353a38e4013b3fd6c6c26123e2720 (diff)
parentb1549341be7383def94dd3d9c1388732141cc822 (diff)
Merge "Fix z-order issue with text cursors and PiP." into oc-dr1-dev
-rw-r--r--services/core/java/com/android/server/wm/WindowState.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index 1ec8e54cad36..1bfc1a0047c3 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -1970,6 +1970,12 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
return false;
}
+ final boolean windowsAreFocusable = mAppToken != null && mAppToken.windowsAreFocusable();
+ if (!windowsAreFocusable) {
+ // This window can't be an IME target if the app's windows should not be focusable.
+ return false;
+ }
+
final int fl = mAttrs.flags & (FLAG_NOT_FOCUSABLE | FLAG_ALT_FOCUSABLE_IM);
final int type = mAttrs.type;