Loading services/inputflinger/reader/mapper/CursorInputMapper.cpp +4 −57 Original line number Original line Diff line number Diff line Loading @@ -40,8 +40,6 @@ namespace android { // The default velocity control parameters that has no effect. // The default velocity control parameters that has no effect. static const VelocityControlParameters FLAT_VELOCITY_CONTROL_PARAMS{}; static const VelocityControlParameters FLAT_VELOCITY_CONTROL_PARAMS{}; static const bool ENABLE_POINTER_CHOREOGRAPHER = input_flags::enable_pointer_choreographer(); // --- CursorMotionAccumulator --- // --- CursorMotionAccumulator --- CursorMotionAccumulator::CursorMotionAccumulator() { CursorMotionAccumulator::CursorMotionAccumulator() { Loading Loading @@ -78,22 +76,10 @@ void CursorMotionAccumulator::finishSync() { CursorInputMapper::CursorInputMapper(InputDeviceContext& deviceContext, CursorInputMapper::CursorInputMapper(InputDeviceContext& deviceContext, const InputReaderConfiguration& readerConfig) const InputReaderConfiguration& readerConfig) : CursorInputMapper(deviceContext, readerConfig, ENABLE_POINTER_CHOREOGRAPHER) {} CursorInputMapper::CursorInputMapper(InputDeviceContext& deviceContext, const InputReaderConfiguration& readerConfig, bool enablePointerChoreographer) : InputMapper(deviceContext, readerConfig), : InputMapper(deviceContext, readerConfig), mLastEventTime(std::numeric_limits<nsecs_t>::min()), mLastEventTime(std::numeric_limits<nsecs_t>::min()), mEnablePointerChoreographer(enablePointerChoreographer), mEnableNewMousePointerBallistics(input_flags::enable_new_mouse_pointer_ballistics()) {} mEnableNewMousePointerBallistics(input_flags::enable_new_mouse_pointer_ballistics()) {} CursorInputMapper::~CursorInputMapper() { if (mPointerController != nullptr) { mPointerController->fade(PointerControllerInterface::Transition::IMMEDIATE); } } uint32_t CursorInputMapper::getSources() const { uint32_t CursorInputMapper::getSources() const { return mSource; return mSource; } } Loading Loading @@ -304,22 +290,6 @@ std::list<NotifyArgs> CursorInputMapper::sync(nsecs_t when, nsecs_t readTime) { float xCursorPosition = AMOTION_EVENT_INVALID_CURSOR_POSITION; float xCursorPosition = AMOTION_EVENT_INVALID_CURSOR_POSITION; float yCursorPosition = AMOTION_EVENT_INVALID_CURSOR_POSITION; float yCursorPosition = AMOTION_EVENT_INVALID_CURSOR_POSITION; if (mSource == AINPUT_SOURCE_MOUSE) { if (mSource == AINPUT_SOURCE_MOUSE) { if (!mEnablePointerChoreographer) { if (moved || scrolled || buttonsChanged) { mPointerController->setPresentation( PointerControllerInterface::Presentation::POINTER); if (moved) { mPointerController->move(deltaX, deltaY); } mPointerController->unfade(PointerControllerInterface::Transition::IMMEDIATE); } std::tie(xCursorPosition, yCursorPosition) = mPointerController->getPosition(); pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_X, xCursorPosition); pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_Y, yCursorPosition); } pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_RELATIVE_X, deltaX); pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_RELATIVE_X, deltaX); pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_RELATIVE_Y, deltaY); pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_RELATIVE_Y, deltaY); } else { } else { Loading Loading @@ -470,7 +440,6 @@ void CursorInputMapper::configureBasicParams() { mYPrecision = 1.0f; mYPrecision = 1.0f; mXScale = 1.0f; mXScale = 1.0f; mYScale = 1.0f; mYScale = 1.0f; mPointerController = getContext()->getPointerController(getDeviceId()); break; break; case Parameters::Mode::NAVIGATION: case Parameters::Mode::NAVIGATION: mSource = AINPUT_SOURCE_TRACKBALL; mSource = AINPUT_SOURCE_TRACKBALL; Loading @@ -490,8 +459,6 @@ void CursorInputMapper::configureOnPointerCapture(const InputReaderConfiguration if (mParameters.mode == Parameters::Mode::POINTER) { if (mParameters.mode == Parameters::Mode::POINTER) { mParameters.mode = Parameters::Mode::POINTER_RELATIVE; mParameters.mode = Parameters::Mode::POINTER_RELATIVE; mSource = AINPUT_SOURCE_MOUSE_RELATIVE; mSource = AINPUT_SOURCE_MOUSE_RELATIVE; // Keep PointerController around in order to preserve the pointer position. mPointerController->fade(PointerControllerInterface::Transition::IMMEDIATE); } else { } else { ALOGE("Cannot request pointer capture, device is not in MODE_POINTER"); ALOGE("Cannot request pointer capture, device is not in MODE_POINTER"); } } Loading Loading @@ -546,32 +513,12 @@ void CursorInputMapper::configureOnChangeDisplayInfo(const InputReaderConfigurat // Only generate events for the associated display. // Only generate events for the associated display. mDisplayId = assocViewport->displayId; mDisplayId = assocViewport->displayId; resolvedViewport = *assocViewport; resolvedViewport = *assocViewport; if (!mEnablePointerChoreographer) { const bool mismatchedPointerDisplay = isPointer && (assocViewport->displayId != mPointerController->getDisplayId()); if (mismatchedPointerDisplay) { // This device's associated display doesn't match PointerController's current // display. Do not associate it with any display. mDisplayId.reset(); } } } else if (isPointer) { } else if (isPointer) { // The InputDevice is not associated with a viewport, but it controls the mouse pointer. // The InputDevice is not associated with a viewport, but it controls the mouse pointer. if (mEnablePointerChoreographer) { // Always use DISPLAY_ID_NONE for mouse events. // Always use DISPLAY_ID_NONE for mouse events. // PointerChoreographer will make it target the correct the displayId later. // PointerChoreographer will make it target the correct the displayId later. resolvedViewport = getContext()->getPolicy()->getPointerViewportForAssociatedDisplay(); resolvedViewport = getContext()->getPolicy()->getPointerViewportForAssociatedDisplay(); mDisplayId = resolvedViewport ? std::make_optional(ADISPLAY_ID_NONE) : std::nullopt; mDisplayId = resolvedViewport ? std::make_optional(ADISPLAY_ID_NONE) : std::nullopt; } else { mDisplayId = mPointerController->getDisplayId(); if (auto v = config.getDisplayViewportById(*mDisplayId); v) { resolvedViewport = *v; } if (auto bounds = mPointerController->getBounds(); bounds) { mBoundsInLogicalDisplay = *bounds; isBoundsSet = true; } } } } mOrientation = (mParameters.orientationAware && mParameters.hasAssociatedDisplay) || mOrientation = (mParameters.orientationAware && mParameters.hasAssociatedDisplay) || Loading services/inputflinger/reader/mapper/CursorInputMapper.h +1 −11 Original line number Original line Diff line number Diff line Loading @@ -20,14 +20,11 @@ #include "CursorScrollAccumulator.h" #include "CursorScrollAccumulator.h" #include "InputMapper.h" #include "InputMapper.h" #include <PointerControllerInterface.h> #include <input/VelocityControl.h> #include <input/VelocityControl.h> #include <ui/Rotation.h> #include <ui/Rotation.h> namespace android { namespace android { class PointerControllerInterface; class CursorButtonAccumulator; class CursorButtonAccumulator; class CursorScrollAccumulator; class CursorScrollAccumulator; Loading Loading @@ -56,7 +53,7 @@ public: friend std::unique_ptr<T> createInputMapper(InputDeviceContext& deviceContext, friend std::unique_ptr<T> createInputMapper(InputDeviceContext& deviceContext, const InputReaderConfiguration& readerConfig, const InputReaderConfiguration& readerConfig, Args... args); Args... args); virtual ~CursorInputMapper(); virtual ~CursorInputMapper() = default; virtual uint32_t getSources() const override; virtual uint32_t getSources() const override; virtual void populateDeviceInfo(InputDeviceInfo& deviceInfo) override; virtual void populateDeviceInfo(InputDeviceInfo& deviceInfo) override; Loading Loading @@ -122,21 +119,14 @@ private: ui::Rotation mOrientation{ui::ROTATION_0}; ui::Rotation mOrientation{ui::ROTATION_0}; FloatRect mBoundsInLogicalDisplay{}; FloatRect mBoundsInLogicalDisplay{}; std::shared_ptr<PointerControllerInterface> mPointerController; int32_t mButtonState; int32_t mButtonState; nsecs_t mDownTime; nsecs_t mDownTime; nsecs_t mLastEventTime; nsecs_t mLastEventTime; const bool mEnablePointerChoreographer; const bool mEnableNewMousePointerBallistics; const bool mEnableNewMousePointerBallistics; explicit CursorInputMapper(InputDeviceContext& deviceContext, explicit CursorInputMapper(InputDeviceContext& deviceContext, const InputReaderConfiguration& readerConfig); const InputReaderConfiguration& readerConfig); // Constructor for testing. explicit CursorInputMapper(InputDeviceContext& deviceContext, const InputReaderConfiguration& readerConfig, bool enablePointerChoreographer); void dumpParameters(std::string& dump); void dumpParameters(std::string& dump); void configureBasicParams(); void configureBasicParams(); void configureOnPointerCapture(const InputReaderConfiguration& config); void configureOnPointerCapture(const InputReaderConfiguration& config); Loading services/inputflinger/tests/CursorInputMapper_test.cpp +22 −528 File changed.Preview size limit exceeded, changes collapsed. Show changes services/inputflinger/tests/InputMapperTest.cpp +0 −6 Original line number Original line Diff line number Diff line Loading @@ -29,14 +29,8 @@ using testing::_; using testing::Return; using testing::Return; void InputMapperUnitTest::SetUpWithBus(int bus) { void InputMapperUnitTest::SetUpWithBus(int bus) { mFakePointerController = std::make_shared<FakePointerController>(); mFakePointerController->setBounds(0, 0, 800 - 1, 480 - 1); mFakePointerController->setPosition(INITIAL_CURSOR_X, INITIAL_CURSOR_Y); mFakePolicy = sp<FakeInputReaderPolicy>::make(); mFakePolicy = sp<FakeInputReaderPolicy>::make(); EXPECT_CALL(mMockInputReaderContext, getPointerController(DEVICE_ID)) .WillRepeatedly(Return(mFakePointerController)); EXPECT_CALL(mMockInputReaderContext, getPolicy()).WillRepeatedly(Return(mFakePolicy.get())); EXPECT_CALL(mMockInputReaderContext, getPolicy()).WillRepeatedly(Return(mFakePolicy.get())); EXPECT_CALL(mMockInputReaderContext, getEventHub()).WillRepeatedly(Return(&mMockEventHub)); EXPECT_CALL(mMockInputReaderContext, getEventHub()).WillRepeatedly(Return(&mMockEventHub)); Loading services/inputflinger/tests/InputMapperTest.h +0 −3 Original line number Original line Diff line number Diff line Loading @@ -40,8 +40,6 @@ class InputMapperUnitTest : public testing::Test { protected: protected: static constexpr int32_t EVENTHUB_ID = 1; static constexpr int32_t EVENTHUB_ID = 1; static constexpr int32_t DEVICE_ID = END_RESERVED_ID + 1000; static constexpr int32_t DEVICE_ID = END_RESERVED_ID + 1000; static constexpr float INITIAL_CURSOR_X = 400; static constexpr float INITIAL_CURSOR_Y = 240; virtual void SetUp() override { SetUpWithBus(0); } virtual void SetUp() override { SetUpWithBus(0); } virtual void SetUpWithBus(int bus); virtual void SetUpWithBus(int bus); Loading @@ -66,7 +64,6 @@ protected: InputDeviceIdentifier mIdentifier; InputDeviceIdentifier mIdentifier; MockEventHubInterface mMockEventHub; MockEventHubInterface mMockEventHub; sp<FakeInputReaderPolicy> mFakePolicy; sp<FakeInputReaderPolicy> mFakePolicy; std::shared_ptr<FakePointerController> mFakePointerController; MockInputReaderContext mMockInputReaderContext; MockInputReaderContext mMockInputReaderContext; std::unique_ptr<InputDevice> mDevice; std::unique_ptr<InputDevice> mDevice; Loading Loading
services/inputflinger/reader/mapper/CursorInputMapper.cpp +4 −57 Original line number Original line Diff line number Diff line Loading @@ -40,8 +40,6 @@ namespace android { // The default velocity control parameters that has no effect. // The default velocity control parameters that has no effect. static const VelocityControlParameters FLAT_VELOCITY_CONTROL_PARAMS{}; static const VelocityControlParameters FLAT_VELOCITY_CONTROL_PARAMS{}; static const bool ENABLE_POINTER_CHOREOGRAPHER = input_flags::enable_pointer_choreographer(); // --- CursorMotionAccumulator --- // --- CursorMotionAccumulator --- CursorMotionAccumulator::CursorMotionAccumulator() { CursorMotionAccumulator::CursorMotionAccumulator() { Loading Loading @@ -78,22 +76,10 @@ void CursorMotionAccumulator::finishSync() { CursorInputMapper::CursorInputMapper(InputDeviceContext& deviceContext, CursorInputMapper::CursorInputMapper(InputDeviceContext& deviceContext, const InputReaderConfiguration& readerConfig) const InputReaderConfiguration& readerConfig) : CursorInputMapper(deviceContext, readerConfig, ENABLE_POINTER_CHOREOGRAPHER) {} CursorInputMapper::CursorInputMapper(InputDeviceContext& deviceContext, const InputReaderConfiguration& readerConfig, bool enablePointerChoreographer) : InputMapper(deviceContext, readerConfig), : InputMapper(deviceContext, readerConfig), mLastEventTime(std::numeric_limits<nsecs_t>::min()), mLastEventTime(std::numeric_limits<nsecs_t>::min()), mEnablePointerChoreographer(enablePointerChoreographer), mEnableNewMousePointerBallistics(input_flags::enable_new_mouse_pointer_ballistics()) {} mEnableNewMousePointerBallistics(input_flags::enable_new_mouse_pointer_ballistics()) {} CursorInputMapper::~CursorInputMapper() { if (mPointerController != nullptr) { mPointerController->fade(PointerControllerInterface::Transition::IMMEDIATE); } } uint32_t CursorInputMapper::getSources() const { uint32_t CursorInputMapper::getSources() const { return mSource; return mSource; } } Loading Loading @@ -304,22 +290,6 @@ std::list<NotifyArgs> CursorInputMapper::sync(nsecs_t when, nsecs_t readTime) { float xCursorPosition = AMOTION_EVENT_INVALID_CURSOR_POSITION; float xCursorPosition = AMOTION_EVENT_INVALID_CURSOR_POSITION; float yCursorPosition = AMOTION_EVENT_INVALID_CURSOR_POSITION; float yCursorPosition = AMOTION_EVENT_INVALID_CURSOR_POSITION; if (mSource == AINPUT_SOURCE_MOUSE) { if (mSource == AINPUT_SOURCE_MOUSE) { if (!mEnablePointerChoreographer) { if (moved || scrolled || buttonsChanged) { mPointerController->setPresentation( PointerControllerInterface::Presentation::POINTER); if (moved) { mPointerController->move(deltaX, deltaY); } mPointerController->unfade(PointerControllerInterface::Transition::IMMEDIATE); } std::tie(xCursorPosition, yCursorPosition) = mPointerController->getPosition(); pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_X, xCursorPosition); pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_Y, yCursorPosition); } pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_RELATIVE_X, deltaX); pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_RELATIVE_X, deltaX); pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_RELATIVE_Y, deltaY); pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_RELATIVE_Y, deltaY); } else { } else { Loading Loading @@ -470,7 +440,6 @@ void CursorInputMapper::configureBasicParams() { mYPrecision = 1.0f; mYPrecision = 1.0f; mXScale = 1.0f; mXScale = 1.0f; mYScale = 1.0f; mYScale = 1.0f; mPointerController = getContext()->getPointerController(getDeviceId()); break; break; case Parameters::Mode::NAVIGATION: case Parameters::Mode::NAVIGATION: mSource = AINPUT_SOURCE_TRACKBALL; mSource = AINPUT_SOURCE_TRACKBALL; Loading @@ -490,8 +459,6 @@ void CursorInputMapper::configureOnPointerCapture(const InputReaderConfiguration if (mParameters.mode == Parameters::Mode::POINTER) { if (mParameters.mode == Parameters::Mode::POINTER) { mParameters.mode = Parameters::Mode::POINTER_RELATIVE; mParameters.mode = Parameters::Mode::POINTER_RELATIVE; mSource = AINPUT_SOURCE_MOUSE_RELATIVE; mSource = AINPUT_SOURCE_MOUSE_RELATIVE; // Keep PointerController around in order to preserve the pointer position. mPointerController->fade(PointerControllerInterface::Transition::IMMEDIATE); } else { } else { ALOGE("Cannot request pointer capture, device is not in MODE_POINTER"); ALOGE("Cannot request pointer capture, device is not in MODE_POINTER"); } } Loading Loading @@ -546,32 +513,12 @@ void CursorInputMapper::configureOnChangeDisplayInfo(const InputReaderConfigurat // Only generate events for the associated display. // Only generate events for the associated display. mDisplayId = assocViewport->displayId; mDisplayId = assocViewport->displayId; resolvedViewport = *assocViewport; resolvedViewport = *assocViewport; if (!mEnablePointerChoreographer) { const bool mismatchedPointerDisplay = isPointer && (assocViewport->displayId != mPointerController->getDisplayId()); if (mismatchedPointerDisplay) { // This device's associated display doesn't match PointerController's current // display. Do not associate it with any display. mDisplayId.reset(); } } } else if (isPointer) { } else if (isPointer) { // The InputDevice is not associated with a viewport, but it controls the mouse pointer. // The InputDevice is not associated with a viewport, but it controls the mouse pointer. if (mEnablePointerChoreographer) { // Always use DISPLAY_ID_NONE for mouse events. // Always use DISPLAY_ID_NONE for mouse events. // PointerChoreographer will make it target the correct the displayId later. // PointerChoreographer will make it target the correct the displayId later. resolvedViewport = getContext()->getPolicy()->getPointerViewportForAssociatedDisplay(); resolvedViewport = getContext()->getPolicy()->getPointerViewportForAssociatedDisplay(); mDisplayId = resolvedViewport ? std::make_optional(ADISPLAY_ID_NONE) : std::nullopt; mDisplayId = resolvedViewport ? std::make_optional(ADISPLAY_ID_NONE) : std::nullopt; } else { mDisplayId = mPointerController->getDisplayId(); if (auto v = config.getDisplayViewportById(*mDisplayId); v) { resolvedViewport = *v; } if (auto bounds = mPointerController->getBounds(); bounds) { mBoundsInLogicalDisplay = *bounds; isBoundsSet = true; } } } } mOrientation = (mParameters.orientationAware && mParameters.hasAssociatedDisplay) || mOrientation = (mParameters.orientationAware && mParameters.hasAssociatedDisplay) || Loading
services/inputflinger/reader/mapper/CursorInputMapper.h +1 −11 Original line number Original line Diff line number Diff line Loading @@ -20,14 +20,11 @@ #include "CursorScrollAccumulator.h" #include "CursorScrollAccumulator.h" #include "InputMapper.h" #include "InputMapper.h" #include <PointerControllerInterface.h> #include <input/VelocityControl.h> #include <input/VelocityControl.h> #include <ui/Rotation.h> #include <ui/Rotation.h> namespace android { namespace android { class PointerControllerInterface; class CursorButtonAccumulator; class CursorButtonAccumulator; class CursorScrollAccumulator; class CursorScrollAccumulator; Loading Loading @@ -56,7 +53,7 @@ public: friend std::unique_ptr<T> createInputMapper(InputDeviceContext& deviceContext, friend std::unique_ptr<T> createInputMapper(InputDeviceContext& deviceContext, const InputReaderConfiguration& readerConfig, const InputReaderConfiguration& readerConfig, Args... args); Args... args); virtual ~CursorInputMapper(); virtual ~CursorInputMapper() = default; virtual uint32_t getSources() const override; virtual uint32_t getSources() const override; virtual void populateDeviceInfo(InputDeviceInfo& deviceInfo) override; virtual void populateDeviceInfo(InputDeviceInfo& deviceInfo) override; Loading Loading @@ -122,21 +119,14 @@ private: ui::Rotation mOrientation{ui::ROTATION_0}; ui::Rotation mOrientation{ui::ROTATION_0}; FloatRect mBoundsInLogicalDisplay{}; FloatRect mBoundsInLogicalDisplay{}; std::shared_ptr<PointerControllerInterface> mPointerController; int32_t mButtonState; int32_t mButtonState; nsecs_t mDownTime; nsecs_t mDownTime; nsecs_t mLastEventTime; nsecs_t mLastEventTime; const bool mEnablePointerChoreographer; const bool mEnableNewMousePointerBallistics; const bool mEnableNewMousePointerBallistics; explicit CursorInputMapper(InputDeviceContext& deviceContext, explicit CursorInputMapper(InputDeviceContext& deviceContext, const InputReaderConfiguration& readerConfig); const InputReaderConfiguration& readerConfig); // Constructor for testing. explicit CursorInputMapper(InputDeviceContext& deviceContext, const InputReaderConfiguration& readerConfig, bool enablePointerChoreographer); void dumpParameters(std::string& dump); void dumpParameters(std::string& dump); void configureBasicParams(); void configureBasicParams(); void configureOnPointerCapture(const InputReaderConfiguration& config); void configureOnPointerCapture(const InputReaderConfiguration& config); Loading
services/inputflinger/tests/CursorInputMapper_test.cpp +22 −528 File changed.Preview size limit exceeded, changes collapsed. Show changes
services/inputflinger/tests/InputMapperTest.cpp +0 −6 Original line number Original line Diff line number Diff line Loading @@ -29,14 +29,8 @@ using testing::_; using testing::Return; using testing::Return; void InputMapperUnitTest::SetUpWithBus(int bus) { void InputMapperUnitTest::SetUpWithBus(int bus) { mFakePointerController = std::make_shared<FakePointerController>(); mFakePointerController->setBounds(0, 0, 800 - 1, 480 - 1); mFakePointerController->setPosition(INITIAL_CURSOR_X, INITIAL_CURSOR_Y); mFakePolicy = sp<FakeInputReaderPolicy>::make(); mFakePolicy = sp<FakeInputReaderPolicy>::make(); EXPECT_CALL(mMockInputReaderContext, getPointerController(DEVICE_ID)) .WillRepeatedly(Return(mFakePointerController)); EXPECT_CALL(mMockInputReaderContext, getPolicy()).WillRepeatedly(Return(mFakePolicy.get())); EXPECT_CALL(mMockInputReaderContext, getPolicy()).WillRepeatedly(Return(mFakePolicy.get())); EXPECT_CALL(mMockInputReaderContext, getEventHub()).WillRepeatedly(Return(&mMockEventHub)); EXPECT_CALL(mMockInputReaderContext, getEventHub()).WillRepeatedly(Return(&mMockEventHub)); Loading
services/inputflinger/tests/InputMapperTest.h +0 −3 Original line number Original line Diff line number Diff line Loading @@ -40,8 +40,6 @@ class InputMapperUnitTest : public testing::Test { protected: protected: static constexpr int32_t EVENTHUB_ID = 1; static constexpr int32_t EVENTHUB_ID = 1; static constexpr int32_t DEVICE_ID = END_RESERVED_ID + 1000; static constexpr int32_t DEVICE_ID = END_RESERVED_ID + 1000; static constexpr float INITIAL_CURSOR_X = 400; static constexpr float INITIAL_CURSOR_Y = 240; virtual void SetUp() override { SetUpWithBus(0); } virtual void SetUp() override { SetUpWithBus(0); } virtual void SetUpWithBus(int bus); virtual void SetUpWithBus(int bus); Loading @@ -66,7 +64,6 @@ protected: InputDeviceIdentifier mIdentifier; InputDeviceIdentifier mIdentifier; MockEventHubInterface mMockEventHub; MockEventHubInterface mMockEventHub; sp<FakeInputReaderPolicy> mFakePolicy; sp<FakeInputReaderPolicy> mFakePolicy; std::shared_ptr<FakePointerController> mFakePointerController; MockInputReaderContext mMockInputReaderContext; MockInputReaderContext mMockInputReaderContext; std::unique_ptr<InputDevice> mDevice; std::unique_ptr<InputDevice> mDevice; Loading