Make "cmd package set-home-activity" more CTS friendly

- Print "Success" when it went well.
- Catch all exceptions and print error message, not just
RemoteExceptions

- Update the shortcut manger test utility to match the new behavior

Bug 29612099

Change-Id: If6a80241ea5e8ef0b2d3f961d1442e730b908764
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 f7277e8..4aa7590 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
@@ -168,7 +168,8 @@
     }
 
     public static void setDefaultLauncher(Instrumentation instrumentation, String component) {
-        runCommandForNoOutput(instrumentation, "cmd package set-home-activity " + component);
+        runCommand(instrumentation, "cmd package set-home-activity " + component,
+                result -> result.contains("Success"));
     }
 
     public static void setDefaultLauncher(Instrumentation instrumentation, Context packageContext) {
@@ -202,6 +203,7 @@
         if (!ENABLE_DUMPSYS) {
             return;
         }
+        Log.e(TAG, "Dumpsys shortcut");
         for (String s : runCommand(instrumentation, "dumpsys shortcut")) {
             Log.e(TAG, s);
         }