summaryrefslogtreecommitdiff
path: root/libs/ultrahdr/jpegencoderhelper.cpp
diff options
context:
space:
mode:
author Prabir Pradhan <prabirmsp@google.com> 2023-06-30 01:48:45 +0000
committer Prabir Pradhan <prabirmsp@google.com> 2023-06-30 14:50:37 +0000
commit047695b3ed309ec1b95b5d2fadf41d2415ac739f (patch)
treeb8da2c2da814434e8e2367b93d6abbe45ff30149 /libs/ultrahdr/jpegencoderhelper.cpp
parent233c856f0e9ccd24de3a8b8e19a1bbc70f1fbcff (diff)
Metrics Collector: Prevent queuing interactions from ignored devices
We don't collect metrics for injected events. Since the interactions queue is processed from the InputReader thread, if many interactions are notified by InputDispatcher when the Reader thread is not active (e.g. for interactions from injected events), it's possible for the interactions queue to grow indefinitely. To mitigate this: - Do not queue interactions from ignored devices, such as those from injected events that use VIRTUAL_KEYBOARD_ID. This prevents the queue from growing in the first place due to injected events, which do not come from the Reader thread. - Ensure the interactions queue is bounded so that it cannot grow indefinitely. Bug: 287676652 Test: manual Test: atest inputflinger_tests Change-Id: I1ce27b1817704dd83307fab1917465dcb85ac31e
Diffstat (limited to 'libs/ultrahdr/jpegencoderhelper.cpp')
0 files changed, 0 insertions, 0 deletions