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

Commit c8e2a1e3 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix potential block in InputReader" into sc-dev am: 40256647

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/14462740

Change-Id: Ieda4ea6a53954c8cf437ed6342ab2f415c8e932f
parents bb53742e 40256647
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;