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

Commit 330fde4a authored by vadimt's avatar vadimt
Browse files

Adding more checks around unlocking the phone

Bug: 151613234
Change-Id: I045306cce2ce85d6895c9f050ebb4d2bd15ba232
parent f946e0a5
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -220,7 +220,9 @@ public abstract class AbstractLauncherUiTest {

    @Before
    public void setUp() throws Exception {
        Log.d(TAG, "Before disabling battery defender");
        mDevice.executeShellCommand("setprop vendor.battery.defender.disable 1");
        Log.d(TAG, "Before enabling stay awake");
        mDevice.executeShellCommand("settings put global stay_on_while_plugged_in 3");
        if (hasSystemUiObject("keyguard_status_view")) {
            Log.d(TAG, "Before unlocking the phone");
@@ -228,6 +230,9 @@ public abstract class AbstractLauncherUiTest {
        } else {
            Log.d(TAG, "Phone isn't locked");
        }
        Assert.assertTrue("Keyguard still visible",
                mDevice.wait(Until.gone(By.res(SYSTEMUI_PACKAGE, "keyguard_status_view")), 10000));
        Log.d(TAG, "Keyguard is not visible");

        final String launcherPackageName = mDevice.getLauncherPackageName();
        try {