summaryrefslogtreecommitdiffstats
path: root/services/input/InputDispatcher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/input/InputDispatcher.cpp')
-rw-r--r--services/input/InputDispatcher.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/services/input/InputDispatcher.cpp b/services/input/InputDispatcher.cpp
index ce9e14f..22372cf 100644
--- a/services/input/InputDispatcher.cpp
+++ b/services/input/InputDispatcher.cpp
@@ -3919,6 +3919,8 @@ void InputDispatcher::updateDispatchStatisticsLocked(nsecs_t currentTime, const
}
void InputDispatcher::dump(String8& dump) {
+ AutoMutex _l(mLock);
+
dump.append("Input Dispatcher State:\n");
dumpDispatchStateLocked(dump);
@@ -3928,6 +3930,12 @@ void InputDispatcher::dump(String8& dump) {
dump.appendFormat(INDENT2 "KeyRepeatTimeout: %0.1fms\n", mConfig.keyRepeatTimeout * 0.000001f);
}
+void InputDispatcher::monitor() {
+ // Acquire and release the lock to ensure that the dispatcher has not deadlocked.
+ mLock.lock();
+ mLock.unlock();
+}
+
// --- InputDispatcher::Queue ---