Add the name of channel receiving bad data
When the InputReceiver gets bad data from the other end of the channel, we currently don't print the channel information. As a result, when this crash happens, we only learn about the process name. Add the channel info to this crash so that it's more useful going forward.
Bug: 329059530
Change-Id: Iad4c892dee37a9bf35e790781a2c39431d5a146a
Test: presubmit
diff --git a/libs/input/InputConsumerNoResampling.cpp b/libs/input/InputConsumerNoResampling.cpp
index 52acb51..76f2b4a 100644
--- a/libs/input/InputConsumerNoResampling.cpp
+++ b/libs/input/InputConsumerNoResampling.cpp
@@ -413,10 +413,9 @@
case InputMessage::Type::FINISHED:
case InputMessage::Type::TIMELINE: {
- LOG_ALWAYS_FATAL("Consumed a %s message, which should never be seen by "
- "InputConsumer on %s",
- ftl::enum_string(msg.header.type).c_str(),
- mChannel->getName().c_str());
+ LOG(FATAL) << "Consumed a " << ftl::enum_string(msg.header.type)
+ << " message, which should never be seen by InputConsumer on "
+ << mChannel->getName();
break;
}