summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Chavi Weingarten <chaviw@google.com> 2023-04-03 19:47:43 +0000
committer Chavi Weingarten <chaviw@google.com> 2023-04-04 21:19:59 +0000
commitec7100fe88a7381f1180c4914d06cdac3778bbb6 (patch)
tree60cf09342cc2763ee19f25626a19a060f72295e9
parentd765772c00c7123ad352afb0632efa2dc99a12e9 (diff)
Fix tap outside focus for SCVH from different process.
When granting embedded window focus due to a tap, send a null WindowSession. This is because it's not necessary for the host and the embedded to be in the same process. So when WMS looks up the host window, it doesn't need to check that the embedded session matches the hsot session. WMS is already providing the correct host window token for the embedded window so the additional check is not needed. Test: SurfaceControlViewHostTests Bug: 230340812 Change-Id: I9bb11a4d5283ee3e3fa5ac9972630dbaefff921f
-rw-r--r--services/core/java/com/android/server/wm/EmbeddedWindowController.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/EmbeddedWindowController.java b/services/core/java/com/android/server/wm/EmbeddedWindowController.java
index d65f464590c1..44d67687e260 100644
--- a/services/core/java/com/android/server/wm/EmbeddedWindowController.java
+++ b/services/core/java/com/android/server/wm/EmbeddedWindowController.java
@@ -292,7 +292,9 @@ class EmbeddedWindowController {
private void handleTap(boolean grantFocus) {
if (mInputChannel != null) {
if (mHostWindowState != null) {
- mWmService.grantEmbeddedWindowFocus(mSession, mHostWindowState.mClient,
+ // Use null session since this is being granted by system server and doesn't
+ // require the host session to be passed in
+ mWmService.grantEmbeddedWindowFocus(null, mHostWindowState.mClient,
mFocusGrantToken, grantFocus);
if (grantFocus) {
// If granting focus to the embedded when tapped, we need to ensure the host