summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;