Move key remapping to InputReader thread(1/n)
Currently, the key remapping operation occurs on a non-Reader thread,
which leads to concurrent operations on the KCM object by this thread
and the Reader, causing unpredictable concurrency issues.
Here, we move this operation to the Reader thread, aligning it with
most configuration refresh methods, which can resolve the
aforementioned issues.
Additionally, we are removing the device traversal method on the Java
side because we actually intend for the key remapping operation to
apply to all full-keyboard devices. This can be fully achieved during
the InputReader refresh, so we are also removing the deviceId parameter
from the remapping interface.
There should be no behavioral changes.
Bug: 358042225
Test: atest CtsInputTestCases
Test: atest InputTests
Test: atest inputflinger_tests
Flag: EXEMPT refactor
Change-Id: I6ab802b70dc1242c796f672ac30672d10e34857f
Signed-off-by:
Linnan Li <lilinnan@xiaomi.corp-partner.google.com>
Showing
- include/input/KeyCharacterMap.h 3 additions, 3 deletionsinclude/input/KeyCharacterMap.h
- libs/input/KeyCharacterMap.cpp 2 additions, 13 deletionslibs/input/KeyCharacterMap.cpp
- services/inputflinger/include/InputReaderBase.h 6 additions, 3 deletionsservices/inputflinger/include/InputReaderBase.h
- services/inputflinger/reader/EventHub.cpp 3 additions, 2 deletionsservices/inputflinger/reader/EventHub.cpp
- services/inputflinger/reader/InputDevice.cpp 12 additions, 6 deletionsservices/inputflinger/reader/InputDevice.cpp
- services/inputflinger/reader/InputReader.cpp 0 additions, 9 deletionsservices/inputflinger/reader/InputReader.cpp
- services/inputflinger/reader/include/EventHub.h 4 additions, 4 deletionsservices/inputflinger/reader/include/EventHub.h
- services/inputflinger/reader/include/InputDevice.h 2 additions, 4 deletionsservices/inputflinger/reader/include/InputDevice.h
- services/inputflinger/reader/include/InputReader.h 0 additions, 2 deletionsservices/inputflinger/reader/include/InputReader.h
- services/inputflinger/tests/FakeEventHub.cpp 3 additions, 2 deletionsservices/inputflinger/tests/FakeEventHub.cpp
- services/inputflinger/tests/FakeEventHub.h 2 additions, 2 deletionsservices/inputflinger/tests/FakeEventHub.h
- services/inputflinger/tests/InputReader_test.cpp 1 addition, 1 deletionservices/inputflinger/tests/InputReader_test.cpp
- services/inputflinger/tests/InterfaceMocks.h 2 additions, 3 deletionsservices/inputflinger/tests/InterfaceMocks.h
- services/inputflinger/tests/fuzzers/InputReaderFuzzer.cpp 0 additions, 4 deletionsservices/inputflinger/tests/fuzzers/InputReaderFuzzer.cpp
- services/inputflinger/tests/fuzzers/MapperHelpers.h 2 additions, 1 deletionservices/inputflinger/tests/fuzzers/MapperHelpers.h
Loading
Please register or sign in to comment