Change debug logs to info
These debug logs currently don't show up in the logcat. Change them to
INFO level so that they are useful.
This can be observed by enabling some of the input logs and checking
logcat.
Bug: 282236272
Test: logcatcolor -b all | grep -i input
Change-Id: Ied3af6edc3fb5e4c3cb773131eabd1851bc6f83e
diff --git a/services/inputflinger/dispatcher/InputDispatcher.cpp b/services/inputflinger/dispatcher/InputDispatcher.cpp
index c80cf4c..2923a3c 100644
--- a/services/inputflinger/dispatcher/InputDispatcher.cpp
+++ b/services/inputflinger/dispatcher/InputDispatcher.cpp
@@ -3581,8 +3581,8 @@
const KeyEntry& keyEntry = static_cast<const KeyEntry&>(eventEntry);
std::array<uint8_t, 32> hmac = getSignature(keyEntry, *dispatchEntry);
if (DEBUG_OUTBOUND_EVENT_DETAILS) {
- LOG(DEBUG) << "Publishing " << *dispatchEntry << " to "
- << connection->getInputChannelName();
+ LOG(INFO) << "Publishing " << *dispatchEntry << " to "
+ << connection->getInputChannelName();
}
// Publish the key event.
@@ -3600,8 +3600,8 @@
case EventEntry::Type::MOTION: {
if (DEBUG_OUTBOUND_EVENT_DETAILS) {
- LOG(DEBUG) << "Publishing " << *dispatchEntry << " to "
- << connection->getInputChannelName();
+ LOG(INFO) << "Publishing " << *dispatchEntry << " to "
+ << connection->getInputChannelName();
}
status = publishMotionEvent(*connection, *dispatchEntry);
break;
@@ -3760,8 +3760,8 @@
const std::shared_ptr<Connection>& connection,
bool notify) {
if (DEBUG_DISPATCH_CYCLE) {
- LOG(DEBUG) << "channel '" << connection->getInputChannelName() << "'~ " << __func__
- << " - notify=" << toString(notify);
+ LOG(INFO) << "channel '" << connection->getInputChannelName() << "'~ " << __func__
+ << " - notify=" << toString(notify);
}
// Clear the dispatch queues.
@@ -4538,10 +4538,10 @@
}
if (debugInboundEventDetails()) {
- LOG(DEBUG) << __func__ << ": targetUid=" << toString(targetUid, &uidString)
- << ", syncMode=" << ftl::enum_string(syncMode) << ", timeout=" << timeout.count()
- << "ms, policyFlags=0x" << std::hex << policyFlags << std::dec
- << ", event=" << *event;
+ LOG(INFO) << __func__ << ": targetUid=" << toString(targetUid, &uidString)
+ << ", syncMode=" << ftl::enum_string(syncMode) << ", timeout=" << timeout.count()
+ << "ms, policyFlags=0x" << std::hex << policyFlags << std::dec
+ << ", event=" << *event;
}
nsecs_t endTime = now() + std::chrono::duration_cast<std::chrono::nanoseconds>(timeout).count();
@@ -4692,7 +4692,7 @@
bool needWake = false;
while (!injectedEntries.empty()) {
if (DEBUG_INJECTION) {
- LOG(DEBUG) << "Injecting " << injectedEntries.front()->getDescription();
+ LOG(INFO) << "Injecting " << injectedEntries.front()->getDescription();
}
needWake |= enqueueInboundEventLocked(std::move(injectedEntries.front()));
injectedEntries.pop();
@@ -4756,8 +4756,8 @@
} // release lock
if (DEBUG_INJECTION) {
- LOG(DEBUG) << "injectInputEvent - Finished with result "
- << ftl::enum_string(injectionResult);
+ LOG(INFO) << "injectInputEvent - Finished with result "
+ << ftl::enum_string(injectionResult);
}
return injectionResult;
@@ -4801,8 +4801,8 @@
InjectionState* injectionState = entry.injectionState;
if (injectionState) {
if (DEBUG_INJECTION) {
- LOG(DEBUG) << "Setting input event injection result to "
- << ftl::enum_string(injectionResult);
+ LOG(INFO) << "Setting input event injection result to "
+ << ftl::enum_string(injectionResult);
}
if (injectionState->injectionIsAsync && !(entry.policyFlags & POLICY_FLAG_FILTERED)) {
@@ -5409,8 +5409,8 @@
}
std::set<int32_t> deviceIds = touchedWindow->getTouchingDeviceIds();
if (deviceIds.size() != 1) {
- LOG(DEBUG) << "Can't transfer touch. Currently touching devices: " << dumpSet(deviceIds)
- << " for window: " << touchedWindow->dump();
+ LOG(INFO) << "Can't transfer touch. Currently touching devices: " << dumpSet(deviceIds)
+ << " for window: " << touchedWindow->dump();
return false;
}
const int32_t deviceId = *deviceIds.begin();