Move ADISPLAY_ID_ definitions into LogicalDisplayId
These will eventually replace the existing definitions as follows:
ADISPLAY_ID_NONE -->> LogicalDisplayId::INVALID
ADISPLAY_ID_DEFAULT -->> LogicalDisplayId::DEFAULT
We are keeping the old definitions for now, to reduce the merge
conflicts. These will be removed in subsequent CLs, after the
frameworks/base and other repository patches go in.
The constant "NONE" was renamed to "INVALID" to make it consistent with
the Java definitions.
Bug: 339106983
Test: m checkinput
Change-Id: I0274be345159c85cb51fcea743d8acd3d298cd07
diff --git a/libs/gui/tests/EndToEndNativeInputTest.cpp b/libs/gui/tests/EndToEndNativeInputTest.cpp
index c0e7965..45e3390 100644
--- a/libs/gui/tests/EndToEndNativeInputTest.cpp
+++ b/libs/gui/tests/EndToEndNativeInputTest.cpp
@@ -59,8 +59,6 @@
using android::gui::InputApplicationInfo;
using android::gui::TouchOcclusionMode;
using android::gui::WindowInfo;
-using android::ui::ADISPLAY_ID_DEFAULT;
-using android::ui::ADISPLAY_ID_NONE;
namespace android {
namespace {
@@ -313,7 +311,7 @@
reportedListener->wait();
}
- void requestFocus(ui::LogicalDisplayId displayId = ADISPLAY_ID_DEFAULT) {
+ void requestFocus(ui::LogicalDisplayId displayId = ui::LogicalDisplayId::DEFAULT) {
SurfaceComposerClient::Transaction t;
FocusRequest request;
request.token = mInputInfo.token;
@@ -438,7 +436,7 @@
}
void injectTap(int x, int y) {
- injectTapOnDisplay(x, y, ADISPLAY_ID_DEFAULT);
+ injectTapOnDisplay(x, y, ui::LogicalDisplayId::DEFAULT);
}
void injectKeyOnDisplay(uint32_t keycode, ui::LogicalDisplayId displayId) {
@@ -451,7 +449,7 @@
}
void injectKey(uint32_t keycode) {
- injectKeyOnDisplay(keycode, ADISPLAY_ID_NONE);
+ injectKeyOnDisplay(keycode, ui::LogicalDisplayId::INVALID);
}
TEST_F(InputSurfacesTest, can_receive_input) {