am 1c8c9000: am bfa07537: Merge "Fix CTS for UiAutomator device orientation in tests" into jb-mr1.1-dev

* commit '1c8c9000d0c6ab7a5115b48f47c9a04300607044':
  Fix CTS for UiAutomator device orientation in tests
diff --git a/tests/uiautomator/src/com/android/cts/uiautomatortest/CtsUiAutomatorTest.java b/tests/uiautomator/src/com/android/cts/uiautomatortest/CtsUiAutomatorTest.java
index ce6c02d..830ea60 100644
--- a/tests/uiautomator/src/com/android/cts/uiautomatortest/CtsUiAutomatorTest.java
+++ b/tests/uiautomator/src/com/android/cts/uiautomatortest/CtsUiAutomatorTest.java
@@ -990,6 +990,12 @@
      * @throws UiObjectNotFoundException
      */
     private void openTest(String name) throws UiObjectNotFoundException {
+        try {
+            UiDevice.getInstance().setOrientationNatural();
+        } catch (RemoteException e) {
+            // will catch it in its own test. For now try to put the device
+            // in its natural orientation prior to each test
+        }
         UiScrollable listView = new UiScrollable(
                 new UiSelector().className(android.widget.ListView.class.getName()));