diff options
| author | 2023-06-13 15:29:13 -0700 | |
|---|---|---|
| committer | 2023-06-21 20:35:10 +0000 | |
| commit | 1feacf46891145a1d35e49824293959e5b733df4 (patch) | |
| tree | 531ca7571cbaeb0e6e6f7c0af13725d97320eaf2 | |
| parent | 695dd0de28e071b9d6f140228208c275b093e93e (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.cpp | 3 | ||||
| -rw-r--r-- | services/inputflinger/tests/InputDispatcher_test.cpp | 2 |
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> |