summaryrefslogtreecommitdiffstats
path: root/tests/AppLaunch
diff options
context:
space:
mode:
authorGuang Zhu <guangzhu@google.com>2014-08-08 11:30:21 -0700
committerGuang Zhu <guangzhu@google.com>2014-08-08 11:30:21 -0700
commite2a03fe43d1f8eb5a6ada046870dcc35392d8f17 (patch)
tree2927bc3e6217856a3b41a429a69e85eba4373c61 /tests/AppLaunch
parent5f9aa0bcea8be860fdf5a35476435616cb5f44f3 (diff)
downloadframeworks_base-e2a03fe43d1f8eb5a6ada046870dcc35392d8f17.zip
frameworks_base-e2a03fe43d1f8eb5a6ada046870dcc35392d8f17.tar.gz
frameworks_base-e2a03fe43d1f8eb5a6ada046870dcc35392d8f17.tar.bz2
freeze screen rotation during memory and app launch test
Change-Id: I2a039be383562019a0af9470c5053cd3cb1e6142
Diffstat (limited to 'tests/AppLaunch')
-rw-r--r--tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java b/tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java
index dfb8070..a209d6c 100644
--- a/tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java
+++ b/tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java
@@ -22,6 +22,7 @@ import android.app.ActivityManager.ProcessErrorStateInfo;
import android.app.ActivityManagerNative;
import android.app.IActivityManager;
import android.app.IActivityManager.WaitResult;
+import android.app.UiAutomation;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
@@ -72,6 +73,18 @@ public class AppLaunch extends InstrumentationTestCase {
private Bundle mResult = new Bundle();
private Set<String> mRequiredAccounts;
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ getInstrumentation().getUiAutomation().setRotation(UiAutomation.ROTATION_FREEZE_0);
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ getInstrumentation().getUiAutomation().setRotation(UiAutomation.ROTATION_UNFREEZE);
+ super.tearDown();
+ }
+
public void testMeasureStartUpTime() throws RemoteException, NameNotFoundException {
InstrumentationTestRunner instrumentation =
(InstrumentationTestRunner)getInstrumentation();