Refactor InputMapper creation and collection type
Move the creation of InputMappers from InputReader into InputDevice and change the collection type from a vector of raw pointers to a vector of unique_ptrs. Add helper functions for iterating over the mappers data structure. InputDevice::addMapper(...) is preserved for test cases, except rather than taking a bare pointer to a mapper, it creates the mapper, adds it's mapper vector, and returns a reference to this mapper. The unit tests have been updated for this change. Test: atest inputflinger_tests libinput_tests Change-Id: I1e1b69e8bd13dcfa835b2f846fd5cf0d6a4e1719
Loading
Please register or sign in to comment