Fix potential block in InputReader
The 'dispatchExternalStylusState' is a callback function for
'ExternalStylusInputMapper' when the stylus device state is changed,
it's unnecessary to hold the lock again because it already hold when
processing the raw event.
Bug: 187253236
Test: atest inputflinger_tests
Change-Id: I19a2ef5f4c7a5afb622691ef7ec532f8d4dbb7ed
diff --git a/services/inputflinger/reader/include/InputReader.h b/services/inputflinger/reader/include/InputReader.h
index 1405671..bc79ccf 100644
--- a/services/inputflinger/reader/include/InputReader.h
+++ b/services/inputflinger/reader/include/InputReader.h
@@ -203,7 +203,7 @@
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;