Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c54fdb0a authored by Vishnu Nair's avatar Vishnu Nair
Browse files

[sf] fix crash when taking a screenshot

If a screenshot is requested immediately after it was created,
there might be a chance the layer does not exist in the main
thread data structures. This can happen if the screenshot
request is handled before main thread can create layers
added from the binder thread. Make sure we don't crash
when taking a screenshot by checking if the layer exists before
checking if it's secure.

Fixes: 312545483
Test: presubmit
Test: atest com.android.server.wm.ZOrderingTests#testImeScreenshotLayer
Change-Id: If765794e0fd9eb6c2bc2c65d8bc4c7523d905fa6
parent 43881b0f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment