merge from open-source master

Change-Id: Ib9ec3f3b7418d064b643577156d7d16688b3048d
diff --git a/services/java/com/android/server/KeyInputQueue.java b/services/java/com/android/server/KeyInputQueue.java
index f30346b..6d42141 100644
--- a/services/java/com/android/server/KeyInputQueue.java
+++ b/services/java/com/android/server/KeyInputQueue.java
@@ -310,7 +310,9 @@
         mLast = new QueuedEvent();
         mFirst.next = mLast;
         mLast.prev = mFirst;
+    }
 
+    void start() {
         mThread.start();
     }
 
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java
index 3af77d5..88463b0 100644
--- a/services/java/com/android/server/WindowManagerService.java
+++ b/services/java/com/android/server/WindowManagerService.java
@@ -667,6 +667,7 @@
         }
 
         mInputThread.start();
+        mQueue.start();
 
         // Add ourself to the Watchdog monitors.
         Watchdog.getInstance().addMonitor(this);