From cfbee5304f8fa7210e6f0816ca2ef2b6ab22c689 Mon Sep 17 00:00:00 2001 From: Siarhei Vishniakou Date: Fri, 10 May 2024 13:41:35 -0700 Subject: 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 --- include/input/DisplayViewport.h | 6 +++--- include/input/Input.h | 2 +- include/input/InputDevice.h | 2 +- include/input/InputEventBuilders.h | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/input/DisplayViewport.h b/include/input/DisplayViewport.h index 97c2ab8451..56294dd91a 100644 --- a/include/input/DisplayViewport.h +++ b/include/input/DisplayViewport.h @@ -46,7 +46,7 @@ enum class ViewportType : int32_t { * See com.android.server.display.DisplayViewport. */ struct DisplayViewport { - ui::LogicalDisplayId displayId; // ADISPLAY_ID_NONE if invalid + ui::LogicalDisplayId displayId; ui::Rotation orientation; int32_t logicalLeft; int32_t logicalTop; @@ -66,7 +66,7 @@ struct DisplayViewport { ViewportType type; DisplayViewport() - : displayId(ui::ADISPLAY_ID_NONE), + : displayId(ui::LogicalDisplayId::INVALID), orientation(ui::ROTATION_0), logicalLeft(0), logicalTop(0), @@ -101,7 +101,7 @@ struct DisplayViewport { inline bool isValid() const { return displayId.isValid(); } void setNonDisplayViewport(int32_t width, int32_t height) { - displayId = ui::ADISPLAY_ID_NONE; + displayId = ui::LogicalDisplayId::INVALID; orientation = ui::ROTATION_0; logicalLeft = 0; logicalTop = 0; diff --git a/include/input/Input.h b/include/input/Input.h index e939145bbf..3ca9c19876 100644 --- a/include/input/Input.h +++ b/include/input/Input.h @@ -553,7 +553,7 @@ protected: int32_t mId; DeviceId mDeviceId; uint32_t mSource; - ui::LogicalDisplayId mDisplayId{ui::ADISPLAY_ID_NONE}; + ui::LogicalDisplayId mDisplayId{ui::LogicalDisplayId::INVALID}; std::array mHmac; }; diff --git a/include/input/InputDevice.h b/include/input/InputDevice.h index 8783d9c192..7d8c19e702 100644 --- a/include/input/InputDevice.h +++ b/include/input/InputDevice.h @@ -366,7 +366,7 @@ private: int32_t mKeyboardType; std::shared_ptr mKeyCharacterMap; std::optional mUsiVersion; - ui::LogicalDisplayId mAssociatedDisplayId{ui::ADISPLAY_ID_NONE}; + ui::LogicalDisplayId mAssociatedDisplayId{ui::LogicalDisplayId::INVALID}; bool mEnabled; bool mHasVibrator; diff --git a/include/input/InputEventBuilders.h b/include/input/InputEventBuilders.h index 837e70e114..25d35e9fe7 100644 --- a/include/input/InputEventBuilders.h +++ b/include/input/InputEventBuilders.h @@ -158,7 +158,7 @@ private: int32_t mSource; nsecs_t mDownTime; nsecs_t mEventTime; - ui::LogicalDisplayId mDisplayId{ui::ADISPLAY_ID_DEFAULT}; + ui::LogicalDisplayId mDisplayId{ui::LogicalDisplayId::DEFAULT}; int32_t mActionButton{0}; int32_t mButtonState{0}; int32_t mFlags{0}; @@ -247,7 +247,7 @@ private: 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}; -- cgit v1.2.3-59-g8ed1b