summaryrefslogtreecommitdiff
path: root/libs/ultrahdr/jpegencoderhelper.cpp
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2023-08-15 17:28:49 -0700
committer Siarhei Vishniakou <svv@google.com> 2023-08-23 14:20:06 +0000
commit06fa19ea74a41df03d10a908f2f9c43cfa3aecc8 (patch)
tree8c4b5f9534ebfb43ed5b1e0f3a4d90417a96d2dc /libs/ultrahdr/jpegencoderhelper.cpp
parent05f6c605e2a1af6baf1fe9df1ff3b0383dfa0116 (diff)
Accumulate NotifyArgs inside the lock before notifying
Currently, mQueuedListener is used both with and without a lock inside InputReader. This is problematic because things like 'vibrate' could modify the collection inside QueuedInputListener while it's accessing it. This causes a crash. To avoid this, explicitly accumulate the events inside a lock, and then notify all args when the lock is released, but from a swapped variable. Bug: 293260512 Test: atest inputflinger_tests Change-Id: Ib9891b22e6c2632395ddfcec6af3aefe3151b4c4 (cherry picked from commit 23a98bf1478eb6b1509416a4734bcf38112255aa)
Diffstat (limited to 'libs/ultrahdr/jpegencoderhelper.cpp')
0 files changed, 0 insertions, 0 deletions