Loading services/inputflinger/InputReader.cpp +13 −1 Original line number Original line Diff line number Diff line Loading @@ -2897,7 +2897,7 @@ void CursorInputMapper::fadePointer() { // --- RotaryEncoderInputMapper --- // --- RotaryEncoderInputMapper --- RotaryEncoderInputMapper::RotaryEncoderInputMapper(InputDevice* device) : RotaryEncoderInputMapper::RotaryEncoderInputMapper(InputDevice* device) : InputMapper(device) { InputMapper(device), mOrientation(DISPLAY_ORIENTATION_0) { mSource = AINPUT_SOURCE_ROTARY_ENCODER; mSource = AINPUT_SOURCE_ROTARY_ENCODER; } } Loading Loading @@ -2939,6 +2939,14 @@ void RotaryEncoderInputMapper::configure(nsecs_t when, if (!changes) { if (!changes) { mRotaryEncoderScrollAccumulator.configure(getDevice()); mRotaryEncoderScrollAccumulator.configure(getDevice()); } } if (!changes || (InputReaderConfiguration::CHANGE_DISPLAY_INFO)) { DisplayViewport v; if (config->getDisplayViewport(ViewportType::VIEWPORT_INTERNAL, NULL, &v)) { mOrientation = v.orientation; } else { mOrientation = DISPLAY_ORIENTATION_0; } } } } void RotaryEncoderInputMapper::reset(nsecs_t when) { void RotaryEncoderInputMapper::reset(nsecs_t when) { Loading Loading @@ -2976,6 +2984,10 @@ void RotaryEncoderInputMapper::sync(nsecs_t when) { policyFlags |= POLICY_FLAG_WAKE; policyFlags |= POLICY_FLAG_WAKE; } } if (mOrientation == DISPLAY_ORIENTATION_180) { scroll = -scroll; } // Send motion event. // Send motion event. if (scrolled) { if (scrolled) { int32_t metaState = mContext->getGlobalMetaState(); int32_t metaState = mContext->getGlobalMetaState(); Loading services/inputflinger/InputReader.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -1226,6 +1226,7 @@ private: int32_t mSource; int32_t mSource; float mScalingFactor; float mScalingFactor; int32_t mOrientation; void sync(nsecs_t when); void sync(nsecs_t when); }; }; Loading Loading
services/inputflinger/InputReader.cpp +13 −1 Original line number Original line Diff line number Diff line Loading @@ -2897,7 +2897,7 @@ void CursorInputMapper::fadePointer() { // --- RotaryEncoderInputMapper --- // --- RotaryEncoderInputMapper --- RotaryEncoderInputMapper::RotaryEncoderInputMapper(InputDevice* device) : RotaryEncoderInputMapper::RotaryEncoderInputMapper(InputDevice* device) : InputMapper(device) { InputMapper(device), mOrientation(DISPLAY_ORIENTATION_0) { mSource = AINPUT_SOURCE_ROTARY_ENCODER; mSource = AINPUT_SOURCE_ROTARY_ENCODER; } } Loading Loading @@ -2939,6 +2939,14 @@ void RotaryEncoderInputMapper::configure(nsecs_t when, if (!changes) { if (!changes) { mRotaryEncoderScrollAccumulator.configure(getDevice()); mRotaryEncoderScrollAccumulator.configure(getDevice()); } } if (!changes || (InputReaderConfiguration::CHANGE_DISPLAY_INFO)) { DisplayViewport v; if (config->getDisplayViewport(ViewportType::VIEWPORT_INTERNAL, NULL, &v)) { mOrientation = v.orientation; } else { mOrientation = DISPLAY_ORIENTATION_0; } } } } void RotaryEncoderInputMapper::reset(nsecs_t when) { void RotaryEncoderInputMapper::reset(nsecs_t when) { Loading Loading @@ -2976,6 +2984,10 @@ void RotaryEncoderInputMapper::sync(nsecs_t when) { policyFlags |= POLICY_FLAG_WAKE; policyFlags |= POLICY_FLAG_WAKE; } } if (mOrientation == DISPLAY_ORIENTATION_180) { scroll = -scroll; } // Send motion event. // Send motion event. if (scrolled) { if (scrolled) { int32_t metaState = mContext->getGlobalMetaState(); int32_t metaState = mContext->getGlobalMetaState(); Loading
services/inputflinger/InputReader.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -1226,6 +1226,7 @@ private: int32_t mSource; int32_t mSource; float mScalingFactor; float mScalingFactor; int32_t mOrientation; void sync(nsecs_t when); void sync(nsecs_t when); }; }; Loading