Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8070756 authored by vadimt's avatar vadimt Committed by Vadim Tryshev
Browse files

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
parent 75bb8309
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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();