summaryrefslogtreecommitdiffstats
path: root/services/inputflinger/InputReader.cpp
diff options
context:
space:
mode:
authorPrashant Malani <pmalani@google.com>2016-01-13 01:00:08 -0800
committerPrashant Malani <pmalani@google.com>2016-01-13 01:00:08 -0800
commit2c09b78656dd97727f94fada81845b133cf142f3 (patch)
tree97aa3c86b0b2b7fa31f3215a6295a5d411bc92a7 /services/inputflinger/InputReader.cpp
parentee03865fe5fc6ffe9deda0e0870a18206027cfaf (diff)
downloadframeworks_native-2c09b78656dd97727f94fada81845b133cf142f3.zip
frameworks_native-2c09b78656dd97727f94fada81845b133cf142f3.tar.gz
frameworks_native-2c09b78656dd97727f94fada81845b133cf142f3.tar.bz2
Revert "inputflinger: Add support for scaling and true value reporting"
This reverts commit ee03865fe5fc6ffe9deda0e0870a18206027cfaf.
Diffstat (limited to 'services/inputflinger/InputReader.cpp')
-rw-r--r--services/inputflinger/InputReader.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/services/inputflinger/InputReader.cpp b/services/inputflinger/InputReader.cpp
index 8063a75..3ba38b5 100644
--- a/services/inputflinger/InputReader.cpp
+++ b/services/inputflinger/InputReader.cpp
@@ -2751,18 +2751,7 @@ void RotaryEncoderInputMapper::populateDeviceInfo(InputDeviceInfo* info) {
InputMapper::populateDeviceInfo(info);
if (mRotaryEncoderScrollAccumulator.haveRelativeVWheel()) {
- float res = 0.0f;
- if (!mDevice->getConfiguration().tryGetProperty(String8("device.res"), res)) {
- ALOGW("Rotary Encoder device configuration file didn't specify resolution!\n");
- }
- if (!mDevice->getConfiguration().tryGetProperty(String8("device.scalingFactor"),
- mScalingFactor)) {
- ALOGW("Rotary Encoder device configuration file didn't specify scaling factor,"
- "default to 1.0!\n");
- mScalingFactor = 1.0f;
- }
- info->addMotionRange(AMOTION_EVENT_AXIS_SCROLL, mSource, -1.0f, 1.0f, 0.0f, 0.0f,
- res * mScalingFactor);
+ info->addMotionRange(AMOTION_EVENT_AXIS_SCROLL, mSource, -1.0f, 1.0f, 0.0f, 0.0f, 0.0f);
}
}
@@ -2818,7 +2807,7 @@ void RotaryEncoderInputMapper::sync(nsecs_t when) {
// Send motion event.
if (scrolled) {
int32_t metaState = mContext->getGlobalMetaState();
- pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_SCROLL, scroll * mScalingFactor);
+ pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_SCROLL, scroll);
NotifyMotionArgs scrollArgs(when, getDeviceId(), mSource, policyFlags,
AMOTION_EVENT_ACTION_SCROLL, 0, 0, metaState, 0,