summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Arthur Hung <arthurhung@google.com> 2019-06-25 17:59:39 +0800
committer Arthur Hung <arthurhung@google.com> 2019-06-25 17:59:39 +0800
commit4e6e0ec60c1b8f9d90380bb5c550a63f1663ad94 (patch)
tree8a6eca8bb473d665dd63c37f6d648905301c3c14
parent00c3a02ac786a87fea4f93d7149e7e7e999354e5 (diff)
Fix WindowFocusTests#testTapNonFocusableWindow failed
If the touched window can't gain focus, should ignore set focus to display and task. Bug: 135899255 Test: atest WindowFocusTests#testTapNonFocusableWindow Change-Id: Ibd23d4cac9cf1f346f36c83ac66d650a54f8461d
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 264eedafc56e..2bf24f672119 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -7694,7 +7694,7 @@ public class WindowManagerService extends IWindowManager.Stub
private void onPointerDownOutsideFocusLocked(IBinder touchedToken) {
final WindowState touchedWindow = windowForClientLocked(null, touchedToken, false);
- if (touchedWindow == null) {
+ if (touchedWindow == null || !touchedWindow.canReceiveKeys()) {
return;
}