summaryrefslogtreecommitdiff
path: root/library/core-src/com/android/uiautomator/core/UiDevice.java
diff options
context:
space:
mode:
Diffstat (limited to 'library/core-src/com/android/uiautomator/core/UiDevice.java')
-rw-r--r--library/core-src/com/android/uiautomator/core/UiDevice.java37
1 files changed, 20 insertions, 17 deletions
diff --git a/library/core-src/com/android/uiautomator/core/UiDevice.java b/library/core-src/com/android/uiautomator/core/UiDevice.java
index fc23cdf..9b69d62 100644
--- a/library/core-src/com/android/uiautomator/core/UiDevice.java
+++ b/library/core-src/com/android/uiautomator/core/UiDevice.java
@@ -90,13 +90,14 @@ public class UiDevice {
}
/**
- * Enabled or disabled the compressed layout hierarchy
+ * Enables or disables layout hierarchy compression.
*
- * Enabling the compressed layout hierarchy, limits the layout hierarchy returned
- * by accessibility, only to the important nodes to automation, removing unnecessary
- * surrounding layout nodes that make viewing and searching the hierarchy inefficient.
+ * If compression is enabled, the layout hierarchy derived from the Acessibility
+ * framework will only contain nodes that are important for uiautomator
+ * testing. Any unnecessary surrounding layout nodes that make viewing
+ * and searching the hierarchy inefficient are removed.
*
- * @param compressed is true to enabled else false to disable
+ * @param compressed true to enable compression; else, false to disable
* @since API Level 18
*/
public void setCompressedLayoutHeirarchy(boolean compressed) {
@@ -343,7 +344,7 @@ public class UiDevice {
}
/**
- * Opens the notification shade
+ * Opens the notification shade.
*
* @return true if successful, else return false
* @since API Level 18
@@ -355,7 +356,7 @@ public class UiDevice {
}
/**
- * Opens the quick settings shade
+ * Opens the Quick Settings shade.
*
* @return true if successful, else return false
* @since API Level 18
@@ -430,16 +431,18 @@ public class UiDevice {
}
/**
- * Performs a swipe from one coordinate to another using the number of steps
- * 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.
+ * Performs a swipe from one coordinate to another coordinate. You can control
+ * the smoothness and speed of the swipe by specifying the number of steps.
+ * Each step execution is throttled to 5 milliseconds per step, so for a 100
+ * steps, the swipe will take around 0.5 seconds to complete.
*
- * @param startX
- * @param startY
- * @param endX
- * @param endY
- * @param steps is the number of move steps sent to the system
- * @return false if the operation fails or the coordinates are invalid
+ * @param startX X-axis value for the starting coordinate
+ * @param startY Y-axis value for the starting coordinate
+ * @param endX X-axis value for the ending coordinate
+ * @param endY Y-axis value for the ending coordinate
+ * @param steps is the number of steps for the swipe action
+ * @return true if swipe is performed, false if the operation fails
+ * or the coordinates are invalid
* @since API Level 18
*/
public boolean drag(int startX, int startY, int endX, int endY, int steps) {
@@ -845,4 +848,4 @@ public class UiDevice {
Tracer.trace(storePath, scale, quality);
return getAutomatorBridge().takeScreenshot(storePath, quality);
}
-}
+