summaryrefslogtreecommitdiff
path: root/libs/input/Input.cpp
diff options
context:
space:
mode:
author Michael Wright <michaelwr@google.com> 2022-12-02 16:43:18 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2022-12-02 16:43:18 +0000
commitaa20704476fdae2d0d1542a05f492ff0d83783b9 (patch)
tree9b227262f705658b30f10f094ef8bba56264241c /libs/input/Input.cpp
parent9a319744a9c8c5043a0f9f235d41addd85a5cca3 (diff)
parenta9cf419caeebb019a6ca39fd43aab69f0956ae85 (diff)
Merge "Convert orientation values in input to ui::Rotation."
Diffstat (limited to 'libs/input/Input.cpp')
-rw-r--r--libs/input/Input.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/input/Input.cpp b/libs/input/Input.cpp
index 3685f54a53..162b757743 100644
--- a/libs/input/Input.cpp
+++ b/libs/input/Input.cpp
@@ -552,19 +552,19 @@ void MotionEvent::addSample(
&pointerCoords[getPointerCount()]);
}
-int MotionEvent::getSurfaceRotation() const {
+int32_t MotionEvent::getSurfaceRotation() const {
// The surface rotation is the rotation from the window's coordinate space to that of the
// display. Since the event's transform takes display space coordinates to window space, the
// returned surface rotation is the inverse of the rotation for the surface.
switch (mTransform.getOrientation()) {
case ui::Transform::ROT_0:
- return DISPLAY_ORIENTATION_0;
+ return static_cast<int32_t>(ui::ROTATION_0);
case ui::Transform::ROT_90:
- return DISPLAY_ORIENTATION_270;
+ return static_cast<int32_t>(ui::ROTATION_270);
case ui::Transform::ROT_180:
- return DISPLAY_ORIENTATION_180;
+ return static_cast<int32_t>(ui::ROTATION_180);
case ui::Transform::ROT_270:
- return DISPLAY_ORIENTATION_90;
+ return static_cast<int32_t>(ui::ROTATION_90);
default:
return -1;
}