From e57724d7fcd58229a8a61ec796eb73a413bdc56c Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Fri, 17 Apr 2020 13:15:05 -0700 Subject: [PATCH] InputMonitor: Ensure we assign input to correct Surface We want to assign input to the BLAST surface instead of the WSA container layer if BLAST is enabled. Previously this didn't matter but following upcoming occlusion changes the BLAST surface would then occlude the WSA surface and the main Input Channel would fail to receive input. We fix this by having InputMonitor call getClientViewRootSurface() Bug: 152064592 Test: Flip BLAST. Input still works! Change-Id: I3e4e136fa11d15f8f576b97dbdc34c9a585a0f32 --- services/core/java/com/android/server/wm/InputMonitor.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/wm/InputMonitor.java b/services/core/java/com/android/server/wm/InputMonitor.java index 8b34b9b8dd8fb..656dca531a226 100644 --- a/services/core/java/com/android/server/wm/InputMonitor.java +++ b/services/core/java/com/android/server/wm/InputMonitor.java @@ -487,7 +487,8 @@ final class InputMonitor { || w.cantReceiveTouchInput()) { if (w.mWinAnimator.hasSurface()) { mInputTransaction.setInputWindowInfo( - w.mWinAnimator.mSurfaceController.mSurfaceControl, mInvalidInputWindow); + w.mWinAnimator.mSurfaceController.getClientViewRootSurface(), + mInvalidInputWindow); } // Skip this window because it cannot possibly receive input. return; @@ -560,7 +561,8 @@ final class InputMonitor { if (w.mWinAnimator.hasSurface()) { mInputTransaction.setInputWindowInfo( - w.mWinAnimator.mSurfaceController.mSurfaceControl, inputWindowHandle); + w.mWinAnimator.mSurfaceController.getClientViewRootSurface(), + inputWindowHandle); } } }