Loading tests/src/com/android/launcher3/compat/PromiseIconUiTest.java +9 −3 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import java.util.UUID; import java.util.concurrent.TimeUnit; /** Loading @@ -44,6 +45,8 @@ import java.util.UUID; public class PromiseIconUiTest extends AbstractLauncherUiTest { private int mSessionId = -1; // TODO(b/202985412): Revert to default timeout when PackageManager bug is fixed. private static final long PROMISE_ICON_TIMEOUT = TimeUnit.SECONDS.toMillis(60); @Override public void setUp() throws Exception { Loading Loading @@ -85,7 +88,8 @@ public class PromiseIconUiTest extends AbstractLauncherUiTest { // Verify promise icon is added waitForLauncherCondition("Test Promise App not found on workspace", launcher -> launcher.getWorkspace().getFirstMatch(findPromiseApp) != null); launcher.getWorkspace().getFirstMatch(findPromiseApp) != null, PROMISE_ICON_TIMEOUT); // Remove session mTargetContext.getPackageManager().getPackageInstaller().abandonSession(mSessionId); Loading @@ -93,7 +97,8 @@ public class PromiseIconUiTest extends AbstractLauncherUiTest { // Verify promise icon is removed waitForLauncherCondition("Test Promise App not removed from workspace", launcher -> launcher.getWorkspace().getFirstMatch(findPromiseApp) == null); launcher.getWorkspace().getFirstMatch(findPromiseApp) == null, PROMISE_ICON_TIMEOUT); } @Test Loading @@ -111,6 +116,7 @@ public class PromiseIconUiTest extends AbstractLauncherUiTest { // Verify promise icon is not added waitForLauncherCondition("Test Promise App not found on workspace", launcher -> launcher.getWorkspace().getFirstMatch(findPromiseApp) == null); launcher.getWorkspace().getFirstMatch(findPromiseApp) == null, PROMISE_ICON_TIMEOUT); } } Loading
tests/src/com/android/launcher3/compat/PromiseIconUiTest.java +9 −3 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import java.util.UUID; import java.util.concurrent.TimeUnit; /** Loading @@ -44,6 +45,8 @@ import java.util.UUID; public class PromiseIconUiTest extends AbstractLauncherUiTest { private int mSessionId = -1; // TODO(b/202985412): Revert to default timeout when PackageManager bug is fixed. private static final long PROMISE_ICON_TIMEOUT = TimeUnit.SECONDS.toMillis(60); @Override public void setUp() throws Exception { Loading Loading @@ -85,7 +88,8 @@ public class PromiseIconUiTest extends AbstractLauncherUiTest { // Verify promise icon is added waitForLauncherCondition("Test Promise App not found on workspace", launcher -> launcher.getWorkspace().getFirstMatch(findPromiseApp) != null); launcher.getWorkspace().getFirstMatch(findPromiseApp) != null, PROMISE_ICON_TIMEOUT); // Remove session mTargetContext.getPackageManager().getPackageInstaller().abandonSession(mSessionId); Loading @@ -93,7 +97,8 @@ public class PromiseIconUiTest extends AbstractLauncherUiTest { // Verify promise icon is removed waitForLauncherCondition("Test Promise App not removed from workspace", launcher -> launcher.getWorkspace().getFirstMatch(findPromiseApp) == null); launcher.getWorkspace().getFirstMatch(findPromiseApp) == null, PROMISE_ICON_TIMEOUT); } @Test Loading @@ -111,6 +116,7 @@ public class PromiseIconUiTest extends AbstractLauncherUiTest { // Verify promise icon is not added waitForLauncherCondition("Test Promise App not found on workspace", launcher -> launcher.getWorkspace().getFirstMatch(findPromiseApp) == null); launcher.getWorkspace().getFirstMatch(findPromiseApp) == null, PROMISE_ICON_TIMEOUT); } }