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

Commit c59465ef authored by Vadim Tryshev's avatar Vadim Tryshev
Browse files

Disabling heads-up notifications in launcher tests.

This prevents the tests from interacting with this popup.

Bug: 110103162
Test: TaplTests
Change-Id: I0215ddab634611d20a63ed728de11d4138456f96
parent ee598ada
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ import com.android.launcher3.util.Condition;
import com.android.launcher3.util.Wait;
import com.android.launcher3.util.rule.LauncherActivityRule;

import org.junit.After;
import org.junit.Before;
import org.junit.Rule;

@@ -94,6 +95,12 @@ public abstract class AbstractLauncherUiTest {
        mLauncher = new LauncherInstrumentation(getInstrumentation());
        mTargetContext = InstrumentationRegistry.getTargetContext();
        mTargetPackage = mTargetContext.getPackageName();
        mDevice.executeShellCommand("settings put global heads_up_notifications_enabled 0");
    }

    @After
    public void tearDown() throws Exception {
        mDevice.executeShellCommand("settings put global heads_up_notifications_enabled 1");
    }

    protected void lockRotation(boolean naturalOrientation) throws RemoteException {
+1 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ public class WorkTabTest extends AbstractLauncherUiTest {
    @After
    public void removeWorkProfile() throws Exception {
        mDevice.executeShellCommand("pm remove-user " + mProfileUserId);
        super.tearDown();
    }

    @Test
+2 −0
Original line number Diff line number Diff line
@@ -103,6 +103,8 @@ public class BindWidgetTest extends AbstractLauncherUiTest {
        if (mSessionId > -1) {
            mTargetContext.getPackageManager().getPackageInstaller().abandonSession(mSessionId);
        }

        super.tearDown();
    }

    @Test