summaryrefslogtreecommitdiff
path: root/libs/androidfw/FileStream.cpp
diff options
context:
space:
mode:
author Linnan Li <lilinnan@xiaomi.corp-partner.google.com> 2024-10-15 15:49:44 +0000
committer Siarhei Vishniakou <svv@google.com> 2024-10-16 10:53:21 -0700
commit7d508bb273b39be5ceb1bac12540efa41521fd0b (patch)
tree7f0c45f823ce7e27a128c4e7bf6ecdc2a9a18a96 /libs/androidfw/FileStream.cpp
parentff75fcf37bdf4f3ba41f6142825245ac91da39d4 (diff)
Copy KeyCharacterMap object when we fill InputDeviceInfo(2/n)
Currently, in InputDeviceInfo, we store the KeyCharacterMap object, which is actually the original KeyCharacterMap from the EventHub. This could potentially lead to issues where two threads operate on the same KeyCharacterMap object simultaneously, resulting in thread safety problems. To avoid potential risks in the future, we make a copy of the original KeyCharacterMap when generating InputDeviceInfo. This change should not introduce any behavioral changes. Bug: 373011069 Flag: EXEMPT refactor Test: presubmit Signed-off-by: Linnan Li <lilinnan@xiaomi.corp-partner.google.com> (cherry picked from https://partner-android-review.googlesource.com/q/commit:39ba793d57aebda3dd7c3caa1b2e18464c3a6d28) Merged-In: Icd18de9d2df1a95c83c8c06bfaef05fb73e1691b Change-Id: Icd18de9d2df1a95c83c8c06bfaef05fb73e1691b
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions