commit | 1e091c8206155bc621b73ae600499e5fa434af56 | [log] [tgz] |
---|---|---|
author | Makoto Onuki <omakoto@google.com> | Thu Feb 01 11:58:03 2018 -0800 |
committer | Makoto Onuki <omakoto@google.com> | Thu Feb 01 14:22:57 2018 -0800 |
tree | 2cd101f65b48453b761eb58c7377a954edef2d8e | |
parent | 64dd7468f3027ddd8563b6f9d8ac3b13b5ff78b0 [diff] [blame] |
Fix flakey shortcut CTS - After changing the default launcher, clear the cached launcher. Bug: 72753182 Test: atest CtsShortcutManagerTestCases Test: atest CtsShortcutHostTestCases Change-Id: If9b2e0fecb4c94320e5e6125f61c5802bebeb292
diff --git a/services/tests/shortcutmanagerutils/src/com/android/server/pm/shortcutmanagertest/ShortcutManagerTestUtils.java b/services/tests/shortcutmanagerutils/src/com/android/server/pm/shortcutmanagertest/ShortcutManagerTestUtils.java index 99eb846..e36586e 100644 --- a/services/tests/shortcutmanagerutils/src/com/android/server/pm/shortcutmanagertest/ShortcutManagerTestUtils.java +++ b/services/tests/shortcutmanagerutils/src/com/android/server/pm/shortcutmanagertest/ShortcutManagerTestUtils.java
@@ -210,6 +210,9 @@ runCommand(instrumentation, "cmd package set-home-activity --user " + instrumentation.getContext().getUserId() + " " + component, result -> result.contains("Success")); + runCommand(instrumentation, "cmd shortcut clear-default-launcher --user " + + instrumentation.getContext().getUserId(), + result -> result.contains("Success")); } public static void setDefaultLauncher(Instrumentation instrumentation, Context packageContext) {