Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 40256647 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix potential block in InputReader" into sc-dev

parents ca5d8f95 cadce9d7
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -413,8 +413,7 @@ void InputReader::getExternalStylusDevicesLocked(std::vector<InputDeviceInfo>& o
    }
}

void InputReader::dispatchExternalStylusState(const StylusState& state) {
    std::scoped_lock _l(mLock);
void InputReader::dispatchExternalStylusStateLocked(const StylusState& state) {
    for (auto& devicePair : mDevices) {
        std::shared_ptr<InputDevice>& device = devicePair.second;
        device->updateExternalStylusState(state);
@@ -945,7 +944,7 @@ void InputReader::ContextImpl::getExternalStylusDevices(std::vector<InputDeviceI
}

void InputReader::ContextImpl::dispatchExternalStylusState(const StylusState& state) {
    mReader->dispatchExternalStylusState(state);
    mReader->dispatchExternalStylusStateLocked(state);
}

InputReaderPolicyInterface* InputReader::ContextImpl::getPolicy() {
+1 −1
Original line number Diff line number Diff line
@@ -203,7 +203,7 @@ private:

    void notifyExternalStylusPresenceChangedLocked() REQUIRES(mLock);
    void getExternalStylusDevicesLocked(std::vector<InputDeviceInfo>& outDevices) REQUIRES(mLock);
    void dispatchExternalStylusState(const StylusState& state);
    void dispatchExternalStylusStateLocked(const StylusState& state) REQUIRES(mLock);

    // The PointerController that is shared among all the input devices that need it.
    std::weak_ptr<PointerControllerInterface> mPointerController;