Loading services/inputflinger/tests/FakeInputReaderPolicy.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -158,7 +158,8 @@ const InputReaderConfiguration& FakeInputReaderPolicy::getReaderConfiguration() return mConfig; } const std::vector<InputDeviceInfo>& FakeInputReaderPolicy::getInputDevices() const { const std::vector<InputDeviceInfo> FakeInputReaderPolicy::getInputDevices() const { std::scoped_lock lock(mLock); return mInputDevices; } Loading Loading @@ -228,7 +229,7 @@ std::shared_ptr<PointerControllerInterface> FakeInputReaderPolicy::obtainPointer void FakeInputReaderPolicy::notifyInputDevicesChanged( const std::vector<InputDeviceInfo>& inputDevices) { std::scoped_lock<std::mutex> lock(mLock); std::scoped_lock lock(mLock); mInputDevices = inputDevices; mInputDevicesChanged = true; mDevicesChangedCondition.notify_all(); Loading Loading @@ -256,7 +257,7 @@ void FakeInputReaderPolicy::waitForInputDevices(std::function<void(bool)> proces } void FakeInputReaderPolicy::notifyStylusGestureStarted(int32_t deviceId, nsecs_t eventTime) { std::scoped_lock<std::mutex> lock(mLock); std::scoped_lock lock(mLock); mStylusGestureNotified = deviceId; } Loading services/inputflinger/tests/FakeInputReaderPolicy.h +2 −2 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ public: void removeDisabledDevice(int32_t deviceId); void setPointerController(std::shared_ptr<FakePointerController> controller); const InputReaderConfiguration& getReaderConfiguration() const; const std::vector<InputDeviceInfo>& getInputDevices() const; const std::vector<InputDeviceInfo> getInputDevices() const; TouchAffineTransformation getTouchAffineTransformation(const std::string& inputDeviceDescriptor, ui::Rotation surfaceRotation); void setTouchAffineTransformation(const TouchAffineTransformation t); Loading @@ -91,7 +91,7 @@ private: void waitForInputDevices(std::function<void(bool)> processDevicesChanged); void notifyStylusGestureStarted(int32_t deviceId, nsecs_t eventTime) override; std::mutex mLock; mutable std::mutex mLock; std::condition_variable mDevicesChangedCondition; InputReaderConfiguration mConfig; Loading Loading
services/inputflinger/tests/FakeInputReaderPolicy.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -158,7 +158,8 @@ const InputReaderConfiguration& FakeInputReaderPolicy::getReaderConfiguration() return mConfig; } const std::vector<InputDeviceInfo>& FakeInputReaderPolicy::getInputDevices() const { const std::vector<InputDeviceInfo> FakeInputReaderPolicy::getInputDevices() const { std::scoped_lock lock(mLock); return mInputDevices; } Loading Loading @@ -228,7 +229,7 @@ std::shared_ptr<PointerControllerInterface> FakeInputReaderPolicy::obtainPointer void FakeInputReaderPolicy::notifyInputDevicesChanged( const std::vector<InputDeviceInfo>& inputDevices) { std::scoped_lock<std::mutex> lock(mLock); std::scoped_lock lock(mLock); mInputDevices = inputDevices; mInputDevicesChanged = true; mDevicesChangedCondition.notify_all(); Loading Loading @@ -256,7 +257,7 @@ void FakeInputReaderPolicy::waitForInputDevices(std::function<void(bool)> proces } void FakeInputReaderPolicy::notifyStylusGestureStarted(int32_t deviceId, nsecs_t eventTime) { std::scoped_lock<std::mutex> lock(mLock); std::scoped_lock lock(mLock); mStylusGestureNotified = deviceId; } Loading
services/inputflinger/tests/FakeInputReaderPolicy.h +2 −2 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ public: void removeDisabledDevice(int32_t deviceId); void setPointerController(std::shared_ptr<FakePointerController> controller); const InputReaderConfiguration& getReaderConfiguration() const; const std::vector<InputDeviceInfo>& getInputDevices() const; const std::vector<InputDeviceInfo> getInputDevices() const; TouchAffineTransformation getTouchAffineTransformation(const std::string& inputDeviceDescriptor, ui::Rotation surfaceRotation); void setTouchAffineTransformation(const TouchAffineTransformation t); Loading @@ -91,7 +91,7 @@ private: void waitForInputDevices(std::function<void(bool)> processDevicesChanged); void notifyStylusGestureStarted(int32_t deviceId, nsecs_t eventTime) override; std::mutex mLock; mutable std::mutex mLock; std::condition_variable mDevicesChangedCondition; InputReaderConfiguration mConfig; Loading