Skip the test that involves setting a launcher on work profile.
Work profile never has a launcher really, so let's not run this test.
Change-Id: Ic3343b6f626cea7535cebb56d08406d65cbbfd5d
Fix: 124923993
Test: atest -v hostside/src/android/content/pm/cts/shortcuthost/ShortcutManagerMultiuserTest.java
diff --git a/hostsidetests/shortcuts/deviceside/multiuser/src/android/content/pm/cts/shortcut/multiuser/ShortcutManagerManagedUserTest.java b/hostsidetests/shortcuts/deviceside/multiuser/src/android/content/pm/cts/shortcut/multiuser/ShortcutManagerManagedUserTest.java
index 48f8578..9616176 100644
--- a/hostsidetests/shortcuts/deviceside/multiuser/src/android/content/pm/cts/shortcut/multiuser/ShortcutManagerManagedUserTest.java
+++ b/hostsidetests/shortcuts/deviceside/multiuser/src/android/content/pm/cts/shortcut/multiuser/ShortcutManagerManagedUserTest.java
@@ -26,6 +26,7 @@
import android.content.pm.cts.shortcut.device.common.ShortcutManagerDeviceTestBase;
import android.os.UserHandle;
import android.os.UserManager;
+import android.test.suitebuilder.annotation.Suppress;
import java.util.List;
@@ -96,6 +97,7 @@
userOther);
}
+ @Suppress // Having a launcher on managed profile is not supported, so don't run.
public void test05_getAndLaunch_managed() {
Launcher.setAsDefaultLauncher(getInstrumentation(), getContext());
diff --git a/hostsidetests/shortcuts/hostside/src/android/content/pm/cts/shortcuthost/ShortcutManagerMultiuserTest.java b/hostsidetests/shortcuts/hostside/src/android/content/pm/cts/shortcuthost/ShortcutManagerMultiuserTest.java
index 2e14a85..2bcaa94 100644
--- a/hostsidetests/shortcuts/hostside/src/android/content/pm/cts/shortcuthost/ShortcutManagerMultiuserTest.java
+++ b/hostsidetests/shortcuts/hostside/src/android/content/pm/cts/shortcuthost/ShortcutManagerMultiuserTest.java
@@ -55,8 +55,6 @@
runDeviceTestsAsUser(TARGET_PKG, ".ShortcutManagerManagedUserTest",
"test04_getAndLaunch_primary", getPrimaryUserId());
- runDeviceTestsAsUser(TARGET_PKG, ".ShortcutManagerManagedUserTest",
- "test05_getAndLaunch_managed", profileId);
}
@Test