summaryrefslogtreecommitdiffstats
path: root/tests/Compatibility
diff options
context:
space:
mode:
authorGuang Zhu <guangzhu@google.com>2015-05-28 13:22:28 -0700
committerGuang Zhu <guangzhu@google.com>2015-05-28 20:26:37 +0000
commit6ac0c8c5faaa2fdf56a533a6a3452d53850809ee (patch)
treec5c64242918f8495a1bd59d25e49726f8e4a015c /tests/Compatibility
parent3aeb5f848eee2c6de9bb49c9dcc7ca5127ef7c1e (diff)
downloadframeworks_base-6ac0c8c5faaa2fdf56a533a6a3452d53850809ee.zip
frameworks_base-6ac0c8c5faaa2fdf56a533a6a3452d53850809ee.tar.gz
frameworks_base-6ac0c8c5faaa2fdf56a533a6a3452d53850809ee.tar.bz2
lock device orientation during app compatibility test
Devices on test benches are usually held sideways, which leads to app rotation during launch. While it's useful to identify such issue from an app perspective, the app compatibility test should be isolated from such noise for the purpose of the testing for basic level of compatibility. Change-Id: I403f96e5d8512ca6a17b05a83d69f4b02f760a32
Diffstat (limited to 'tests/Compatibility')
-rw-r--r--tests/Compatibility/src/com/android/compatibilitytest/AppCompatibility.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/Compatibility/src/com/android/compatibilitytest/AppCompatibility.java b/tests/Compatibility/src/com/android/compatibilitytest/AppCompatibility.java
index eaff6c7..f81b001 100644
--- a/tests/Compatibility/src/com/android/compatibilitytest/AppCompatibility.java
+++ b/tests/Compatibility/src/com/android/compatibilitytest/AppCompatibility.java
@@ -17,6 +17,7 @@
package com.android.compatibilitytest;
import android.app.ActivityManager;
+import android.app.UiAutomation;
import android.app.UiModeManager;
import android.app.ActivityManager.ProcessErrorStateInfo;
import android.app.ActivityManager.RunningTaskInfo;
@@ -82,10 +83,12 @@ public class AppCompatibility extends InstrumentationTestCase {
if (workspaceLaunchTimeoutMsecs != null) {
mWorkspaceLaunchTimeout = Integer.parseInt(workspaceLaunchTimeoutMsecs);
}
+ getInstrumentation().getUiAutomation().setRotation(UiAutomation.ROTATION_FREEZE_0);
}
@Override
protected void tearDown() throws Exception {
+ getInstrumentation().getUiAutomation().setRotation(UiAutomation.ROTATION_UNFREEZE);
super.tearDown();
}