Cap alpha to max if SAW + FLAG_NOT_TOUCHABLE
As part of go/untrusted-touches for S, we blocked touches from passing windows of different UIDs regardless of targetSdk. For SAWs, we applied an opacity rule where apps would be able to let touches pass through (usually via FLAG_NOT_TOUCHABLE) as long as their cumulative opacity in the touch area wasn't greater than 0.8. This resulted in some overlay apps being broken, which we expected and saw to some extent in df/dp/beta, but we had reached out and some apps fixed the issue. But the issue seems to be more widespread and OEM has escalated the issue, reporting it to be affecting them more severely (see bug). So, we automatically make SAW + FLAG_NOT_TOUCHABLE windows have 20% transparency to try to honor FLAG_NOT_TOUCHABLE and let touches pass through. Note that if the app has overlapping windows the cumulative opacity would be taken into consideration and the touch could still be blocked, but none among the apps I checked did that. Test: atest -d android.server.wm.WindowUntrustedTouchTest Test: Install and enable you.in.spark.energy.curved, verify touches work in the top part of the screen. Bug: 218777508 Change-Id: I3a74e1cc43a36171ee10fbf68c4bfff538eee661
Loading
Please register or sign in to comment