Convert orientation values in input to ui::Rotation.
ui::Rotation both provides better typesafety as well as some convenience
functions (e.g. operator+, operator-).
Test: atest TouchVideoFrame_test.cpp InputReader_test.cpp
Change-Id: Ib423457c742ed3d41f2e3fc269ddf86809cbf247
diff --git a/services/inputflinger/reader/mapper/RotaryEncoderInputMapper.h b/services/inputflinger/reader/mapper/RotaryEncoderInputMapper.h
index f4352e7..cb5fd88 100644
--- a/services/inputflinger/reader/mapper/RotaryEncoderInputMapper.h
+++ b/services/inputflinger/reader/mapper/RotaryEncoderInputMapper.h
@@ -16,6 +16,8 @@
#pragma once
+#include <ui/Rotation.h>
+
#include "CursorScrollAccumulator.h"
#include "InputMapper.h"
@@ -40,7 +42,7 @@
int32_t mSource;
float mScalingFactor;
- int32_t mOrientation;
+ ui::Rotation mOrientation;
[[nodiscard]] std::list<NotifyArgs> sync(nsecs_t when, nsecs_t readTime);
};