Revise RELATIVE_X and RELATIVE_Y motion ranges documentation.
Revise documentation for motion ranges of RELATIVE_X and RELATIVE_Y axes.
Bug: 117859192
Test: atest inputflinger_tes
Change-Id: I3a02400eb648fd4d5dc96a21c5d929e4f9a2428a
Merged-In: I3a02400eb648fd4d5dc96a21c5d929e4f9a2428a
diff --git a/services/inputflinger/reader/mapper/TouchInputMapper.cpp b/services/inputflinger/reader/mapper/TouchInputMapper.cpp
index 394c9e4..cfc2919 100644
--- a/services/inputflinger/reader/mapper/TouchInputMapper.cpp
+++ b/services/inputflinger/reader/mapper/TouchInputMapper.cpp
@@ -191,10 +191,11 @@
info->addMotionRange(mOrientedRanges.pressure);
if (mDeviceMode == DeviceMode::UNSCALED && mSource == AINPUT_SOURCE_TOUCHPAD) {
- // Populate RELATIVE_X and RELATIVE_Y motion range for touchpad capture mode
- // RELATIVE_X and RELATIVE_Y motion range is the largest possible hardware relative
- // motion, e.g. the hardware size finger moved completely across the touchpad in one
- // sample cycle.
+ // Populate RELATIVE_X and RELATIVE_Y motion ranges for touchpad capture mode.
+ //
+ // RELATIVE_X and RELATIVE_Y motion ranges should be the largest possible relative
+ // motion, i.e. the hardware dimensions, as the finger could move completely across the
+ // touchpad in one sample cycle.
const InputDeviceInfo::MotionRange& x = mOrientedRanges.x;
const InputDeviceInfo::MotionRange& y = mOrientedRanges.y;
info->addMotionRange(AMOTION_EVENT_AXIS_RELATIVE_X, mSource, -x.max, x.max, x.flat,