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/PointerChoreographer.cpp b/services/inputflinger/PointerChoreographer.cpp
index d6c6f93..8a1eed6 100644
--- a/services/inputflinger/PointerChoreographer.cpp
+++ b/services/inputflinger/PointerChoreographer.cpp
@@ -101,8 +101,8 @@
}),
mNextListener(listener),
mPolicy(policy),
- mDefaultMouseDisplayId(ui::ADISPLAY_ID_DEFAULT),
- mNotifiedPointerDisplayId(ui::ADISPLAY_ID_NONE),
+ mDefaultMouseDisplayId(ui::LogicalDisplayId::DEFAULT),
+ mNotifiedPointerDisplayId(ui::LogicalDisplayId::INVALID),
mShowTouchesEnabled(false),
mStylusPointerIconEnabled(false) {}
@@ -236,7 +236,7 @@
}
void PointerChoreographer::processDrawingTabletEventLocked(const android::NotifyMotionArgs& args) {
- if (args.displayId == ui::ADISPLAY_ID_NONE) {
+ if (args.displayId == ui::LogicalDisplayId::INVALID) {
return;
}
@@ -557,7 +557,7 @@
PointerChoreographer::PointerDisplayChange
PointerChoreographer::calculatePointerDisplayChangeToNotify() {
- ui::LogicalDisplayId displayIdToNotify = ui::ADISPLAY_ID_NONE;
+ ui::LogicalDisplayId displayIdToNotify = ui::LogicalDisplayId::INVALID;
FloatPoint cursorPosition = {0, 0};
if (const auto it = mMousePointersByDisplay.find(mDefaultMouseDisplayId);
it != mMousePointersByDisplay.end()) {