summaryrefslogtreecommitdiff
path: root/include/input/KeyLayoutMap.h
diff options
context:
space:
mode:
author Prabir Pradhan <prabirmsp@google.com> 2022-08-23 16:21:39 +0000
committer Prabir Pradhan <prabirmsp@google.com> 2022-08-23 20:15:07 +0000
commitae4ff289d1ac2ac4f5a5b5bac9c4eb3b837a464b (patch)
treed00732b7e955a441dc3590f05143b0929b1450ef /include/input/KeyLayoutMap.h
parentcb42b4719fc24da4bc0b5a008e87ff1a350ff9b7 (diff)
Improve EventHub const-correctness
Ensure that all methods that "get" state from event hub are const-correct. While some "set" methods can also be const in event hub because they write to the system (side effect) instead of changing state, we leave these as non-const to make it easier for testing. Bug: None Test: atest inputflinger_tests Change-Id: I086b50458203a2395b1960e2bc1102610a3c0801
Diffstat (limited to 'include/input/KeyLayoutMap.h')
-rw-r--r--include/input/KeyLayoutMap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/input/KeyLayoutMap.h b/include/input/KeyLayoutMap.h
index 1da78aa0c1..a6c696df26 100644
--- a/include/input/KeyLayoutMap.h
+++ b/include/input/KeyLayoutMap.h
@@ -78,7 +78,7 @@ public:
std::optional<AxisInfo> mapAxis(int32_t scanCode) const;
const std::string getLoadFileName() const;
// Return pair of sensor type and sensor data index, for the input device abs code
- base::Result<std::pair<InputDeviceSensorType, int32_t>> mapSensor(int32_t absCode);
+ base::Result<std::pair<InputDeviceSensorType, int32_t>> mapSensor(int32_t absCode) const;
virtual ~KeyLayoutMap();