Optimize memory usage of InputEvent lookup.
Move the declaration of look up map to cpp file from header file to
avoid duplicate copies.
Bug: 165527068
Bug: 165398580
Bug: 165035349
Test: atest libinput_tests, atest inputflinger_tests
adb shell showmap <system_server pid> | grep input
Check libinput.so and libinput_reader.so size to be 300 and 372KB.
Change-Id: Ia80200b7889f16ce576637d746e64641f3f2a094
diff --git a/services/inputflinger/reader/InputDevice.cpp b/services/inputflinger/reader/InputDevice.cpp
index 14f922f..c63c179 100644
--- a/services/inputflinger/reader/InputDevice.cpp
+++ b/services/inputflinger/reader/InputDevice.cpp
@@ -108,7 +108,7 @@
dump += INDENT2 "Motion Ranges:\n";
for (size_t i = 0; i < ranges.size(); i++) {
const InputDeviceInfo::MotionRange& range = ranges[i];
- const char* label = getAxisLabel(range.axis);
+ const char* label = InputEventLookup::getAxisLabel(range.axis);
char name[32];
if (label) {
strncpy(name, label, sizeof(name));