Reconcile with jb-mr1-release - do not merge
diff --git a/uiautomator/api/16.txt b/uiautomator/api/16.txt
index 3d62d5e..f3b0eb7 100644
--- a/uiautomator/api/16.txt
+++ b/uiautomator/api/16.txt
@@ -19,10 +19,8 @@
     method public int getDisplayWidth();
     method public static com.android.uiautomator.core.UiDevice getInstance();
     method public java.lang.String getLastTraversedText();
-    method public java.lang.String getProductName();
     method public boolean hasAnyWatcherTriggered();
     method public boolean hasWatcherTriggered(java.lang.String);
-    method public boolean isNaturalOrientation();
     method public boolean isScreenOn() throws android.os.RemoteException;
     method public boolean pressBack();
     method public boolean pressDPadCenter();
@@ -42,9 +40,6 @@
     method public void removeWatcher(java.lang.String);
     method public void resetWatcherTriggers();
     method public void runWatchers();
-    method public void setOrientationLeft() throws android.os.RemoteException;
-    method public void setOrientationNatural() throws android.os.RemoteException;
-    method public void setOrientationRight() throws android.os.RemoteException;
     method public void sleep() throws android.os.RemoteException;
     method public boolean swipe(int, int, int, int, int);
     method public boolean swipe(android.graphics.Point[], int);
@@ -73,7 +68,6 @@
     method public java.lang.String getPackageName() throws com.android.uiautomator.core.UiObjectNotFoundException;
     method public final com.android.uiautomator.core.UiSelector getSelector();
     method public java.lang.String getText() throws com.android.uiautomator.core.UiObjectNotFoundException;
-    method public android.graphics.Rect getVisibleBounds() throws com.android.uiautomator.core.UiObjectNotFoundException;
     method public boolean isCheckable() throws com.android.uiautomator.core.UiObjectNotFoundException;
     method public boolean isChecked() throws com.android.uiautomator.core.UiObjectNotFoundException;
     method public boolean isClickable() throws com.android.uiautomator.core.UiObjectNotFoundException;
@@ -139,7 +133,6 @@
     method public com.android.uiautomator.core.UiSelector childSelector(com.android.uiautomator.core.UiSelector);
     method public com.android.uiautomator.core.UiSelector className(java.lang.String);
     method public com.android.uiautomator.core.UiSelector clickable(boolean);
-    method protected com.android.uiautomator.core.UiSelector cloneSelector();
     method public com.android.uiautomator.core.UiSelector description(java.lang.String);
     method public com.android.uiautomator.core.UiSelector descriptionContains(java.lang.String);
     method public com.android.uiautomator.core.UiSelector descriptionStartsWith(java.lang.String);
diff --git a/uiautomator/api/17.txt b/uiautomator/api/17.txt
index fc11007..a1d80c4 100644
--- a/uiautomator/api/17.txt
+++ b/uiautomator/api/17.txt
@@ -17,7 +17,6 @@
     method public java.lang.String getCurrentPackageName();
     method public int getDisplayHeight();
     method public int getDisplayRotation();
-    method public android.graphics.Point getDisplaySizeDp();
     method public int getDisplayWidth();
     method public static com.android.uiautomator.core.UiDevice getInstance();
     method public java.lang.String getLastTraversedText();
diff --git a/uiautomator/api/current.txt b/uiautomator/api/current.txt
new file mode 100644
index 0000000..a1d80c4
--- /dev/null
+++ b/uiautomator/api/current.txt
@@ -0,0 +1,192 @@
+package com.android.uiautomator.core {
+
+  public class UiCollection extends com.android.uiautomator.core.UiObject {
+    ctor public UiCollection(com.android.uiautomator.core.UiSelector);
+    method public com.android.uiautomator.core.UiObject getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public com.android.uiautomator.core.UiObject getChildByInstance(com.android.uiautomator.core.UiSelector, int) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public com.android.uiautomator.core.UiObject getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public int getChildCount(com.android.uiautomator.core.UiSelector);
+  }
+
+  public class UiDevice {
+    method public void clearLastTraversedText();
+    method public boolean click(int, int);
+    method public void dumpWindowHierarchy(java.lang.String);
+    method public void freezeRotation() throws android.os.RemoteException;
+    method public deprecated java.lang.String getCurrentActivityName();
+    method public java.lang.String getCurrentPackageName();
+    method public int getDisplayHeight();
+    method public int getDisplayRotation();
+    method public int getDisplayWidth();
+    method public static com.android.uiautomator.core.UiDevice getInstance();
+    method public java.lang.String getLastTraversedText();
+    method public java.lang.String getProductName();
+    method public boolean hasAnyWatcherTriggered();
+    method public boolean hasWatcherTriggered(java.lang.String);
+    method public boolean isNaturalOrientation();
+    method public boolean isScreenOn() throws android.os.RemoteException;
+    method public boolean pressBack();
+    method public boolean pressDPadCenter();
+    method public boolean pressDPadDown();
+    method public boolean pressDPadLeft();
+    method public boolean pressDPadRight();
+    method public boolean pressDPadUp();
+    method public boolean pressDelete();
+    method public boolean pressEnter();
+    method public boolean pressHome();
+    method public boolean pressKeyCode(int);
+    method public boolean pressKeyCode(int, int);
+    method public boolean pressMenu();
+    method public boolean pressRecentApps() throws android.os.RemoteException;
+    method public boolean pressSearch();
+    method public void registerWatcher(java.lang.String, com.android.uiautomator.core.UiWatcher);
+    method public void removeWatcher(java.lang.String);
+    method public void resetWatcherTriggers();
+    method public void runWatchers();
+    method public void setOrientationLeft() throws android.os.RemoteException;
+    method public void setOrientationNatural() throws android.os.RemoteException;
+    method public void setOrientationRight() throws android.os.RemoteException;
+    method public void sleep() throws android.os.RemoteException;
+    method public boolean swipe(int, int, int, int, int);
+    method public boolean swipe(android.graphics.Point[], int);
+    method public boolean takeScreenshot(java.io.File);
+    method public boolean takeScreenshot(java.io.File, float, int);
+    method public void unfreezeRotation() throws android.os.RemoteException;
+    method public void waitForIdle();
+    method public void waitForIdle(long);
+    method public boolean waitForWindowUpdate(java.lang.String, long);
+    method public void wakeUp() throws android.os.RemoteException;
+  }
+
+  public class UiObject {
+    ctor public UiObject(com.android.uiautomator.core.UiSelector);
+    method public void clearTextField() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean click() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean clickAndWaitForNewWindow() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean clickAndWaitForNewWindow(long) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean clickBottomRight() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean clickTopLeft() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean exists();
+    method protected android.view.accessibility.AccessibilityNodeInfo findAccessibilityNodeInfo(long);
+    method public android.graphics.Rect getBounds() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public com.android.uiautomator.core.UiObject getChild(com.android.uiautomator.core.UiSelector) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public int getChildCount() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public java.lang.String getContentDescription() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public com.android.uiautomator.core.UiObject getFromParent(com.android.uiautomator.core.UiSelector) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public java.lang.String getPackageName() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public final com.android.uiautomator.core.UiSelector getSelector();
+    method public java.lang.String getText() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public android.graphics.Rect getVisibleBounds() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean isCheckable() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean isChecked() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean isClickable() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean isEnabled() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean isFocusable() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean isFocused() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean isLongClickable() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean isScrollable() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean isSelected() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean longClick() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean longClickBottomRight() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean longClickTopLeft() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean setText(java.lang.String) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean swipeDown(int) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean swipeLeft(int) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean swipeRight(int) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean swipeUp(int) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean waitForExists(long);
+    method public boolean waitUntilGone(long);
+    field protected static final int SWIPE_MARGIN_LIMIT = 5; // 0x5
+    field protected static final long WAIT_FOR_EVENT_TMEOUT = 3000L; // 0xbb8L
+    field protected static final long WAIT_FOR_SELECTOR_POLL = 1000L; // 0x3e8L
+    field protected static final long WAIT_FOR_SELECTOR_TIMEOUT = 10000L; // 0x2710L
+    field protected static final long WAIT_FOR_WINDOW_TMEOUT = 5500L; // 0x157cL
+  }
+
+  public class UiObjectNotFoundException extends java.lang.Exception {
+    ctor public UiObjectNotFoundException(java.lang.String);
+    ctor public UiObjectNotFoundException(java.lang.String, java.lang.Throwable);
+    ctor public UiObjectNotFoundException(java.lang.Throwable);
+  }
+
+  public class UiScrollable extends com.android.uiautomator.core.UiCollection {
+    ctor public UiScrollable(com.android.uiautomator.core.UiSelector);
+    method protected boolean exists(com.android.uiautomator.core.UiSelector);
+    method public boolean flingBackward() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean flingForward() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean flingToBeginning(int) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean flingToEnd(int) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public com.android.uiautomator.core.UiObject getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String, boolean) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public com.android.uiautomator.core.UiObject getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String, boolean) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public int getMaxSearchSwipes();
+    method public double getSwipeDeadZonePercentage();
+    method public boolean scrollBackward() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean scrollBackward(int) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean scrollDescriptionIntoView(java.lang.String) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean scrollForward() throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean scrollForward(int) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean scrollIntoView(com.android.uiautomator.core.UiObject) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean scrollIntoView(com.android.uiautomator.core.UiSelector) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean scrollTextIntoView(java.lang.String) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean scrollToBeginning(int, int) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean scrollToBeginning(int) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean scrollToEnd(int, int) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public boolean scrollToEnd(int) throws com.android.uiautomator.core.UiObjectNotFoundException;
+    method public com.android.uiautomator.core.UiScrollable setAsHorizontalList();
+    method public com.android.uiautomator.core.UiScrollable setAsVerticalList();
+    method public com.android.uiautomator.core.UiScrollable setMaxSearchSwipes(int);
+    method public com.android.uiautomator.core.UiScrollable setSwipeDeadZonePercentage(double);
+  }
+
+  public class UiSelector {
+    ctor public UiSelector();
+    method public com.android.uiautomator.core.UiSelector checked(boolean);
+    method public com.android.uiautomator.core.UiSelector childSelector(com.android.uiautomator.core.UiSelector);
+    method public com.android.uiautomator.core.UiSelector className(java.lang.String);
+    method public com.android.uiautomator.core.UiSelector className(java.lang.Class<T>);
+    method public com.android.uiautomator.core.UiSelector classNameMatches(java.lang.String);
+    method public com.android.uiautomator.core.UiSelector clickable(boolean);
+    method protected com.android.uiautomator.core.UiSelector cloneSelector();
+    method public com.android.uiautomator.core.UiSelector description(java.lang.String);
+    method public com.android.uiautomator.core.UiSelector descriptionContains(java.lang.String);
+    method public com.android.uiautomator.core.UiSelector descriptionMatches(java.lang.String);
+    method public com.android.uiautomator.core.UiSelector descriptionStartsWith(java.lang.String);
+    method public com.android.uiautomator.core.UiSelector enabled(boolean);
+    method public com.android.uiautomator.core.UiSelector focusable(boolean);
+    method public com.android.uiautomator.core.UiSelector focused(boolean);
+    method public com.android.uiautomator.core.UiSelector fromParent(com.android.uiautomator.core.UiSelector);
+    method public com.android.uiautomator.core.UiSelector index(int);
+    method public com.android.uiautomator.core.UiSelector instance(int);
+    method public com.android.uiautomator.core.UiSelector longClickable(boolean);
+    method public com.android.uiautomator.core.UiSelector packageName(java.lang.String);
+    method public com.android.uiautomator.core.UiSelector packageNameMatches(java.lang.String);
+    method public com.android.uiautomator.core.UiSelector scrollable(boolean);
+    method public com.android.uiautomator.core.UiSelector selected(boolean);
+    method public com.android.uiautomator.core.UiSelector text(java.lang.String);
+    method public com.android.uiautomator.core.UiSelector textContains(java.lang.String);
+    method public com.android.uiautomator.core.UiSelector textMatches(java.lang.String);
+    method public com.android.uiautomator.core.UiSelector textStartsWith(java.lang.String);
+  }
+
+  public abstract interface UiWatcher {
+    method public abstract boolean checkForCondition();
+  }
+
+}
+
+package com.android.uiautomator.testrunner {
+
+  public abstract interface IAutomationSupport {
+    method public abstract void sendStatus(int, android.os.Bundle);
+  }
+
+  public class UiAutomatorTestCase extends junit.framework.TestCase {
+    ctor public UiAutomatorTestCase();
+    method public com.android.uiautomator.testrunner.IAutomationSupport getAutomationSupport();
+    method public android.os.Bundle getParams();
+    method public com.android.uiautomator.core.UiDevice getUiDevice();
+    method public void sleep(long);
+  }
+
+}
+
diff --git a/uiautomator/library/src/com/android/uiautomator/core/UiCollection.java b/uiautomator/library/src/com/android/uiautomator/core/UiCollection.java
index e35ab98..20b6d9a 100644
--- a/uiautomator/library/src/com/android/uiautomator/core/UiCollection.java
+++ b/uiautomator/library/src/com/android/uiautomator/core/UiCollection.java
@@ -18,9 +18,16 @@
 /**
  * Used to enumerate a container's UI elements for the purpose of counting,
  * or targeting a sub elements by a child's text or description.
+ * @since API Level 16
  */
 public class UiCollection extends UiObject {
 
+    /**
+     * Constructs an instance as described by the selector
+     *
+     * @param selector
+     * @since API Level 16
+     */
     public UiCollection(UiSelector selector) {
         super(selector);
     }
@@ -38,6 +45,7 @@
      * @param text String of the identifying child contents of of the <code>childPattern</code>
      * @return {@link UiObject} pointing at and instance of <code>childPattern</code>
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public UiObject getChildByDescription(UiSelector childPattern, String text)
             throws UiObjectNotFoundException {
@@ -70,6 +78,7 @@
      * @param childPattern {@link UiSelector} selector of the child pattern to match and return
      * @param instance int the desired matched instance of this <code>childPattern</code>
      * @return {@link UiObject} pointing at and instance of <code>childPattern</code>
+     * @since API Level 16
      */
     public UiObject getChildByInstance(UiSelector childPattern, int instance)
             throws UiObjectNotFoundException {
@@ -92,6 +101,7 @@
      * @param text String of the identifying child contents of of the <code>childPattern</code>
      * @return {@link UiObject} pointing at and instance of <code>childPattern</code>
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public UiObject getChildByText(UiSelector childPattern, String text)
             throws UiObjectNotFoundException {
@@ -122,6 +132,7 @@
      * @param childPattern a {@link UiSelector} that represents the matching child UI
      * elements to count
      * @return the number of matched childPattern under the current {@link UiCollection}
+     * @since API Level 16
      */
     public int getChildCount(UiSelector childPattern) {
         UiSelector patternSelector =
diff --git a/uiautomator/library/src/com/android/uiautomator/core/UiDevice.java b/uiautomator/library/src/com/android/uiautomator/core/UiDevice.java
index 7534b83..09d8af3 100644
--- a/uiautomator/library/src/com/android/uiautomator/core/UiDevice.java
+++ b/uiautomator/library/src/com/android/uiautomator/core/UiDevice.java
@@ -50,6 +50,7 @@
  * UiDevice provides access to state information about the device.
  * You can also use this class to simulate user actions on the device,
  * such as pressing the d-pad or pressing the Home and Menu buttons.
+ * @since API Level 16
  */
 public class UiDevice {
     private static final String LOG_TAG = UiDevice.class.getSimpleName();
@@ -93,6 +94,7 @@
      * Retrieves a singleton instance of UiDevice
      *
      * @return UiDevice instance
+     * @since API Level 16
      */
     public static UiDevice getInstance() {
         if (mDevice == null) {
@@ -107,6 +109,7 @@
      * The returned display size is adjusted per screen rotation
      *
      * @return a Point containing the display size in dp
+     * @hide
      */
     public Point getDisplaySizeDp() {
         Display display = getDefaultDisplay();
@@ -124,13 +127,11 @@
     /**
      * Retrieves the product name of the device.
      *
-     * This method provides information on what type of device the
-     * test is running on. If you are trying to test for different types of
-     * UI screen sizes, your test should use
-     * {@link UiDevice#getDisplaySizeDp()} instead. This value is the same
-     * returned by invoking #adb shell getprop ro.product.name.
+     * This method provides information on what type of device the test is running on. This value is
+     * the same as returned by invoking #adb shell getprop ro.product.name.
      *
      * @return product name of the device
+     * @since API Level 17
      */
     public String getProductName() {
         return Build.PRODUCT;
@@ -149,6 +150,7 @@
      * DOM instead.
      *
      * @return text of the last traversal event, else return an empty string
+     * @since API Level 16
      */
     public String getLastTraversedText() {
         return mUiAutomationBridge.getQueryController().getLastTraversedText();
@@ -157,6 +159,7 @@
     /**
      * Clears the text from the last UI traversal event.
      * See {@link #getLastTraversedText()}.
+     * @since API Level 16
      */
     public void clearLastTraversedText() {
         mUiAutomationBridge.getQueryController().clearLastTraversedText();
@@ -165,6 +168,7 @@
     /**
      * Simulates a short press on the MENU button.
      * @return true if successful, else return false
+     * @since API Level 16
      */
     public boolean pressMenu() {
         waitForIdle();
@@ -176,6 +180,7 @@
     /**
      * Simulates a short press on the BACK button.
      * @return true if successful, else return false
+     * @since API Level 16
      */
     public boolean pressBack() {
         waitForIdle();
@@ -187,6 +192,7 @@
     /**
      * Simulates a short press on the HOME button.
      * @return true if successful, else return false
+     * @since API Level 16
      */
     public boolean pressHome() {
         waitForIdle();
@@ -198,6 +204,7 @@
     /**
      * Simulates a short press on the SEARCH button.
      * @return true if successful, else return false
+     * @since API Level 16
      */
     public boolean pressSearch() {
         return pressKeyCode(KeyEvent.KEYCODE_SEARCH);
@@ -206,6 +213,7 @@
     /**
      * Simulates a short press on the CENTER button.
      * @return true if successful, else return false
+     * @since API Level 16
      */
     public boolean pressDPadCenter() {
         return pressKeyCode(KeyEvent.KEYCODE_DPAD_CENTER);
@@ -214,6 +222,7 @@
     /**
      * Simulates a short press on the DOWN button.
      * @return true if successful, else return false
+     * @since API Level 16
      */
     public boolean pressDPadDown() {
         return pressKeyCode(KeyEvent.KEYCODE_DPAD_DOWN);
@@ -222,6 +231,7 @@
     /**
      * Simulates a short press on the UP button.
      * @return true if successful, else return false
+     * @since API Level 16
      */
     public boolean pressDPadUp() {
         return pressKeyCode(KeyEvent.KEYCODE_DPAD_UP);
@@ -230,6 +240,7 @@
     /**
      * Simulates a short press on the LEFT button.
      * @return true if successful, else return false
+     * @since API Level 16
      */
     public boolean pressDPadLeft() {
         return pressKeyCode(KeyEvent.KEYCODE_DPAD_LEFT);
@@ -238,6 +249,7 @@
     /**
      * Simulates a short press on the RIGHT button.
      * @return true if successful, else return false
+     * @since API Level 16
      */
     public boolean pressDPadRight() {
         return pressKeyCode(KeyEvent.KEYCODE_DPAD_RIGHT);
@@ -246,6 +258,7 @@
     /**
      * Simulates a short press on the DELETE key.
      * @return true if successful, else return false
+     * @since API Level 16
      */
     public boolean pressDelete() {
         return pressKeyCode(KeyEvent.KEYCODE_DEL);
@@ -254,6 +267,7 @@
     /**
      * Simulates a short press on the ENTER key.
      * @return true if successful, else return false
+     * @since API Level 16
      */
     public boolean pressEnter() {
         return pressKeyCode(KeyEvent.KEYCODE_ENTER);
@@ -264,6 +278,7 @@
      *
      * See {@link KeyEvent}
      * @return true if successful, else return false
+     * @since API Level 16
      */
     public boolean pressKeyCode(int keyCode) {
         waitForIdle();
@@ -277,6 +292,7 @@
      * @param keyCode the key code of the event.
      * @param metaState an integer in which each bit set to 1 represents a pressed meta key
      * @return true if successful, else return false
+     * @since API Level 16
      */
     public boolean pressKeyCode(int keyCode, int metaState) {
         waitForIdle();
@@ -288,6 +304,7 @@
      *
      * @return true if successful, else return false
      * @throws RemoteException
+     * @since API Level 16
      */
     public boolean pressRecentApps() throws RemoteException {
         waitForIdle();
@@ -305,6 +322,7 @@
      * Gets the width of the display, in pixels. The width and height details
      * are reported based on the current orientation of the display.
      * @return width in pixels or zero on failure
+     * @since API Level 16
      */
     public int getDisplayWidth() {
         Display display = getDefaultDisplay();
@@ -317,6 +335,7 @@
      * Gets the height of the display, in pixels. The size is adjusted based
      * on the current orientation of the display.
      * @return height in pixels or zero on failure
+     * @since API Level 16
      */
     public int getDisplayHeight() {
         Display display = getDefaultDisplay();
@@ -331,6 +350,7 @@
      * @param x coordinate
      * @param y coordinate
      * @return true if the click succeeded else false
+     * @since API Level 16
      */
     public boolean click(int x, int y) {
         if (x >= getDisplayWidth() || y >= getDisplayHeight()) {
@@ -350,6 +370,7 @@
      * @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
+     * @since API Level 16
      */
     public boolean swipe(int startX, int startY, int endX, int endY, int steps) {
         return mUiAutomationBridge.getInteractionController()
@@ -363,6 +384,7 @@
      * @param segments is Point array containing at least one Point object
      * @param segmentSteps steps to inject between two Points
      * @return true on success
+     * @since API Level 16
      */
     public boolean swipe(Point[] segments, int segmentSteps) {
         return mUiAutomationBridge.getInteractionController().swipe(segments, segmentSteps);
@@ -371,6 +393,7 @@
     /**
      * Waits for the current application to idle.
      * Default wait timeout is 10 seconds
+     * @since API Level 16
      */
     public void waitForIdle() {
         waitForIdle(DEFAULT_TIMEOUT_MILLIS);
@@ -379,6 +402,7 @@
     /**
      * Waits for the current application to idle.
      * @param timeout in milliseconds
+     * @since API Level 16
      */
     public void waitForIdle(long time) {
         mUiAutomationBridge.waitForIdle(time);
@@ -388,6 +412,7 @@
      * Retrieves the last activity to report accessibility events.
      * @deprecated The results returned should be considered unreliable
      * @return String name of activity
+     * @since API Level 16
      */
     @Deprecated
     public String getCurrentActivityName() {
@@ -397,6 +422,7 @@
     /**
      * Retrieves the name of the last package to report accessibility events.
      * @return String name of package
+     * @since API Level 16
      */
     public String getCurrentPackageName() {
         return mUiAutomationBridge.getQueryController().getCurrentPackageName();
@@ -408,6 +434,7 @@
      *
      * @param name to register the UiWatcher
      * @param watcher {@link UiWatcher}
+     * @since API Level 16
      */
     public void registerWatcher(String name, UiWatcher watcher) {
         if (mInWatcherContext) {
@@ -422,6 +449,7 @@
      * See {@link #registerWatcher(String, UiWatcher)}
      * @param name used to register the UiWatcher
      * @throws UiAutomationException
+     * @since API Level 16
      */
     public void removeWatcher(String name) {
         if (mInWatcherContext) {
@@ -433,6 +461,7 @@
     /**
      * This method forces all registered watchers to run.
      * See {@link #registerWatcher(String, UiWatcher)}
+     * @since API Level 16
      */
     public void runWatchers() {
         if (mInWatcherContext) {
@@ -461,6 +490,7 @@
      * If a UiWatcher runs and its {@link UiWatcher#checkForCondition()} call
      * returned <code>true</code>, then the UiWatcher is considered triggered.
      * See {@link #registerWatcher(String, UiWatcher)}
+     * @since API Level 16
      */
     public void resetWatcherTriggers() {
         mWatchersTriggers.clear();
@@ -475,6 +505,7 @@
      *
      * @param watcherName
      * @return true if triggered else false
+     * @since API Level 16
      */
     public boolean hasWatcherTriggered(String watcherName) {
         return mWatchersTriggers.contains(watcherName);
@@ -485,6 +516,7 @@
      *
      * See {@link #registerWatcher(String, UiWatcher)}
      * See {@link #hasWatcherTriggered(String)}
+     * @since API Level 16
      */
     public boolean hasAnyWatcherTriggered() {
         return mWatchersTriggers.size() > 0;
@@ -504,6 +536,7 @@
      * Check if the device is in its natural orientation. This is determined by checking if the
      * orientation is at 0 or 180 degrees.
      * @return true if it is in natural orientation
+     * @since API Level 17
      */
     public boolean isNaturalOrientation() {
         Display display = getDefaultDisplay();
@@ -514,6 +547,7 @@
     /**
      * Returns the current rotation of the display, as defined in {@link Surface}
      * @return
+     * @since API Level 17
      */
     public int getDisplayRotation() {
         return getDefaultDisplay().getRotation();
@@ -523,6 +557,7 @@
      * Disables the sensors and freezes the device rotation at its
      * current rotation state.
      * @throws RemoteException
+     * @since API Level 16
      */
     public void freezeRotation() throws RemoteException {
         getAutomatorBridge().getInteractionController().freezeRotation();
@@ -545,6 +580,7 @@
      * If you want to un-freeze the rotation and re-enable the sensors
      * see {@link #unfreezeRotation()}.
      * @throws RemoteException
+     * @since API Level 17
      */
     public void setOrientationLeft() throws RemoteException {
         getAutomatorBridge().getInteractionController().setRotationLeft();
@@ -557,6 +593,7 @@
      * If you want to un-freeze the rotation and re-enable the sensors
      * see {@link #unfreezeRotation()}.
      * @throws RemoteException
+     * @since API Level 17
      */
     public void setOrientationRight() throws RemoteException {
         getAutomatorBridge().getInteractionController().setRotationRight();
@@ -569,6 +606,7 @@
      * If you want to un-freeze the rotation and re-enable the sensors
      * see {@link #unfreezeRotation()}.
      * @throws RemoteException
+     * @since API Level 17
      */
     public void setOrientationNatural() throws RemoteException {
         getAutomatorBridge().getInteractionController().setRotationNatural();
@@ -581,6 +619,7 @@
      * If the screen was OFF and it just got turned ON, this method will insert a 500ms delay
      * to allow the device time to wake up and accept input.
      * @throws RemoteException
+     * @since API Level 16
      */
     public void wakeUp() throws RemoteException {
         if(getAutomatorBridge().getInteractionController().wakeDevice()) {
@@ -595,6 +634,7 @@
      *
      * @return true if the screen is ON else false
      * @throws RemoteException
+     * @since API Level 16
      */
     public boolean isScreenOn() throws RemoteException {
         return getAutomatorBridge().getInteractionController().isScreenOn();
@@ -605,6 +645,7 @@
      * it does nothing if the screen is already OFF.
      *
      * @throws RemoteException
+     * @since API Level 16
      */
     public void sleep() throws RemoteException {
         getAutomatorBridge().getInteractionController().sleepDevice();
@@ -615,6 +656,7 @@
      * The file root location is /data/local/tmp
      *
      * @param fileName
+     * @since API Level 16
      */
     public void dumpWindowHierarchy(String fileName) {
         AccessibilityNodeInfo root =
@@ -638,6 +680,7 @@
      *
      * @return true if a window update occurred, false if timeout has elapsed or if the current
      *         window does not have the specified package name
+     * @since API Level 16
      */
     public boolean waitForWindowUpdate(final String packageName, long timeout) {
         if (packageName != null) {
@@ -697,7 +740,8 @@
      * The screenshot is adjusted per screen rotation
      *
      * @param storePath where the PNG should be written to
-     * @return
+     * @return true if screen shot is created successfully, false otherwise
+     * @since API Level 17
      */
     public boolean takeScreenshot(File storePath) {
         return takeScreenshot(storePath, 1.0f, 90);
@@ -711,7 +755,8 @@
      * @param storePath where the PNG should be written to
      * @param scale scale the screenshot down if needed; 1.0f for original size
      * @param quality quality of the PNG compression; range: 0-100
-     * @return
+     * @return true if screen shot is created successfully, false otherwise
+     * @since API Level 17
      */
     public boolean takeScreenshot(File storePath, float scale, int quality) {
         // This is from com.android.systemui.screenshot.GlobalScreenshot#takeScreenshot
diff --git a/uiautomator/library/src/com/android/uiautomator/core/UiObject.java b/uiautomator/library/src/com/android/uiautomator/core/UiObject.java
index 90c8107..42819e2 100644
--- a/uiautomator/library/src/com/android/uiautomator/core/UiObject.java
+++ b/uiautomator/library/src/com/android/uiautomator/core/UiObject.java
@@ -29,14 +29,30 @@
  * locate a matching UI element at runtime based on the {@link UiSelector} properties specified in
  * its constructor. Since a UiObject is a representative for a UI element, it can
  * be reused for different views with matching UI elements.
+ * @since API Level 16
  */
 public class UiObject {
     private static final String LOG_TAG = UiObject.class.getSimpleName();
+    /**
+     * @since API Level 16
+     **/
     protected static final long WAIT_FOR_SELECTOR_TIMEOUT = 10 * 1000;
+    /**
+     * @since API Level 16
+     **/
     protected static final long WAIT_FOR_SELECTOR_POLL = 1000;
     // set a default timeout to 5.5s, since ANR threshold is 5s
+    /**
+     * @since API Level 16
+     **/
     protected static final long WAIT_FOR_WINDOW_TMEOUT = 5500;
+    /**
+     * @since API Level 17
+     **/
     protected static final long WAIT_FOR_EVENT_TMEOUT = 3 * 1000;
+    /**
+     * @since API Level 16
+     **/
     protected static final int SWIPE_MARGIN_LIMIT = 5;
 
     private final UiSelector mSelector;
@@ -45,8 +61,8 @@
     /**
      * Constructs a UiObject to represent a specific UI element matched by the specified
      * {@link UiSelector} selector properties.
-     *
      * @param selector
+     * @since API Level 16
      */
     public UiObject(UiSelector selector) {
         mUiAutomationBridge = UiDevice.getInstance().getAutomatorBridge();
@@ -58,6 +74,7 @@
      * to its logs if needed. <code>getSelector().toString();</code>
      *
      * @return {@link UiSelector}
+     * @since API Level 16
      */
     public final UiSelector getSelector() {
         return new UiSelector(mSelector);
@@ -89,6 +106,7 @@
      *
      * @param selector for UI element to match
      * @return a new UiObject representing the matched UI element
+     * @since API Level 16
      */
     public UiObject getChild(UiSelector selector) throws UiObjectNotFoundException {
         return new UiObject(getSelector().childSelector(selector));
@@ -103,6 +121,7 @@
      * @param selector for the UI element to match
      * @return a new UiObject representing the matched UI element
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public UiObject getFromParent(UiSelector selector) throws UiObjectNotFoundException {
         return new UiObject(getSelector().fromParent(selector));
@@ -114,6 +133,7 @@
      *
      * @return the count of child UI elements.
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public int getChildCount() throws UiObjectNotFoundException {
         AccessibilityNodeInfo node = findAccessibilityNodeInfo(WAIT_FOR_SELECTOR_TIMEOUT);
@@ -130,6 +150,7 @@
      * @param selector {@link UiSelector}
      * @param timeout in milliseconds
      * @return AccessibilityNodeInfo if found else null
+     * @since API Level 16
      */
     protected AccessibilityNodeInfo findAccessibilityNodeInfo(long timeout) {
         AccessibilityNodeInfo node = null;
@@ -167,6 +188,7 @@
      * injected about 5ms apart. So a 100 steps may take about 1/2 second to complete.
      * @return true of successful
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public boolean swipeUp(int steps) throws UiObjectNotFoundException {
         Rect rect = getVisibleBounds();
@@ -188,6 +210,7 @@
      * injected about 5ms apart. So a 100 steps may take about 1/2 second to complete.
      * @return true if successful
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public boolean swipeDown(int steps) throws UiObjectNotFoundException {
         Rect rect = getVisibleBounds();
@@ -209,6 +232,7 @@
      * injected about 5ms apart. So a 100 steps may take about 1/2 second to complete.
      * @return true if successful
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public boolean swipeLeft(int steps) throws UiObjectNotFoundException {
         Rect rect = getVisibleBounds();
@@ -229,6 +253,7 @@
      * injected about 5ms apart. So a 100 steps may take about 1/2 second to complete.
      * @return true if successful
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public boolean swipeRight(int steps) throws UiObjectNotFoundException {
         Rect rect = getVisibleBounds();
@@ -293,6 +318,7 @@
      *
      * @return true id successful else false
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public boolean click() throws UiObjectNotFoundException {
         AccessibilityNodeInfo node = findAccessibilityNodeInfo(WAIT_FOR_SELECTOR_TIMEOUT);
@@ -312,6 +338,7 @@
      *
      * @return true if the event was triggered, else false
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public boolean clickAndWaitForNewWindow() throws UiObjectNotFoundException {
         return clickAndWaitForNewWindow(WAIT_FOR_WINDOW_TMEOUT);
@@ -330,6 +357,7 @@
      * @param timeout timeout before giving up on waiting for a new window
      * @return true if the event was triggered, else false
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public boolean clickAndWaitForNewWindow(long timeout) throws UiObjectNotFoundException {
         AccessibilityNodeInfo node = findAccessibilityNodeInfo(WAIT_FOR_SELECTOR_TIMEOUT);
@@ -346,6 +374,7 @@
      *
      * @return true on success
      * @throws Exception
+     * @since API Level 16
      */
     public boolean clickTopLeft() throws UiObjectNotFoundException {
         AccessibilityNodeInfo node = findAccessibilityNodeInfo(WAIT_FOR_SELECTOR_TIMEOUT);
@@ -361,6 +390,7 @@
      *
      * @return true if operation was successful
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public boolean longClickBottomRight() throws UiObjectNotFoundException  {
         AccessibilityNodeInfo node = findAccessibilityNodeInfo(WAIT_FOR_SELECTOR_TIMEOUT);
@@ -376,6 +406,7 @@
      *
      * @return true on success
      * @throws Exception
+     * @since API Level 16
      */
     public boolean clickBottomRight() throws UiObjectNotFoundException {
         AccessibilityNodeInfo node = findAccessibilityNodeInfo(WAIT_FOR_SELECTOR_TIMEOUT);
@@ -391,6 +422,7 @@
      *
      * @return true if operation was successful
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public boolean longClick() throws UiObjectNotFoundException  {
         AccessibilityNodeInfo node = findAccessibilityNodeInfo(WAIT_FOR_SELECTOR_TIMEOUT);
@@ -406,6 +438,7 @@
      *
      * @return true if operation was successful
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public boolean longClickTopLeft() throws UiObjectNotFoundException {
         AccessibilityNodeInfo node = findAccessibilityNodeInfo(WAIT_FOR_SELECTOR_TIMEOUT);
@@ -421,6 +454,7 @@
      *
      * @return text value of the current node represented by this UiObject
      * @throws UiObjectNotFoundException if no match could be found
+     * @since API Level 16
      */
     public String getText() throws UiObjectNotFoundException {
         AccessibilityNodeInfo node = findAccessibilityNodeInfo(WAIT_FOR_SELECTOR_TIMEOUT);
@@ -437,6 +471,7 @@
      *
      * @return value of node attribute "content_desc"
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public String getContentDescription() throws UiObjectNotFoundException {
         AccessibilityNodeInfo node = findAccessibilityNodeInfo(WAIT_FOR_SELECTOR_TIMEOUT);
@@ -461,6 +496,7 @@
      * @param text string to set
      * @return true if operation is successful
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public boolean setText(String text) throws UiObjectNotFoundException {
         clearTextField();
@@ -484,6 +520,7 @@
      * Also, not all editable fields support the long-press functionality.
      *
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public void clearTextField() throws UiObjectNotFoundException {
         // long click left + center
@@ -507,6 +544,7 @@
      * Check if the UI element's <code>checked</code> property is currently true
      *
      * @return true if it is else false
+     * @since API Level 16
      */
     public boolean isChecked() throws UiObjectNotFoundException {
         AccessibilityNodeInfo node = findAccessibilityNodeInfo(WAIT_FOR_SELECTOR_TIMEOUT);
@@ -521,6 +559,7 @@
      *
      * @return true if it is else false
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public boolean isSelected() throws UiObjectNotFoundException {
         AccessibilityNodeInfo node = findAccessibilityNodeInfo(WAIT_FOR_SELECTOR_TIMEOUT);
@@ -535,6 +574,7 @@
      *
      * @return true if it is else false
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public boolean isCheckable() throws UiObjectNotFoundException {
         AccessibilityNodeInfo node = findAccessibilityNodeInfo(WAIT_FOR_SELECTOR_TIMEOUT);
@@ -549,6 +589,7 @@
      *
      * @return true if it is else false
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public boolean isEnabled() throws UiObjectNotFoundException {
         AccessibilityNodeInfo node = findAccessibilityNodeInfo(WAIT_FOR_SELECTOR_TIMEOUT);
@@ -563,6 +604,7 @@
      *
      * @return true if it is else false
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public boolean isClickable() throws UiObjectNotFoundException {
         AccessibilityNodeInfo node = findAccessibilityNodeInfo(WAIT_FOR_SELECTOR_TIMEOUT);
@@ -577,6 +619,7 @@
      *
      * @return true if it is else false
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public boolean isFocused() throws UiObjectNotFoundException {
         AccessibilityNodeInfo node = findAccessibilityNodeInfo(WAIT_FOR_SELECTOR_TIMEOUT);
@@ -591,6 +634,7 @@
      *
      * @return true if it is else false
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public boolean isFocusable() throws UiObjectNotFoundException {
         AccessibilityNodeInfo node = findAccessibilityNodeInfo(WAIT_FOR_SELECTOR_TIMEOUT);
@@ -605,6 +649,7 @@
      *
      * @return true if it is else false
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public boolean isScrollable() throws UiObjectNotFoundException {
         AccessibilityNodeInfo node = findAccessibilityNodeInfo(WAIT_FOR_SELECTOR_TIMEOUT);
@@ -619,6 +664,7 @@
      *
      * @return true if it is else false
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public boolean isLongClickable() throws UiObjectNotFoundException {
         AccessibilityNodeInfo node = findAccessibilityNodeInfo(WAIT_FOR_SELECTOR_TIMEOUT);
@@ -633,6 +679,7 @@
      *
      * @return true if it is else false
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public String getPackageName() throws UiObjectNotFoundException {
         AccessibilityNodeInfo node = findAccessibilityNodeInfo(WAIT_FOR_SELECTOR_TIMEOUT);
@@ -651,6 +698,7 @@
      * @return Rect
      * @throws UiObjectNotFoundException
      * @see {@link #getBound()}
+     * @since API Level 17
      */
     public Rect getVisibleBounds() throws UiObjectNotFoundException {
         AccessibilityNodeInfo node = findAccessibilityNodeInfo(WAIT_FOR_SELECTOR_TIMEOUT);
@@ -665,6 +713,7 @@
      *
      * @return Rect
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public Rect getBounds() throws UiObjectNotFoundException {
         AccessibilityNodeInfo node = findAccessibilityNodeInfo(WAIT_FOR_SELECTOR_TIMEOUT);
@@ -686,6 +735,7 @@
      *
      * @param timeout the amount of time to wait (in milliseconds)
      * @return true if the UI element is displayed, else false if timeout elapsed while waiting
+     * @since API Level 16
      */
     public boolean waitForExists(long timeout) {
         if(findAccessibilityNodeInfo(timeout) != null) {
@@ -710,6 +760,7 @@
      * @param timeout time to wait (in milliseconds)
      * @return true if the element is gone before timeout elapsed, else false if timeout elapsed
      * but a matching element is still found.
+     * @since API Level 16
      */
     public boolean waitUntilGone(long timeout) {
         long startMills = SystemClock.uptimeMillis();
@@ -733,6 +784,7 @@
      * {@link #waitForExists(long)}.
      *
      * @return true if the UI element represented by this UiObject does exist
+     * @since API Level 16
      */
     public boolean exists() {
         return waitForExists(0);
diff --git a/uiautomator/library/src/com/android/uiautomator/core/UiObjectNotFoundException.java b/uiautomator/library/src/com/android/uiautomator/core/UiObjectNotFoundException.java
index 63ba549..fc0891b 100644
--- a/uiautomator/library/src/com/android/uiautomator/core/UiObjectNotFoundException.java
+++ b/uiautomator/library/src/com/android/uiautomator/core/UiObjectNotFoundException.java
@@ -19,19 +19,29 @@
 /**
  * Generated in test runs when a {@link UiSelector} selector could not be matched
  * to any UI element displayed.
+ * @since API Level 16
  */
 public class UiObjectNotFoundException extends Exception {
 
     private static final long serialVersionUID = 1L;
 
+    /**
+     * @since API Level 16
+     **/
     public UiObjectNotFoundException(String msg) {
         super(msg);
     }
 
+    /**
+     * @since API Level 16
+     **/
     public UiObjectNotFoundException(String detailMessage, Throwable throwable) {
         super(detailMessage, throwable);
     }
 
+    /**
+     * @since API Level 16
+     **/
     public UiObjectNotFoundException(Throwable throwable) {
         super(throwable);
     }
diff --git a/uiautomator/library/src/com/android/uiautomator/core/UiScrollable.java b/uiautomator/library/src/com/android/uiautomator/core/UiScrollable.java
index 58c6ea3..607ae6f 100644
--- a/uiautomator/library/src/com/android/uiautomator/core/UiScrollable.java
+++ b/uiautomator/library/src/com/android/uiautomator/core/UiScrollable.java
@@ -22,6 +22,7 @@
 /**
  * UiScrollable is a {@link UiCollection} and provides support for searching for items in a
  * scrollable UI elements. Used with horizontally or vertically scrollable UI.
+ * @since API Level 16
  */
 public class UiScrollable extends UiCollection {
     private static final String LOG_TAG = UiScrollable.class.getSimpleName();
@@ -48,6 +49,7 @@
      * the items in the container will require specifying UiSelector as an item selector.
      *
      * @param container a {@link UiSelector} selector
+     * @since API Level 16
      */
     public UiScrollable(UiSelector container) {
         // wrap the container selector with container so that QueryController can handle
@@ -58,6 +60,7 @@
     /**
      * Set the direction of swipes when performing scroll search
      * @return reference to itself
+     * @since API Level 16
      */
     public UiScrollable setAsVerticalList() {
         mIsVerticalList = true;
@@ -67,6 +70,7 @@
     /**
      * Set the direction of swipes when performing scroll search
      * @return reference to itself
+     * @since API Level 16
      */
     public UiScrollable setAsHorizontalList() {
         mIsVerticalList = false;
@@ -79,6 +83,7 @@
      *
      * @param selector
      * @return true if found else false
+     * @since API Level 16
      */
     protected boolean exists(UiSelector selector) {
         if(getQueryController().findAccessibilityNodeInfo(selector) != null) {
@@ -100,6 +105,7 @@
      * @param text String of the identifying child contents of of the <code>childPattern</code>
      * @return {@link UiObject} pointing at and instance of <code>childPattern</code>
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     @Override
     public UiObject getChildByDescription(UiSelector childPattern, String text)
@@ -115,6 +121,7 @@
      * @param allowScrollSearch set to true if scrolling is allowed
      * @return {@link UiObject} pointing at and instance of <code>childPattern</code>
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public UiObject getChildByDescription(UiSelector childPattern, String text,
             boolean allowScrollSearch) throws UiObjectNotFoundException {
@@ -136,6 +143,7 @@
      * @param childPattern {@link UiSelector} selector of the child pattern to match and return
      * @param instance int the desired matched instance of this <code>childPattern</code>
      * @return {@link UiObject} pointing at and instance of <code>childPattern</code>
+     * @since API Level 16
      */
     @Override
     public UiObject getChildByInstance(UiSelector childPattern, int instance)
@@ -159,6 +167,7 @@
      * @param text String of the identifying child contents of of the <code>childPattern</code>
      * @return {@link UiObject} pointing at and instance of <code>childPattern</code>
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     @Override
     public UiObject getChildByText(UiSelector childPattern, String text)
@@ -174,6 +183,7 @@
      * @param allowScrollSearch set to true if scrolling is allowed
      * @return {@link UiObject} pointing at and instance of <code>childPattern</code>
      * @throws UiObjectNotFoundException
+     * @since API Level 16
      */
     public UiObject getChildByText(UiSelector childPattern, String text, boolean allowScrollSearch)
             throws UiObjectNotFoundException {
@@ -193,6 +203,7 @@
      *
      * @param text to look for anywhere within the contents of this scrollable.
      * @return true if item us found else false
+     * @since API Level 16
      */
     public boolean scrollDescriptionIntoView(String text) throws UiObjectNotFoundException {
         return scrollIntoView(new UiSelector().description(text));
@@ -204,6 +215,7 @@
      *
      * @param obj {@link UiObject}
      * @return true if the item was found and now is in view else false
+     * @since API Level 16
      */
     public boolean scrollIntoView(UiObject obj) throws UiObjectNotFoundException {
         return scrollIntoView(obj.getSelector());
@@ -215,6 +227,7 @@
      *
      * @param selector {@link UiSelector} selector
      * @return true if the item was found and now is in view else false
+     * @since API Level 16
      */
     public boolean scrollIntoView(UiSelector selector) throws UiObjectNotFoundException {
         // if we happen to be on top of the text we want then return here
@@ -245,6 +258,7 @@
      *
      * @param text to look for
      * @return true if item us found else false
+     * @since API Level 16
      */
     public boolean scrollTextIntoView(String text) throws UiObjectNotFoundException {
         return scrollIntoView(new UiSelector().text(text));
@@ -258,6 +272,7 @@
      *
      * @param swipes is the number of search swipes until abort
      * @return reference to itself
+     * @since API Level 16
      */
     public UiScrollable setMaxSearchSwipes(int swipes) {
         mMaxSearchSwipes = swipes;
@@ -271,6 +286,7 @@
      * See {@link #setMaxSearchSwipes(int)}
      *
      * @return max value of the number of swipes currently allowed during a scroll search
+     * @since API Level 16
      */
     public int getMaxSearchSwipes() {
         return mMaxSearchSwipes;
@@ -280,6 +296,7 @@
      * A convenience version of {@link UiScrollable#scrollForward(int)}, performs a fling
      *
      * @return true if scrolled and false if can't scroll anymore
+     * @since API Level 16
      */
     public boolean flingForward() throws UiObjectNotFoundException {
         return scrollForward(FLING_STEPS);
@@ -289,6 +306,7 @@
      * A convenience version of {@link UiScrollable#scrollForward(int)}, performs a regular scroll
      *
      * @return true if scrolled and false if can't scroll anymore
+     * @since API Level 16
      */
     public boolean scrollForward() throws UiObjectNotFoundException {
         return scrollForward(SCROLL_STEPS);
@@ -303,6 +321,7 @@
      *
      * @param steps use steps to control the speed, so that it may be a scroll, or fling
      * @return true if scrolled and false if can't scroll anymore
+     * @since API Level 16
      */
     public boolean scrollForward(int steps) throws UiObjectNotFoundException {
         Log.d(LOG_TAG, "scrollForward() on selector = " + getSelector());
@@ -343,6 +362,7 @@
      * See {@link UiScrollable#scrollBackward(int)}
      *
      * @return true if scrolled and false if can't scroll anymore
+     * @since API Level 16
      */
     public boolean flingBackward() throws UiObjectNotFoundException {
         return scrollBackward(FLING_STEPS);
@@ -352,6 +372,7 @@
      * See {@link UiScrollable#scrollBackward(int)}
      *
      * @return true if scrolled and false if can't scroll anymore
+     * @since API Level 16
      */
     public boolean scrollBackward() throws UiObjectNotFoundException {
         return scrollBackward(SCROLL_STEPS);
@@ -366,6 +387,7 @@
      *
      * @param steps use steps to control the speed, so that it may be a scroll, or fling
      * @return true if scrolled and false if can't scroll anymore
+     * @since API Level 16
      */
     public boolean scrollBackward(int steps) throws UiObjectNotFoundException {
         Log.d(LOG_TAG, "scrollBackward() on selector = " + getSelector());
@@ -411,6 +433,7 @@
      *
      * @param steps use steps to control the speed, so that it may be a scroll, or fling
      * @return true on scrolled else false
+     * @since API Level 16
      */
     public boolean scrollToBeginning(int maxSwipes, int steps) throws UiObjectNotFoundException {
         Log.d(LOG_TAG, "scrollToBeginning() on selector = " + getSelector());
@@ -428,6 +451,7 @@
      *
      * @param maxSwipes
      * @return true on scrolled else false
+     * @since API Level 16
      */
     public boolean scrollToBeginning(int maxSwipes) throws UiObjectNotFoundException {
         return scrollToBeginning(maxSwipes, SCROLL_STEPS);
@@ -438,6 +462,7 @@
      *
      * @param maxSwipes
      * @return true on scrolled else false
+     * @since API Level 16
      */
     public boolean flingToBeginning(int maxSwipes) throws UiObjectNotFoundException {
         return scrollToBeginning(maxSwipes, FLING_STEPS);
@@ -450,6 +475,7 @@
      *
      * @param steps use steps to control the speed, so that it may be a scroll, or fling
      * @return true on scrolled else false
+     * @since API Level 16
      */
     public boolean scrollToEnd(int maxSwipes, int steps) throws UiObjectNotFoundException {
         // protect against potential hanging and return after preset attempts
@@ -466,6 +492,7 @@
      *
      * @param maxSwipes
      * @return true on scrolled else false
+     * @since API Level 16
      */
     public boolean scrollToEnd(int maxSwipes) throws UiObjectNotFoundException {
         return scrollToEnd(maxSwipes, SCROLL_STEPS);
@@ -476,6 +503,7 @@
      *
      * @param maxSwipes
      * @return true on scrolled else false
+     * @since API Level 16
      */
     public boolean flingToEnd(int maxSwipes) throws UiObjectNotFoundException {
         return scrollToEnd(maxSwipes, FLING_STEPS);
@@ -493,6 +521,7 @@
      * started at a point too near to the edge. The default is 10% from either edge.
      *
      * @return a value between 0 and 1
+     * @since API Level 16
      */
     public double getSwipeDeadZonePercentage() {
         return mSwipeDeadZonePercentage;
@@ -511,6 +540,7 @@
      *
      * @param swipeDeadZonePercentage is a value between 0 and 1
      * @return reference to itself
+     * @since API Level 16
      */
     public UiScrollable setSwipeDeadZonePercentage(double swipeDeadZonePercentage) {
         mSwipeDeadZonePercentage = swipeDeadZonePercentage;
diff --git a/uiautomator/library/src/com/android/uiautomator/core/UiSelector.java b/uiautomator/library/src/com/android/uiautomator/core/UiSelector.java
index 03e0d26..d240ce9 100644
--- a/uiautomator/library/src/com/android/uiautomator/core/UiSelector.java
+++ b/uiautomator/library/src/com/android/uiautomator/core/UiSelector.java
@@ -26,6 +26,7 @@
  * selected, enabled, checked etc. Additionally UiSelector allows targeting of UI
  * elements within a specific display hierarchies to distinguish similar elements
  * based in the hierarchies they're in.
+ * @since API Level 16
  */
 public class UiSelector {
     static final int SELECTOR_NIL = 0;
@@ -60,6 +61,9 @@
 
     private SparseArray<Object> mSelectorAttributes = new SparseArray<Object>();
 
+    /**
+     * @since API Level 16
+     */
     public UiSelector() {
     }
 
@@ -67,6 +71,9 @@
         mSelectorAttributes = selector.cloneSelector().mSelectorAttributes;
     }
 
+    /**
+     * @since API Level 17
+     */
     protected UiSelector cloneSelector() {
         UiSelector ret = new UiSelector();
         ret.mSelectorAttributes = mSelectorAttributes.clone();
@@ -101,6 +108,7 @@
      *
      * @param text Value to match
      * @return UiSelector with the specified search criteria
+     * @since API Level 16
      */
     public UiSelector text(String text) {
         return buildSelector(SELECTOR_TEXT, text);
@@ -115,6 +123,7 @@
      *
      * @param regular expression
      * @return UiSelector with the specified search criteria
+     * @since API Level 17
      */
     public UiSelector textMatches(String regex) {
         return buildSelector(SELECTOR_TEXT_REGEX, regex);
@@ -130,6 +139,7 @@
      *
      * @param text
      * @return UiSelector with this added search criterion
+     * @since API Level 16
      */
     public UiSelector textStartsWith(String text) {
         return buildSelector(SELECTOR_START_TEXT, text);
@@ -144,6 +154,7 @@
      *
      * @param text Value to match
      * @return UiSelector with the specified search criteria
+     * @since API Level 16
      */
     public UiSelector textContains(String text) {
         return buildSelector(SELECTOR_CONTAINS_TEXT, text);
@@ -155,6 +166,7 @@
      *
      * @param className Value to match
      * @return UiSelector with the specified search criteria
+     * @since API Level 16
      */
     public UiSelector className(String className) {
         return buildSelector(SELECTOR_CLASS, className);
@@ -166,6 +178,7 @@
      *
      * @param regular expression
      * @return UiSelector with the specified search criteria
+     * @since API Level 17
      */
     public UiSelector classNameMatches(String regex) {
         return buildSelector(SELECTOR_CLASS_REGEX, regex);
@@ -177,6 +190,7 @@
      *
      * @param class type
      * @return UiSelector with the specified search criteria
+     * @since API Level 17
      */
     public <T> UiSelector className(Class<T> type) {
         return buildSelector(SELECTOR_CLASS, type.getName());
@@ -197,6 +211,7 @@
      *
      * @param desc Value to match
      * @return UiSelector with the specified search criteria
+     * @since API Level 16
      */
     public UiSelector description(String desc) {
         return buildSelector(SELECTOR_DESCRIPTION, desc);
@@ -215,6 +230,7 @@
      *
      * @param regular expression
      * @return UiSelector with the specified search criteria
+     * @since API Level 17
      */
     public UiSelector descriptionMatches(String regex) {
         return buildSelector(SELECTOR_DESCRIPTION_REGEX, regex);
@@ -235,6 +251,7 @@
      *
      * @param desc Value to match
      * @return UiSelector with the specified search criteria
+     * @since API Level 16
      */
     public UiSelector descriptionStartsWith(String desc) {
         return buildSelector(SELECTOR_START_DESCRIPTION, desc);
@@ -255,6 +272,7 @@
      *
      * @param desc Value to match
      * @return UiSelector with the specified search criteria
+     * @since API Level 16
      */
     public UiSelector descriptionContains(String desc) {
         return buildSelector(SELECTOR_CONTAINS_DESCRIPTION, desc);
@@ -272,6 +290,7 @@
      *
      * @param index Value to match
      * @return UiSelector with the specified search criteria
+     * @since API Level 16
      */
     public UiSelector index(final int index) {
         return buildSelector(SELECTOR_INDEX, index);
@@ -297,6 +316,7 @@
      *
      * @param instance Value to match
      * @return UiSelector with the specified search criteria
+     * @since API Level 16
      */
     public UiSelector instance(final int instance) {
         return buildSelector(SELECTOR_INSTANCE, instance);
@@ -315,6 +335,7 @@
      *
      * @param val Value to match
      * @return UiSelector with the specified search criteria
+     * @since API Level 16
      */
     public UiSelector enabled(boolean val) {
         return buildSelector(SELECTOR_ENABLED, val);
@@ -333,6 +354,7 @@
      *
      * @param val Value to match
      * @return UiSelector with the specified search criteria
+     * @since API Level 16
      */
     public UiSelector focused(boolean val) {
         return buildSelector(SELECTOR_FOCUSED, val);
@@ -351,6 +373,7 @@
      *
      * @param val Value to match
      * @return UiSelector with the specified search criteria
+     * @since API Level 16
      */
     public UiSelector focusable(boolean val) {
         return buildSelector(SELECTOR_FOCUSABLE, val);
@@ -369,6 +392,7 @@
      *
      * @param val Value to match
      * @return UiSelector with the specified search criteria
+     * @since API Level 16
      */
     public UiSelector scrollable(boolean val) {
         return buildSelector(SELECTOR_SCROLLABLE, val);
@@ -388,6 +412,7 @@
      *
      * @param val Value to match
      * @return UiSelector with the specified search criteria
+     * @since API Level 16
      */
     public UiSelector selected(boolean val) {
         return buildSelector(SELECTOR_SELECTED, val);
@@ -407,6 +432,7 @@
      *
      * @param val Value to match
      * @return UiSelector with the specified search criteria
+     * @since API Level 16
      */
     public UiSelector checked(boolean val) {
         return buildSelector(SELECTOR_CHECKED, val);
@@ -425,6 +451,7 @@
      *
      * @param val Value to match
      * @return UiSelector with the specified search criteria
+     * @since API Level 16
      */
     public UiSelector clickable(boolean val) {
         return buildSelector(SELECTOR_CLICKABLE, val);
@@ -443,6 +470,7 @@
      *
      * @param val Value to match
      * @return UiSelector with the specified search criteria
+     * @since API Level 17
      */
     public UiSelector longClickable(boolean val) {
         return buildSelector(SELECTOR_LONG_CLICKABLE, val);
@@ -456,6 +484,7 @@
      *
      * @param selector
      * @return UiSelector with this added search criterion
+     * @since API Level 16
      */
     public UiSelector childSelector(UiSelector selector) {
         return buildSelector(SELECTOR_CHILD, selector);
@@ -478,6 +507,7 @@
      *
      * @param selector
      * @return UiSelector with this added search criterion
+     * @since API Level 16
      */
     public UiSelector fromParent(UiSelector selector) {
         return buildSelector(SELECTOR_PARENT, selector);
@@ -489,6 +519,7 @@
      *
      * @param name Value to match
      * @return UiSelector with the specified search criteria
+     * @since API Level 16
      */
     public UiSelector packageName(String name) {
         return buildSelector(SELECTOR_PACKAGE_NAME, name);
@@ -500,6 +531,7 @@
      *
      * @param regular expression
      * @return UiSelector with the specified search criteria
+     * @since API Level 17
      */
     public UiSelector packageNameMatches(String regex) {
         return buildSelector(SELECTOR_PACKAGE_NAME_REGEX, regex);
diff --git a/uiautomator/library/src/com/android/uiautomator/core/UiWatcher.java b/uiautomator/library/src/com/android/uiautomator/core/UiWatcher.java
index c75e061..5403e30 100644
--- a/uiautomator/library/src/com/android/uiautomator/core/UiWatcher.java
+++ b/uiautomator/library/src/com/android/uiautomator/core/UiWatcher.java
@@ -21,6 +21,7 @@
  * invoke checkForCondition() only when a regular API call is in retry mode because it is unable
  * to locate its selector yet. Only during this time, the watchers are invoked to check if there is
  * something else unexpected on the screen.
+ * @since API Level 16
  */
 public interface UiWatcher {
 
@@ -41,6 +42,7 @@
      * currently under test.
      *
      * @return true to indicate a matched condition or false for nothing was matched
+     * @since API Level 16
      */
     public boolean checkForCondition();
 }
diff --git a/uiautomator/library/src/com/android/uiautomator/testrunner/IAutomationSupport.java b/uiautomator/library/src/com/android/uiautomator/testrunner/IAutomationSupport.java
index 350b3dd..bea9e9a 100644
--- a/uiautomator/library/src/com/android/uiautomator/testrunner/IAutomationSupport.java
+++ b/uiautomator/library/src/com/android/uiautomator/testrunner/IAutomationSupport.java
@@ -21,6 +21,7 @@
 /**
  * Provides auxiliary support for running test cases
  *
+ * @since API Level 16
  */
 public interface IAutomationSupport {
 
@@ -28,7 +29,7 @@
      * Allows the running test cases to send out interim status
      *
      * @param bundle status report, consisting of key value pairs
-     *
+     * @since API Level 16
      */
     public void sendStatus(int resultCode, Bundle status);
 
diff --git a/uiautomator/library/src/com/android/uiautomator/testrunner/UiAutomatorTestCase.java b/uiautomator/library/src/com/android/uiautomator/testrunner/UiAutomatorTestCase.java
index d119693..926bff7 100644
--- a/uiautomator/library/src/com/android/uiautomator/testrunner/UiAutomatorTestCase.java
+++ b/uiautomator/library/src/com/android/uiautomator/testrunner/UiAutomatorTestCase.java
@@ -35,6 +35,7 @@
  * to the following:
  * {@link UiDevice} instance
  * {@link Bundle} for command line parameters.
+ * @since API Level 16
  */
 public class UiAutomatorTestCase extends TestCase {
 
@@ -65,6 +66,7 @@
     /**
      * Get current instance of {@link UiDevice}. Works similar to calling the static
      * {@link UiDevice#getInstance()} from anywhere in the test classes.
+     * @since API Level 16
      */
     public UiDevice getUiDevice() {
         return mUiDevice;
@@ -74,6 +76,7 @@
      * Get command line parameters. On the command line when passing <code>-e key value</code>
      * pairs, the {@link Bundle} will have the key value pairs conveniently available to the
      * tests.
+     * @since API Level 16
      */
     public Bundle getParams() {
         return mParams;
@@ -83,6 +86,7 @@
      * Provides support for running tests to report interim status
      *
      * @return
+     * @since API Level 16
      */
     public IAutomationSupport getAutomationSupport() {
         return mAutomationSupport;
@@ -111,6 +115,7 @@
     /**
      * Calls {@link SystemClock#sleep(long)} to sleep
      * @param ms is in milliseconds.
+     * @since API Level 16
      */
     public void sleep(long ms) {
         SystemClock.sleep(ms);