[WM][Floaty] Take assistant screenshot at windowing layer
This CL prevents the floaty squeeze lpp effect from showing up in the
screenshot that's sent to Assistant.
It uses the windowing layer (DisplayContent#getWindowingLayer) as the
root surface for taking the screenshot. Windowing layer is equal to the
root surface of the FEATURE_WINDOWED_MAGNIFICATION display area (if
it exists). That's the same surface the zoom scale effect is applied to.
Taking the screenshot at the same level will exclude the scale effect
from the screenshot.
Additionally, all surfaces that are placed at a higher level than
TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY will be excluded from the
screenshot. This includes the TopLevelWindowEffects window containing
the black border effect which is of TYPE_SECURE_SYSTEM_OVERLAY. But it
also includes other windows of TYPE_POINTER, TYPE_BOOT_PROGRESS,
TYPE_SECURE_SYSTEM_OVERLAY and TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY.
Bug: 409979948
Flag: com.android.systemui.shared.enable_lpp_assist_invocation_effect
Test: Manual, i.e. verified that squeeze effect and zoom effect do not
show up in the screenshot that's sent to assistant, by saving
the bitmap to a file and visual verification.
Test: DisplayContentTest#testValidWindowingLayer
Change-Id: I213c886f669d4a258fcc9ae6882e0dccfe8db8d1
Loading
Please register or sign in to comment