Set touch and tool resolution in TouchInputMapper
Currently, the resolution is not propagated from the raw axes to the
oriented axes. That means that the upper layers can't learn about the
physical size of the touch.
In this CL, the resolution is populated from the raw axes. This is done
both for TOOL_MAJOR / MINOR and TOUCH_MAJOR / MINOR.
Bug: 198472780
Test: atest inputflinger_tests
Change-Id: I29893df281f65c792277b405362f803f746526a5
diff --git a/services/inputflinger/reader/mapper/InputMapper.h b/services/inputflinger/reader/mapper/InputMapper.h
index f1c0e5a..d83d74d 100644
--- a/services/inputflinger/reader/mapper/InputMapper.h
+++ b/services/inputflinger/reader/mapper/InputMapper.h
@@ -45,7 +45,7 @@
inline int32_t getDeviceId() { return mDeviceContext.getId(); }
inline InputDeviceContext& getDeviceContext() { return mDeviceContext; }
- inline const std::string getDeviceName() { return mDeviceContext.getName(); }
+ inline const std::string getDeviceName() const { return mDeviceContext.getName(); }
inline InputReaderContext* getContext() { return mDeviceContext.getContext(); }
inline InputReaderPolicyInterface* getPolicy() { return getContext()->getPolicy(); }
inline InputListenerInterface& getListener() { return getContext()->getListener(); }