Add a new KEYBOARD_TAP haptic feedback type for very short, low-latency vibration.

The minimum value varies from device to device, so this is useful for defining
the shortest and most efficient vibration. The VibratorService creates a Thread
when playing back vibration patterns, so this allows you to avoid thread creation
and associated scheduling delays by specifying a one-shot duration in the config
file.
diff --git a/api/current.xml b/api/current.xml
index b5e57e7..5b8b40c 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -139895,7 +139895,7 @@
  deprecated="not deprecated"
  visibility="public"
 >
-<parameter name="bundleWithValues" type="android.os.Bundle">
+<parameter name="bundle" type="android.os.Bundle">
 </parameter>
 </constructor>
 <method name="fillInNotifierBundle"
@@ -164736,6 +164736,17 @@
  visibility="public"
 >
 </field>
+<field name="KEYBOARD_TAP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="LONG_PRESS"
  type="int"
  transient="false"
diff --git a/core/java/android/view/HapticFeedbackConstants.java b/core/java/android/view/HapticFeedbackConstants.java
index ccbd8d4..d31c8dc 100644
--- a/core/java/android/view/HapticFeedbackConstants.java
+++ b/core/java/android/view/HapticFeedbackConstants.java
@@ -34,13 +34,18 @@
      * The user has pressed on a virtual on-screen key.
      */
     public static final int VIRTUAL_KEY = 1;
-    
+
     /**
      * The user has hit the barrier point while scrolling a view.
      */
     public static final int SCROLL_BARRIER = 2;
     
     /**
+     * The user has pressed a soft keyboard key.
+     */
+    public static final int KEYBOARD_TAP = 3;
+
+    /**
      * This is a private constant.  Feel free to renumber as desired.
      * @hide
      */
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 7bd07a5..40c78f7 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -138,6 +138,11 @@
         <item>30</item>
     </integer-array>
 
+    <!-- Vibrator pattern for a very short but reliable vibration for soft keyboard tap -->
+    <integer-array name="config_keyboardTapVibePattern">
+        <item>40</item>
+    </integer-array>
+
     <!-- Vibrator pattern for feedback about booting with safe mode disabled -->
     <integer-array name="config_safeModeDisabledVibePattern">
         <item>0</item>