Loading services/input/InputDispatcher.cpp +15 −3 Original line number Diff line number Diff line Loading @@ -970,14 +970,17 @@ void InputDispatcher::resumeAfterTargetsNotReadyTimeoutLocked(nsecs_t newTimeout // Give up. mInputTargetWaitTimeoutExpired = true; // Release the touch targets. mTouchState.reset(); // Input state will not be realistic. Mark it out of sync. if (inputChannel.get()) { ssize_t connectionIndex = getConnectionIndexLocked(inputChannel); if (connectionIndex >= 0) { sp<Connection> connection = mConnectionsByFd.valueAt(connectionIndex); sp<InputWindowHandle> windowHandle = connection->inputWindowHandle; if (windowHandle != NULL) { mTouchState.removeWindow(windowHandle); } if (connection->status == Connection::STATUS_NORMAL) { CancelationOptions options(CancelationOptions::CANCEL_ALL_EVENTS, "application not responding"); Loading Loading @@ -4146,6 +4149,15 @@ void InputDispatcher::TouchState::addOrUpdateWindow(const sp<InputWindowHandle>& touchedWindow.pointerIds = pointerIds; } void InputDispatcher::TouchState::removeWindow(const sp<InputWindowHandle>& windowHandle) { for (size_t i = 0; i < windows.size(); i++) { if (windows.itemAt(i).windowHandle == windowHandle) { windows.removeAt(i); return; } } } void InputDispatcher::TouchState::filterNonAsIsTouchWindows() { for (size_t i = 0 ; i < windows.size(); ) { TouchedWindow& window = windows.editItemAt(i); Loading services/input/InputDispatcher.h +1 −0 Original line number Diff line number Diff line Loading @@ -926,6 +926,7 @@ private: void copyFrom(const TouchState& other); void addOrUpdateWindow(const sp<InputWindowHandle>& windowHandle, int32_t targetFlags, BitSet32 pointerIds); void removeWindow(const sp<InputWindowHandle>& windowHandle); void filterNonAsIsTouchWindows(); sp<InputWindowHandle> getFirstForegroundWindowHandle() const; bool isSlippery() const; Loading Loading
services/input/InputDispatcher.cpp +15 −3 Original line number Diff line number Diff line Loading @@ -970,14 +970,17 @@ void InputDispatcher::resumeAfterTargetsNotReadyTimeoutLocked(nsecs_t newTimeout // Give up. mInputTargetWaitTimeoutExpired = true; // Release the touch targets. mTouchState.reset(); // Input state will not be realistic. Mark it out of sync. if (inputChannel.get()) { ssize_t connectionIndex = getConnectionIndexLocked(inputChannel); if (connectionIndex >= 0) { sp<Connection> connection = mConnectionsByFd.valueAt(connectionIndex); sp<InputWindowHandle> windowHandle = connection->inputWindowHandle; if (windowHandle != NULL) { mTouchState.removeWindow(windowHandle); } if (connection->status == Connection::STATUS_NORMAL) { CancelationOptions options(CancelationOptions::CANCEL_ALL_EVENTS, "application not responding"); Loading Loading @@ -4146,6 +4149,15 @@ void InputDispatcher::TouchState::addOrUpdateWindow(const sp<InputWindowHandle>& touchedWindow.pointerIds = pointerIds; } void InputDispatcher::TouchState::removeWindow(const sp<InputWindowHandle>& windowHandle) { for (size_t i = 0; i < windows.size(); i++) { if (windows.itemAt(i).windowHandle == windowHandle) { windows.removeAt(i); return; } } } void InputDispatcher::TouchState::filterNonAsIsTouchWindows() { for (size_t i = 0 ; i < windows.size(); ) { TouchedWindow& window = windows.editItemAt(i); Loading
services/input/InputDispatcher.h +1 −0 Original line number Diff line number Diff line Loading @@ -926,6 +926,7 @@ private: void copyFrom(const TouchState& other); void addOrUpdateWindow(const sp<InputWindowHandle>& windowHandle, int32_t targetFlags, BitSet32 pointerIds); void removeWindow(const sp<InputWindowHandle>& windowHandle); void filterNonAsIsTouchWindows(); sp<InputWindowHandle> getFirstForegroundWindowHandle() const; bool isSlippery() const; Loading