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

Commit a2e095c9 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Disabling heads-up notifications in launcher tests." into ub-launcher3-master

parents 24b209c6 c59465ef
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line 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.Wait;
import com.android.launcher3.util.rule.LauncherActivityRule;
import com.android.launcher3.util.rule.LauncherActivityRule;


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


@@ -94,6 +95,12 @@ public abstract class AbstractLauncherUiTest {
        mLauncher = new LauncherInstrumentation(getInstrumentation());
        mLauncher = new LauncherInstrumentation(getInstrumentation());
        mTargetContext = InstrumentationRegistry.getTargetContext();
        mTargetContext = InstrumentationRegistry.getTargetContext();
        mTargetPackage = mTargetContext.getPackageName();
        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 {
    protected void lockRotation(boolean naturalOrientation) throws RemoteException {
+1 −0
Original line number Original line Diff line number Diff line
@@ -54,6 +54,7 @@ public class WorkTabTest extends AbstractLauncherUiTest {
    @After
    @After
    public void removeWorkProfile() throws Exception {
    public void removeWorkProfile() throws Exception {
        mDevice.executeShellCommand("pm remove-user " + mProfileUserId);
        mDevice.executeShellCommand("pm remove-user " + mProfileUserId);
        super.tearDown();
    }
    }


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

        super.tearDown();
    }
    }


    @Test
    @Test