summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Cody Heiner <codyheiner@google.com> 2023-06-13 15:29:13 -0700
committer Cody Heiner <codyheiner@google.com> 2023-06-21 20:35:10 +0000
commit1feacf46891145a1d35e49824293959e5b733df4 (patch)
tree531ca7571cbaeb0e6e6f7c0af13725d97320eaf2
parent695dd0de28e071b9d6f140228208c275b093e93e (diff)
Move EventBuilders.h next to MotionEvent definitions
This allows these builders to be accessed by code in other locations, which is useful for writing other tests. Test: `atest frameworks/native/services/inputflinger/tests/InputDispatcher_test.cpp` Test: `atest frameworks/native/services/inputflinger/tests/InputDeviceMetricsCollector_test.cpp` Bug: 268245099 Change-Id: I7bca675e0b83673a30db2f1c06abda4369b69c42
-rw-r--r--include/input/EventBuilders.h (renamed from services/inputflinger/tests/EventBuilders.h)0
-rw-r--r--services/inputflinger/tests/InputDeviceMetricsCollector_test.cpp3
-rw-r--r--services/inputflinger/tests/InputDispatcher_test.cpp2
3 files changed, 3 insertions, 2 deletions
diff --git a/services/inputflinger/tests/EventBuilders.h b/include/input/EventBuilders.h
index 09438e9967..09438e9967 100644
--- a/services/inputflinger/tests/EventBuilders.h
+++ b/include/input/EventBuilders.h
diff --git a/services/inputflinger/tests/InputDeviceMetricsCollector_test.cpp b/services/inputflinger/tests/InputDeviceMetricsCollector_test.cpp
index c555d95f75..9999987e75 100644
--- a/services/inputflinger/tests/InputDeviceMetricsCollector_test.cpp
+++ b/services/inputflinger/tests/InputDeviceMetricsCollector_test.cpp
@@ -18,11 +18,12 @@
#include <gtest/gtest.h>
#include <gui/constants.h>
+#include <input/EventBuilders.h>
#include <linux/input.h>
+
#include <array>
#include <tuple>
-#include "EventBuilders.h"
#include "TestInputListener.h"
namespace android {
diff --git a/services/inputflinger/tests/InputDispatcher_test.cpp b/services/inputflinger/tests/InputDispatcher_test.cpp
index cef1791ffe..4433cf31d3 100644
--- a/services/inputflinger/tests/InputDispatcher_test.cpp
+++ b/services/inputflinger/tests/InputDispatcher_test.cpp
@@ -16,7 +16,6 @@
#include "../dispatcher/InputDispatcher.h"
#include "../BlockingQueue.h"
-#include "EventBuilders.h"
#include <android-base/properties.h>
#include <android-base/silent_death_test.h>
@@ -26,6 +25,7 @@
#include <fcntl.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
+#include <input/EventBuilders.h>
#include <input/Input.h>
#include <linux/input.h>
#include <sys/epoll.h>