Noticed some clicks are fired but going ignored during tests

Unsure what this is but it looks as if the clicks (touch down then up)
are fired too fast and maybe ignored in some cases causing tests
to fail.

Also documentation error for the swipe methods

Change-Id: I2a9bcb32c66a0f771d66d3133522646bb7a25fda
diff --git a/uiautomator/library/src/com/android/uiautomator/core/InteractionController.java b/uiautomator/library/src/com/android/uiautomator/core/InteractionController.java
index dfd46bb..ad73fe8 100644
--- a/uiautomator/library/src/com/android/uiautomator/core/InteractionController.java
+++ b/uiautomator/library/src/com/android/uiautomator/core/InteractionController.java
@@ -70,6 +70,8 @@
 
     private final long mLongPressTimeout;
 
+    private static final long REGULAR_CLICK_LENGTH = 100;
+
     private long mDownTime;
 
     public InteractionController(UiAutomatorBridge bridge) {
@@ -139,6 +141,7 @@
 
         mUiAutomatorBridge.setOperationTime();
         if (touchDown(x, y)) {
+            SystemClock.sleep(REGULAR_CLICK_LENGTH);
             if(touchUp(x, y)) {
                 return true;
             }
@@ -153,8 +156,10 @@
         Runnable command = new Runnable() {
             @Override
             public void run() {
-                touchDown(x, y);
-                touchUp(x, y);
+                if(touchDown(x, y)) {
+                    SystemClock.sleep(REGULAR_CLICK_LENGTH);
+                    touchUp(x, y);
+                }
             }
         };
         Predicate<AccessibilityEvent> predicate = new Predicate<AccessibilityEvent>() {
diff --git a/uiautomator/library/src/com/android/uiautomator/core/UiDevice.java b/uiautomator/library/src/com/android/uiautomator/core/UiDevice.java
index 08016fb..f827bb0 100644
--- a/uiautomator/library/src/com/android/uiautomator/core/UiDevice.java
+++ b/uiautomator/library/src/com/android/uiautomator/core/UiDevice.java
@@ -323,8 +323,8 @@
 
     /**
      * Performs a swipe from one coordinate to another using the number of steps
-     * to determine smoothness and speed. Each step execution is throttled to 10ms
-     * per step. So for a 100 steps, the swipe will take about 1 second to complete.
+     * to determine smoothness and speed. Each step execution is throttled to 5ms
+     * per step. So for a 100 steps, the swipe will take about 1/2 second to complete.
      *
      * @param startX
      * @param startY
@@ -340,7 +340,7 @@
 
     /**
      * Performs a swipe between points in the Point array. Each step execution is throttled
-     * to 10ms per step. So for a 100 steps, the swipe will take about 1 second to complete
+     * to 5ms per step. So for a 100 steps, the swipe will take about 1/2 second to complete
      *
      * @param segments is Point array containing at least one Point object
      * @param segmentSteps steps to inject between two Points
diff --git a/uiautomator/library/src/com/android/uiautomator/core/UiObject.java b/uiautomator/library/src/com/android/uiautomator/core/UiObject.java
index 0899b97..caf3e18 100644
--- a/uiautomator/library/src/com/android/uiautomator/core/UiObject.java
+++ b/uiautomator/library/src/com/android/uiautomator/core/UiObject.java
@@ -165,9 +165,8 @@
      * {@link #scrollToBeginning(int)}, {@link #scrollToEnd(int)}, {@link #scrollBackward()},
      * {@link #scrollForward()}.
      *
-     * @param steps indicates the number of injected move steps into the system. More steps
-     * injected the smoother and slower the motion. Steps are injected about 10ms apart. So
-     * a 100 steps may take more than a second to complete.
+     * @param steps indicates the number of injected move steps into the system. Steps are
+     * injected about 5ms apart. So a 100 steps may take about 1/2 second to complete.
      * @return true of successful
      * @throws UiObjectNotFoundException
      */
@@ -188,7 +187,7 @@
      * <code>scrollable</code> set to <code>true</code> for this operation to be performed.
      *
      * @param steps indicates the number of injected move steps into the system. Steps are
-     * injected about 10ms apart. So a 100 steps may take more than a second to complete.
+     * injected about 5ms apart. So a 100 steps may take about 1/2 second to complete.
      * @return true if successful
      * @throws UiObjectNotFoundException
      */
@@ -209,7 +208,7 @@
      * <code>scrollable</code> set to <code>true</code> for this operation to be performed.
      *
      * @param steps indicates the number of injected move steps into the system. Steps are
-     * injected about 10ms apart. So a 100 steps may take more than a second to complete.
+     * injected about 5ms apart. So a 100 steps may take about 1/2 second to complete.
      * @return true if successful
      * @throws UiObjectNotFoundException
      */
@@ -229,7 +228,7 @@
      * <code>scrollable</code> set to <code>true</code> for this operation to be performed.
      *
      * @param steps indicates the number of injected move steps into the system. Steps are
-     * injected about 10ms apart. So a 100 steps may take more than a second to complete.
+     * injected about 5ms apart. So a 100 steps may take about 1/2 second to complete.
      * @return true if successful
      * @throws UiObjectNotFoundException
      */