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 4e6e0ec60c)
This commit is contained in:
Arthur Hung
2019-06-25 17:59:39 +08:00
parent 667d2c91bc
commit ee23445971

View File

@@ -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;
}