Skip to content

Commit 15f66ce

Browse files
Christian PeterssonKenneth Andersson
authored andcommitted
Fix that InputDeviceReaderThread that got killed during startup
InputDeviceReaderThread could be killed if a key or touch event was received before initiation made by PolicyThread was made. To solve this, the start call for the InputDeviceReader thread was delayed until initalization of the PolicyThread was done in the WindowManagerService. Change-Id: Ifa7de7ccfadd66ecc2b14c6273e9be32b8e0cb4a
1 parent e99c012 commit 15f66ce

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

services/java/com/android/server/KeyInputQueue.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,9 @@ private void readExcludedDevices() {
299299
mLast = new QueuedEvent();
300300
mFirst.next = mLast;
301301
mLast.prev = mFirst;
302+
}
302303

304+
void start() {
303305
mThread.start();
304306
}
305307

services/java/com/android/server/WindowManagerService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,7 @@ private WindowManagerService(Context context, PowerManagerService pm,
621621
}
622622

623623
mInputThread.start();
624+
mQueue.start();
624625

625626
// Add ourself to the Watchdog monitors.
626627
Watchdog.getInstance().addMonitor(this);

0 commit comments

Comments
 (0)