Add input flags for event verification
We will try to roll them out to improve the correctness of the input
streams.
Bug: 271455682
Test: atest inputflinger_tests
Change-Id: I03ad327cf86b19220b5a6344b77b446dd7360ab9
diff --git a/libs/input/InputTransport.cpp b/libs/input/InputTransport.cpp
index bbbebf7..1f14396 100644
--- a/libs/input/InputTransport.cpp
+++ b/libs/input/InputTransport.cpp
@@ -23,9 +23,12 @@
#include <log/log.h>
#include <utils/Trace.h>
+#include <com_android_input_flags.h>
#include <input/InputTransport.h>
#include <input/TraceTools.h>
+namespace input_flags = com::android::input::flags;
+
namespace {
/**
@@ -139,7 +142,8 @@
* Enable this via "adb shell setprop log.tag.InputTransportVerifyEvents DEBUG"
*/
static bool verifyEvents() {
- return __android_log_is_loggable(ANDROID_LOG_DEBUG, LOG_TAG "VerifyEvents", ANDROID_LOG_INFO);
+ return input_flags::enable_outbound_event_verification() ||
+ __android_log_is_loggable(ANDROID_LOG_DEBUG, LOG_TAG "VerifyEvents", ANDROID_LOG_INFO);
}
template<typename T>