Only log when actually receiving actual switch events.
Also, turn off debug logging in a couple other classes and fix an
incorrect format specifier.
Bug: 25497538
Change-Id: I72af9492415fa6910af90caf03a7884c6cb1a0b1
diff --git a/modules/input/evdev/SwitchInputMapper.cpp b/modules/input/evdev/SwitchInputMapper.cpp
index adc2f63..bb79d01 100644
--- a/modules/input/evdev/SwitchInputMapper.cpp
+++ b/modules/input/evdev/SwitchInputMapper.cpp
@@ -19,6 +19,7 @@
#include "SwitchInputMapper.h"
+#include <inttypes.h>
#include <linux/input.h>
#include <hardware/input.h>
#include <utils/Log.h>
@@ -75,8 +76,6 @@
}
void SwitchInputMapper::process(const InputEvent& event) {
- ALOGD("processing switch event. type=%d code=%d value=%d",
- event.type, event.code, event.value);
switch (event.type) {
case EV_SW:
processSwitch(event.code, event.value);
@@ -87,11 +86,12 @@
}
break;
default:
- ALOGD("unknown switch event type: %d", event.type);
+ ALOGV("unknown switch event type: %d", event.type);
}
}
void SwitchInputMapper::processSwitch(int32_t switchCode, int32_t switchValue) {
+ ALOGV("processing switch event. code=%" PRId32 ", value=%" PRId32, switchCode, switchValue);
if (switchCode >= 0 && switchCode < SW_CNT) {
if (switchValue) {
mSwitchValues.markBit(switchCode);