summaryrefslogtreecommitdiff
path: root/libs/ultrahdr/jpegencoderhelper.cpp
diff options
context:
space:
mode:
author Vishnu Nair <vishnun@google.com> 2023-11-21 17:19:58 -0800
committer Vishnu Nair <vishnun@google.com> 2023-11-21 17:21:38 -0800
commitc54fdb0ae96e196f2eb5d3bd523ff4e46d6d2c5a (patch)
tree6eede6aba6e041ee1098015947f7212c93446f12 /libs/ultrahdr/jpegencoderhelper.cpp
parent43881b0fa27a23422041337c89d95098a2d4b618 (diff)
[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
Diffstat (limited to 'libs/ultrahdr/jpegencoderhelper.cpp')
0 files changed, 0 insertions, 0 deletions