summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-07-06 22:27:02 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-07-06 22:27:02 +0000
commit503fca1db0dde745032267ad528f1fc2e3b6522e (patch)
tree1270c641ef1ed9630a39694077d9633d778f2048
parentb0058744c3d701845ef149c5605f2fee50006f10 (diff)
parent4125ea4e8677dbc13e8adbbbba742cc3fbed54a6 (diff)
Merge "Remove some logging information from InputDispatcher" into main
-rw-r--r--libs/input/InputTransport.cpp6
-rw-r--r--libs/input/tests/InputChannel_test.cpp6
-rw-r--r--services/inputflinger/dispatcher/InputDispatcher.cpp21
-rw-r--r--services/inputflinger/dispatcher/InputState.cpp4
4 files changed, 12 insertions, 25 deletions
diff --git a/libs/input/InputTransport.cpp b/libs/input/InputTransport.cpp
index 68cee0b211..77dcaa9ef2 100644
--- a/libs/input/InputTransport.cpp
+++ b/libs/input/InputTransport.cpp
@@ -375,13 +375,11 @@ status_t InputChannel::openInputChannelPair(const std::string& name,
sp<IBinder> token = sp<BBinder>::make();
- std::string serverChannelName = name + " (server)";
android::base::unique_fd serverFd(sockets[0]);
- outServerChannel = InputChannel::create(serverChannelName, std::move(serverFd), token);
+ outServerChannel = InputChannel::create(name, std::move(serverFd), token);
- std::string clientChannelName = name + " (client)";
android::base::unique_fd clientFd(sockets[1]);
- outClientChannel = InputChannel::create(clientChannelName, std::move(clientFd), token);
+ outClientChannel = InputChannel::create(name, std::move(clientFd), token);
return OK;
}
diff --git a/libs/input/tests/InputChannel_test.cpp b/libs/input/tests/InputChannel_test.cpp
index 435bdcde2d..25356cfcf0 100644
--- a/libs/input/tests/InputChannel_test.cpp
+++ b/libs/input/tests/InputChannel_test.cpp
@@ -65,11 +65,7 @@ TEST_F(InputChannelTest, OpenInputChannelPair_ReturnsAPairOfConnectedChannels) {
ASSERT_EQ(OK, result) << "should have successfully opened a channel pair";
- // Name
- EXPECT_STREQ("channel name (server)", serverChannel->getName().c_str())
- << "server channel should have suffixed name";
- EXPECT_STREQ("channel name (client)", clientChannel->getName().c_str())
- << "client channel should have suffixed name";
+ EXPECT_EQ(serverChannel->getName(), clientChannel->getName());
// Server->Client communication
InputMessage serverMsg = {};
diff --git a/services/inputflinger/dispatcher/InputDispatcher.cpp b/services/inputflinger/dispatcher/InputDispatcher.cpp
index e76f098fb1..23c95e56e9 100644
--- a/services/inputflinger/dispatcher/InputDispatcher.cpp
+++ b/services/inputflinger/dispatcher/InputDispatcher.cpp
@@ -2114,19 +2114,16 @@ void InputDispatcher::logOutboundMotionDetails(const char* prefix, const MotionE
if (DEBUG_OUTBOUND_EVENT_DETAILS) {
ALOGD("%seventTime=%" PRId64 ", deviceId=%d, source=%s, displayId=%s, policyFlags=0x%x, "
"action=%s, actionButton=0x%x, flags=0x%x, "
- "metaState=0x%x, buttonState=0x%x,"
- "edgeFlags=0x%x, xPrecision=%f, yPrecision=%f, downTime=%" PRId64,
+ "metaState=0x%x, buttonState=0x%x, downTime=%" PRId64,
prefix, entry.eventTime, entry.deviceId,
inputEventSourceToString(entry.source).c_str(), entry.displayId.toString().c_str(),
entry.policyFlags, MotionEvent::actionToString(entry.action).c_str(),
- entry.actionButton, entry.flags, entry.metaState, entry.buttonState, entry.edgeFlags,
- entry.xPrecision, entry.yPrecision, entry.downTime);
+ entry.actionButton, entry.flags, entry.metaState, entry.buttonState, entry.downTime);
for (uint32_t i = 0; i < entry.getPointerCount(); i++) {
ALOGD(" Pointer %d: id=%d, toolType=%s, "
"x=%f, y=%f, pressure=%f, size=%f, "
- "touchMajor=%f, touchMinor=%f, toolMajor=%f, toolMinor=%f, "
- "orientation=%f",
+ "touchMajor=%f, touchMinor=%f, toolMajor=%f, toolMinor=%f, orientation=%f",
i, entry.pointerProperties[i].id,
ftl::enum_string(entry.pointerProperties[i].toolType).c_str(),
entry.pointerCoords[i].getAxisValue(AMOTION_EVENT_AXIS_X),
@@ -4552,13 +4549,12 @@ void InputDispatcher::notifyMotion(const NotifyMotionArgs& args) {
ALOGD("notifyMotion - id=%" PRIx32 " eventTime=%" PRId64 ", deviceId=%d, source=%s, "
"displayId=%s, policyFlags=0x%x, "
"action=%s, actionButton=0x%x, flags=0x%x, metaState=0x%x, buttonState=0x%x, "
- "edgeFlags=0x%x, xPrecision=%f, yPrecision=%f, xCursorPosition=%f, "
- "yCursorPosition=%f, downTime=%" PRId64,
+ "xCursorPosition=%f, yCursorPosition=%f, downTime=%" PRId64,
args.id, args.eventTime, args.deviceId, inputEventSourceToString(args.source).c_str(),
args.displayId.toString().c_str(), args.policyFlags,
MotionEvent::actionToString(args.action).c_str(), args.actionButton, args.flags,
- args.metaState, args.buttonState, args.edgeFlags, args.xPrecision, args.yPrecision,
- args.xCursorPosition, args.yCursorPosition, args.downTime);
+ args.metaState, args.buttonState, args.xCursorPosition, args.yCursorPosition,
+ args.downTime);
for (uint32_t i = 0; i < args.getPointerCount(); i++) {
ALOGD(" Pointer %d: id=%d, toolType=%s, x=%f, y=%f, pressure=%f, size=%f, "
"touchMajor=%f, touchMinor=%f, toolMajor=%f, toolMinor=%f, orientation=%f",
@@ -6028,17 +6024,12 @@ void InputDispatcher::dumpDispatchStateLocked(std::string& dump) const {
dump += StringPrintf(INDENT3 "OutboundQueue: length=%zu\n",
connection->outboundQueue.size());
dump += dumpQueue(connection->outboundQueue, currentTime);
-
- } else {
- dump += INDENT3 "OutboundQueue: <empty>\n";
}
if (!connection->waitQueue.empty()) {
dump += StringPrintf(INDENT3 "WaitQueue: length=%zu\n",
connection->waitQueue.size());
dump += dumpQueue(connection->waitQueue, currentTime);
- } else {
- dump += INDENT3 "WaitQueue: <empty>\n";
}
std::string inputStateDump = streamableToString(connection->inputState);
if (!inputStateDump.empty()) {
diff --git a/services/inputflinger/dispatcher/InputState.cpp b/services/inputflinger/dispatcher/InputState.cpp
index dfbe02f332..4df23c54d6 100644
--- a/services/inputflinger/dispatcher/InputState.cpp
+++ b/services/inputflinger/dispatcher/InputState.cpp
@@ -647,7 +647,9 @@ std::ostream& operator<<(std::ostream& out, const InputState& state) {
if (!state.mMotionMementos.empty()) {
out << "mMotionMementos: ";
for (const InputState::MotionMemento& memento : state.mMotionMementos) {
- out << "{deviceId= " << memento.deviceId << ", hovering=" << memento.hovering << "}, ";
+ out << "{deviceId=" << memento.deviceId
+ << ", hovering=" << std::to_string(memento.hovering)
+ << ", downTime=" << memento.downTime << "}, ";
}
}
return out;