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/services/inputflinger/tests/FakeWindows.cpp b/services/inputflinger/tests/FakeWindows.cpp
index c800d6a..b116521 100644
--- a/services/inputflinger/tests/FakeWindows.cpp
+++ b/services/inputflinger/tests/FakeWindows.cpp
@@ -152,7 +152,7 @@
ASSERT_NE(nullptr, event) << mName.c_str() << ": consumer should have returned non-NULL event.";
ASSERT_EQ(InputEventType::FOCUS, event->getType()) << "Instead of FocusEvent, got " << *event;
- ASSERT_EQ(ui::ADISPLAY_ID_NONE, event->getDisplayId())
+ ASSERT_EQ(ui::LogicalDisplayId::INVALID, event->getDisplayId())
<< mName.c_str() << ": event displayId should always be NONE.";
FocusEvent& focusEvent = static_cast<FocusEvent&>(*event);
@@ -165,7 +165,7 @@
ASSERT_EQ(InputEventType::CAPTURE, event->getType())
<< "Instead of CaptureEvent, got " << *event;
- ASSERT_EQ(ui::ADISPLAY_ID_NONE, event->getDisplayId())
+ ASSERT_EQ(ui::LogicalDisplayId::INVALID, event->getDisplayId())
<< mName.c_str() << ": event displayId should always be NONE.";
const auto& captureEvent = static_cast<const CaptureEvent&>(*event);
@@ -177,7 +177,7 @@
ASSERT_NE(nullptr, event) << mName.c_str() << ": consumer should have returned non-NULL event.";
ASSERT_EQ(InputEventType::DRAG, event->getType()) << "Instead of DragEvent, got " << *event;
- EXPECT_EQ(ui::ADISPLAY_ID_NONE, event->getDisplayId())
+ EXPECT_EQ(ui::LogicalDisplayId::INVALID, event->getDisplayId())
<< mName.c_str() << ": event displayId should always be NONE.";
const auto& dragEvent = static_cast<const DragEvent&>(*event);
@@ -192,7 +192,7 @@
ASSERT_EQ(InputEventType::TOUCH_MODE, event->getType())
<< "Instead of TouchModeEvent, got " << *event;
- ASSERT_EQ(ui::ADISPLAY_ID_NONE, event->getDisplayId())
+ ASSERT_EQ(ui::LogicalDisplayId::INVALID, event->getDisplayId())
<< mName.c_str() << ": event displayId should always be NONE.";
const auto& touchModeEvent = static_cast<const TouchModeEvent&>(*event);
EXPECT_EQ(inTouchMode, touchModeEvent.isInTouchMode());