blob: b2c61688ef5936898d69659219f64619805bd9bc [file] [log] [blame]
Riddle Hsu54a86c62019-07-10 21:37:08 +08001/*
2 * Copyright (C) 2019 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.wm;
18
19import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
20
21import android.app.UiAutomation;
22
23import org.junit.Before;
24
25public class WindowManagerPerfTestBase {
26 static final UiAutomation sUiAutomation = getInstrumentation().getUiAutomation();
27 static final long NANOS_PER_S = 1000L * 1000 * 1000;
28 static final long WARMUP_DURATION = 1 * NANOS_PER_S;
29 static final long TEST_DURATION = 5 * NANOS_PER_S;
30
31 @Before
32 public void setUp() {
33 // In order to be closer to the real use case.
34 sUiAutomation.executeShellCommand("input keyevent KEYCODE_WAKEUP");
35 sUiAutomation.executeShellCommand("wm dismiss-keyguard");
36 }
37}