mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Making sure the device doesn't lock during test execution
Unlocking the device at the beginning of the test does help, but perhaps we should prevent locking during the test execution. Some failures still remain. Bug: 151613234
This commit is contained in:
@@ -220,8 +220,12 @@ public abstract class AbstractLauncherUiTest {
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
mDevice.executeShellCommand("settings put global stay_on_while_plugged_in 3");
|
||||
if (hasSystemUiObject("keyguard_status_view")) {
|
||||
Log.d(TAG, "Before unlocking the phone");
|
||||
mDevice.executeShellCommand("input keyevent 82");
|
||||
} else {
|
||||
Log.d(TAG, "Phone isn't locked");
|
||||
}
|
||||
|
||||
final String launcherPackageName = mDevice.getLauncherPackageName();
|
||||
|
||||
Reference in New Issue
Block a user