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/include/InputReaderBase.h b/services/inputflinger/include/InputReaderBase.h
index e5c3aa0..c62fc7d 100644
--- a/services/inputflinger/include/InputReaderBase.h
+++ b/services/inputflinger/include/InputReaderBase.h
@@ -243,7 +243,7 @@
InputReaderConfiguration()
: virtualKeyQuietTime(0),
- defaultPointerDisplayId(ui::ADISPLAY_ID_DEFAULT),
+ defaultPointerDisplayId(ui::LogicalDisplayId::DEFAULT),
mousePointerSpeed(0),
displaysWithMousePointerAccelerationDisabled(),
pointerVelocityControlParameters(1.0f, 500.0f, 3000.0f,
@@ -472,7 +472,7 @@
* be used as the range of possible values for pointing devices, like mice and touchpads.
*/
virtual std::optional<DisplayViewport> getPointerViewportForAssociatedDisplay(
- ui::LogicalDisplayId associatedDisplayId = ui::ADISPLAY_ID_NONE) = 0;
+ ui::LogicalDisplayId associatedDisplayId = ui::LogicalDisplayId::INVALID) = 0;
};
} // namespace android
diff --git a/services/inputflinger/include/NotifyArgs.h b/services/inputflinger/include/NotifyArgs.h
index 865f3d0..db417cf 100644
--- a/services/inputflinger/include/NotifyArgs.h
+++ b/services/inputflinger/include/NotifyArgs.h
@@ -61,7 +61,7 @@
int32_t deviceId;
uint32_t source;
- ui::LogicalDisplayId displayId{ui::ADISPLAY_ID_NONE};
+ ui::LogicalDisplayId displayId{ui::LogicalDisplayId::INVALID};
uint32_t policyFlags;
int32_t action;
int32_t flags;
@@ -91,7 +91,7 @@
int32_t deviceId;
uint32_t source;
- ui::LogicalDisplayId displayId{ui::ADISPLAY_ID_NONE};
+ ui::LogicalDisplayId displayId{ui::LogicalDisplayId::INVALID};
uint32_t policyFlags;
int32_t action;
int32_t actionButton;
diff --git a/services/inputflinger/include/NotifyArgsBuilders.h b/services/inputflinger/include/NotifyArgsBuilders.h
index 1ba0cfd..cae638f 100644
--- a/services/inputflinger/include/NotifyArgsBuilders.h
+++ b/services/inputflinger/include/NotifyArgsBuilders.h
@@ -150,7 +150,7 @@
uint32_t mSource;
nsecs_t mDownTime;
nsecs_t mEventTime;
- ui::LogicalDisplayId mDisplayId{ui::ADISPLAY_ID_DEFAULT};
+ ui::LogicalDisplayId mDisplayId{ui::LogicalDisplayId::DEFAULT};
uint32_t mPolicyFlags = DEFAULT_POLICY_FLAGS;
int32_t mActionButton{0};
int32_t mButtonState{0};
@@ -229,7 +229,7 @@
uint32_t mSource;
nsecs_t mDownTime;
nsecs_t mEventTime;
- ui::LogicalDisplayId mDisplayId{ui::ADISPLAY_ID_DEFAULT};
+ ui::LogicalDisplayId mDisplayId{ui::LogicalDisplayId::DEFAULT};
uint32_t mPolicyFlags = DEFAULT_POLICY_FLAGS;
int32_t mFlags{0};
int32_t mKeyCode{AKEYCODE_UNKNOWN};