Initial commit of InputManager and keyboard layout API.

Added a new InputManager service for interacting with input
devices and configuring them.  This will be the focus of
an upcoming refactoring.

Added an API for registering keyboard layouts with the system
based on the use of a broadcast receiver.  Applications can
register their own keyboard layouts simply by declaring a
broadcast receiver in their manifests.

Added the skeleton of a package that will ultimately contain
the keyboard layouts and other input device related resources
that are part of the base system.

Bug: 6110399
Change-Id: Ie01b0ef4adbd5198f6f012e73964bdef3c51805c
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index d758ecae..414ba79 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -45,6 +45,7 @@
 import android.hardware.ISerialManager;
 import android.hardware.SensorManager;
 import android.hardware.SerialManager;
+import android.hardware.input.InputManager;
 import android.hardware.usb.IUsbManager;
 import android.hardware.usb.UsbManager;
 import android.location.CountryDetector;
@@ -321,6 +322,11 @@
                     return createDropBoxManager();
                 }});
 
+        registerService(INPUT_SERVICE, new ServiceFetcher() {
+            public Object createService(ContextImpl ctx) {
+                return new InputManager(ctx);
+            }});
+
         registerService(INPUT_METHOD_SERVICE, new ServiceFetcher() {
                 public Object createService(ContextImpl ctx) {
                     return InputMethodManager.getInstance(ctx);