diff options
Diffstat (limited to 'libs/input/Input.cpp')
-rw-r--r-- | libs/input/Input.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libs/input/Input.cpp b/libs/input/Input.cpp index 375b68433d..155cb040fb 100644 --- a/libs/input/Input.cpp +++ b/libs/input/Input.cpp @@ -90,6 +90,25 @@ const char* motionClassificationToString(MotionClassification classification) { } } +const char* motionToolTypeToString(int32_t toolType) { + switch (toolType) { + case AMOTION_EVENT_TOOL_TYPE_UNKNOWN: + return "UNKNOWN"; + case AMOTION_EVENT_TOOL_TYPE_FINGER: + return "FINGER"; + case AMOTION_EVENT_TOOL_TYPE_STYLUS: + return "STYLUS"; + case AMOTION_EVENT_TOOL_TYPE_MOUSE: + return "MOUSE"; + case AMOTION_EVENT_TOOL_TYPE_ERASER: + return "ERASER"; + case AMOTION_EVENT_TOOL_TYPE_PALM: + return "PALM"; + default: + return "INVALID"; + } +} + // --- IdGenerator --- IdGenerator::IdGenerator(Source source) : mSource(source) {} |