EventHub code cleanup.
Use epoll_wait() instead of poll(). Dropped all support for non-Linux platforms. Added a wake-up protocol so that the InputReader can wake up the event loop immediately as needed. Change-Id: Ibf84337bcceb3c2df068c5c637de42a319786d66
This commit is contained in:
@@ -488,7 +488,7 @@ void InputReader::configure(bool firstTime) {
|
||||
mEventHub->setExcludedDevices(mConfig.excludedDeviceNames);
|
||||
|
||||
if (!firstTime) {
|
||||
mEventHub->reopenDevices();
|
||||
mEventHub->requestReopenDevices();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -711,6 +711,8 @@ bool InputReader::markSupportedKeyCodes(int32_t deviceId, uint32_t sourceMask, s
|
||||
|
||||
void InputReader::refreshConfiguration() {
|
||||
android_atomic_release_store(1, &mRefreshConfiguration);
|
||||
|
||||
mEventHub->wake();
|
||||
}
|
||||
|
||||
void InputReader::dump(String8& dump) {
|
||||
|
||||
Reference in New Issue
Block a user