Files
frameworks_base/tests/WindowAnimationJank/src/android/windowanimationjank/WindowAnimationJankTestBase.java
Brett Chabot 502ec7ae4b Migrate remainder of frameworks/base to androidx.test
See go/jetpack-test-android-migration

Exempt-From-Owner-Approval: automated package name refactoring

Test: m  m -j BroadcastRadioTests KeystoreTests mediaframeworktest ActivityManagerPerfTests AppLaunch AppLaunchWear BackgroundDexOptServiceIntegrationTests AppCompatibilityTest DynamicCodeLoggerIntegrationTests FlickerLibTest InternalTests PackageWatchdogTest RcsTests RollbackTestAppAv1 RollbackTestAppAv2 RollbackTestAppACrashingV2 RollbackTestAppBv1 RollbackTestAppBv2 RollbackTestAppASplitV1 RollbackTestAppASplitV2 RollbackTest ServiceCrashTest UsageStatsPerfTests UsbTests WindowAnimationJank
Change-Id: I32fe3297656eec6060da6c7e24582bcd5315fb16
2019-03-02 00:35:17 +00:00

55 lines
1.6 KiB
Java

/*
* Copyright (C) 2015 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.windowanimationjank;
import android.support.test.uiautomator.UiDevice;
import androidx.test.jank.JankTestBase;
/**
* This adds additional system level jank monitor and its result is merged with primary monitor
* used in test.
*/
public abstract class WindowAnimationJankTestBase extends JankTestBase {
private static final String TAG = "WindowAnimationJankTestBase";
protected WindowAnimationJankTestBase() {
}
@Override
protected void setUp() throws Exception {
super.setUp();
// fix device orientation
getUiDevice().setOrientationNatural();
// Start from the home screen
getUiDevice().pressHome();
getUiDevice().waitForIdle();
}
@Override
protected void tearDown() throws Exception {
getUiDevice().unfreezeRotation();
super.tearDown();
}
protected UiDevice getUiDevice() {
return UiDevice.getInstance(getInstrumentation());
}
}