From 30efa5741954d81a8b366d66ad319e7944214c07 Mon Sep 17 00:00:00 2001 From: Evan Rosky Date: Wed, 21 Jul 2021 10:34:20 -0700 Subject: [PATCH] Add shell-transitions inTransition check to getTouchOcclusionMode This is the equivalent of legacy transitions isAnimating and is used by inputflinger to know when to use opacity checks vs blind occlusion blocking for untrusted touches. Bug: 194233756 Test: atest WindowUntrustedTouchTest Change-Id: I187c94ae55176d5369e5aaee995ccee251ac34b7 --- services/core/java/com/android/server/wm/WindowState.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index 7e721be3ebf15..89676a40c5aac 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -1172,7 +1172,8 @@ class WindowState extends WindowContainer implements WindowManagerP if (WindowManager.LayoutParams.isSystemAlertWindowType(mAttrs.type)) { return TouchOcclusionMode.USE_OPACITY; } - if (isAnimating(PARENTS | TRANSITION, ANIMATION_TYPE_ALL)) { + if (isAnimating(PARENTS | TRANSITION, ANIMATION_TYPE_ALL) + || mWmService.mAtmService.getTransitionController().inTransition(this)) { return TouchOcclusionMode.USE_OPACITY; } return TouchOcclusionMode.BLOCK_UNTRUSTED;