summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Hung <arthurhung@google.com>2019-06-25 17:59:39 +0800
committerArthur Hung <arthurhung@google.com>2019-06-27 00:57:22 +0000
commitee23445971aa7c85f35b200e7cd2e6656e9d4cad (patch)
treee71a56973ef8eef0db655171374abddc522a6631
parent667d2c91bcad8b9f5ed872ecb7d3dd21b7286cdb (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 (cherry picked from commit 4e6e0ec60c1b8f9d90380bb5c550a63f1663ad94)
-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 57fa2ed63121..28bb3d8999c3 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -7690,7 +7690,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;
}