summaryrefslogtreecommitdiff
path: root/libs/input/Input.cpp
diff options
context:
space:
mode:
author Brett Chabot <brettchabot@google.com> 2020-10-29 17:43:49 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-10-29 17:43:49 +0000
commit08a8d53960e91d453ab479e6f41eb8c46a556d1f (patch)
tree54264daa087aa883dd6da8d5084843da5b0b61bd /libs/input/Input.cpp
parentf4b1410afa384815ea89dd4b089df4ebce2068ff (diff)
parent5820852c0f0fe634a104f81691ad3e0026caecdc (diff)
Merge "Build all of libinput for linux host."
Diffstat (limited to 'libs/input/Input.cpp')
-rw-r--r--libs/input/Input.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/libs/input/Input.cpp b/libs/input/Input.cpp
index c6604cbe3d..ad7db75c1a 100644
--- a/libs/input/Input.cpp
+++ b/libs/input/Input.cpp
@@ -28,8 +28,8 @@
#include <input/InputDevice.h>
#include <input/InputEventLabels.h>
-#ifdef __ANDROID__
#include <binder/Parcel.h>
+#ifdef __ANDROID__
#include <sys/random.h>
#endif
@@ -254,7 +254,6 @@ void PointerCoords::applyOffset(float xOffset, float yOffset) {
setAxisValue(AMOTION_EVENT_AXIS_Y, getY() + yOffset);
}
-#ifdef __ANDROID__
status_t PointerCoords::readFromParcel(Parcel* parcel) {
bits = parcel->readInt64();
@@ -278,7 +277,6 @@ status_t PointerCoords::writeToParcel(Parcel* parcel) const {
}
return OK;
}
-#endif
void PointerCoords::tooManyAxes(int axis) {
ALOGW("Could not set value for axis %d because the PointerCoords structure is full and "
@@ -540,7 +538,6 @@ void MotionEvent::transform(const std::array<float, 9>& matrix) {
}
}
-#ifdef __ANDROID__
static status_t readFromParcel(ui::Transform& transform, const Parcel& parcel) {
float dsdx, dtdx, tx, dtdy, dsdy, ty;
status_t status = parcel.readFloat(&dsdx);
@@ -677,7 +674,6 @@ status_t MotionEvent::writeToParcel(Parcel* parcel) const {
}
return OK;
}
-#endif
bool MotionEvent::isTouchEvent(uint32_t source, int32_t action) {
if (source & AINPUT_SOURCE_CLASS_POINTER) {