inputflinger: fix format of parameter name comments
The Google C++ style guide [0] suggests that parameter name comments
should be of the form `/*paramName=*/value`. This potentially allows
tooling to check that the parameter names are correct, too.
[0]: https://google.github.io/styleguide/cppguide.html#Function_Argument_Comments
Bug: 245989146
Test: presubmit
Change-Id: I6239599692ada74438ebd8141adc05afacec915d
diff --git a/services/inputflinger/reader/mapper/CursorInputMapper.cpp b/services/inputflinger/reader/mapper/CursorInputMapper.cpp
index c684ed4..79f07a5 100644
--- a/services/inputflinger/reader/mapper/CursorInputMapper.cpp
+++ b/services/inputflinger/reader/mapper/CursorInputMapper.cpp
@@ -347,7 +347,7 @@
AMOTION_EVENT_EDGE_FLAG_NONE, 1, &pointerProperties,
&pointerCoords, mXPrecision, mYPrecision,
xCursorPosition, yCursorPosition, downTime,
- /* videoFrames */ {}));
+ /*videoFrames=*/{}));
}
}
@@ -357,7 +357,7 @@
AMOTION_EVENT_EDGE_FLAG_NONE, 1, &pointerProperties,
&pointerCoords, mXPrecision, mYPrecision, xCursorPosition,
yCursorPosition, downTime,
- /* videoFrames */ {}));
+ /*videoFrames=*/{}));
if (buttonsPressed) {
BitSet32 pressed(buttonsPressed);
@@ -371,7 +371,7 @@
AMOTION_EVENT_EDGE_FLAG_NONE, 1, &pointerProperties,
&pointerCoords, mXPrecision, mYPrecision,
xCursorPosition, yCursorPosition, downTime,
- /* videoFrames */ {}));
+ /*videoFrames=*/{}));
}
}
@@ -386,7 +386,7 @@
AMOTION_EVENT_EDGE_FLAG_NONE, 1, &pointerProperties,
&pointerCoords, mXPrecision, mYPrecision,
xCursorPosition, yCursorPosition, downTime,
- /* videoFrames */ {}));
+ /*videoFrames=*/{}));
}
// Send scroll events.
@@ -401,7 +401,7 @@
AMOTION_EVENT_EDGE_FLAG_NONE, 1, &pointerProperties,
&pointerCoords, mXPrecision, mYPrecision,
xCursorPosition, yCursorPosition, downTime,
- /* videoFrames */ {}));
+ /*videoFrames=*/{}));
}
}
diff --git a/services/inputflinger/reader/mapper/JoystickInputMapper.cpp b/services/inputflinger/reader/mapper/JoystickInputMapper.cpp
index 099a955..8a9ea75 100644
--- a/services/inputflinger/reader/mapper/JoystickInputMapper.cpp
+++ b/services/inputflinger/reader/mapper/JoystickInputMapper.cpp
@@ -352,7 +352,7 @@
MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, 1,
&pointerProperties, &pointerCoords, 0, 0,
AMOTION_EVENT_INVALID_CURSOR_POSITION,
- AMOTION_EVENT_INVALID_CURSOR_POSITION, 0, /* videoFrames */ {}));
+ AMOTION_EVENT_INVALID_CURSOR_POSITION, 0, /*videoFrames=*/{}));
return out;
}
diff --git a/services/inputflinger/reader/mapper/RotaryEncoderInputMapper.cpp b/services/inputflinger/reader/mapper/RotaryEncoderInputMapper.cpp
index 7251830..07ae5b1 100644
--- a/services/inputflinger/reader/mapper/RotaryEncoderInputMapper.cpp
+++ b/services/inputflinger/reader/mapper/RotaryEncoderInputMapper.cpp
@@ -148,10 +148,10 @@
out.push_back(
NotifyMotionArgs(getContext()->getNextId(), when, readTime, getDeviceId(), mSource,
displayId, policyFlags, AMOTION_EVENT_ACTION_SCROLL, 0, 0,
- metaState, /* buttonState */ 0, MotionClassification::NONE,
+ metaState, /*buttonState=*/0, MotionClassification::NONE,
AMOTION_EVENT_EDGE_FLAG_NONE, 1, &pointerProperties,
&pointerCoords, 0, 0, AMOTION_EVENT_INVALID_CURSOR_POSITION,
- AMOTION_EVENT_INVALID_CURSOR_POSITION, 0, /* videoFrames */ {}));
+ AMOTION_EVENT_INVALID_CURSOR_POSITION, 0, /*videoFrames=*/{}));
}
mRotaryEncoderScrollAccumulator.finishSync();
diff --git a/services/inputflinger/reader/mapper/TouchInputMapper.cpp b/services/inputflinger/reader/mapper/TouchInputMapper.cpp
index 44538f1..f48ff4c 100644
--- a/services/inputflinger/reader/mapper/TouchInputMapper.cpp
+++ b/services/inputflinger/reader/mapper/TouchInputMapper.cpp
@@ -2744,7 +2744,7 @@
buttonState, MotionClassification::NONE,
AMOTION_EVENT_EDGE_FLAG_NONE, 1, &pointerProperties,
&pointerCoords, 0, 0, x, y, mPointerGesture.downTime,
- /* videoFrames */ {}));
+ /*videoFrames=*/{}));
}
// Update state.
@@ -3643,7 +3643,7 @@
mOrientedXPrecision, mOrientedYPrecision,
mPointerSimple.lastCursorX, mPointerSimple.lastCursorY,
mPointerSimple.downTime,
- /* videoFrames */ {}));
+ /*videoFrames=*/{}));
}
if (mPointerSimple.hovering && !hovering) {
@@ -3658,7 +3658,7 @@
&mPointerSimple.lastCoords, mOrientedXPrecision,
mOrientedYPrecision, mPointerSimple.lastCursorX,
mPointerSimple.lastCursorY, mPointerSimple.downTime,
- /* videoFrames */ {}));
+ /*videoFrames=*/{}));
}
if (down) {
@@ -3675,7 +3675,7 @@
&mPointerSimple.currentProperties,
&mPointerSimple.currentCoords, mOrientedXPrecision,
mOrientedYPrecision, cursorPosition.x, cursorPosition.y,
- mPointerSimple.downTime, /* videoFrames */ {}));
+ mPointerSimple.downTime, /*videoFrames=*/{}));
}
// Send move.
@@ -3686,7 +3686,7 @@
&mPointerSimple.currentProperties,
&mPointerSimple.currentCoords, mOrientedXPrecision,
mOrientedYPrecision, cursorPosition.x, cursorPosition.y,
- mPointerSimple.downTime, /* videoFrames */ {}));
+ mPointerSimple.downTime, /*videoFrames=*/{}));
}
if (hovering) {
@@ -3702,7 +3702,7 @@
&mPointerSimple.currentProperties,
&mPointerSimple.currentCoords, mOrientedXPrecision,
mOrientedYPrecision, cursorPosition.x, cursorPosition.y,
- mPointerSimple.downTime, /* videoFrames */ {}));
+ mPointerSimple.downTime, /*videoFrames=*/{}));
}
// Send hover move.
@@ -3713,7 +3713,7 @@
MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, 1,
&mPointerSimple.currentProperties, &mPointerSimple.currentCoords,
mOrientedXPrecision, mOrientedYPrecision, cursorPosition.x,
- cursorPosition.y, mPointerSimple.downTime, /* videoFrames */ {}));
+ cursorPosition.y, mPointerSimple.downTime, /*videoFrames=*/{}));
}
if (mCurrentRawState.rawVScroll || mCurrentRawState.rawHScroll) {
@@ -3735,7 +3735,7 @@
&mPointerSimple.currentProperties, &pointerCoords,
mOrientedXPrecision, mOrientedYPrecision, cursorPosition.x,
cursorPosition.y, mPointerSimple.downTime,
- /* videoFrames */ {}));
+ /*videoFrames=*/{}));
}
// Save state.
@@ -3766,7 +3766,7 @@
mOrientedXPrecision, mOrientedYPrecision,
mPointerSimple.lastCursorX, mPointerSimple.lastCursorY,
mPointerSimple.downTime,
- /* videoFrames */ {}));
+ /*videoFrames=*/{}));
if (mPointerController != nullptr) {
mPointerController->fade(PointerControllerInterface::Transition::GRADUAL);
}