Loading
viewcapture: support concurrent UI threads
ViewCapture was originally designed for apps with a single UI thread and
WindowListener#onDraw() (as well as some other less frequent methods)
was meant to be executed only by the process' main thread.
This commit relaxes the "main thread only" assumption and allows multiple
UI threads to execute WindowListener#onDraw() concurrently. This change
is needed to onboard new apps with multiple UI threads (e.g. sysui).
Bug: 375005884
Flag: EXEMPT bugfix
Test: enable viewcapture on sysui windows and check the NPE \
doesn't happen anymore on presubmit
Change-Id: I8c55553b3ea69f4cc772df1eae3a26f8d22bf3ce