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
This commit is contained in:
Evan Rosky
2021-07-21 10:34:20 -07:00
parent 6f56237160
commit 30efa57419

View File

@@ -1172,7 +1172,8 @@ class WindowState extends WindowContainer<WindowState> 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;