Loading quickstep/tests/src/com/android/quickstep/NavigationModeSwitchRule.java +1 −1 Original line number Diff line number Diff line Loading @@ -220,7 +220,7 @@ public class NavigationModeSwitchRule implements TestRule { if (!condition) { final AssertionError assertionError = new AssertionError(message); if (description != null) { FailureWatcher.onError(launcher.getDevice(), description, assertionError); FailureWatcher.onError(launcher, description, assertionError); } throw assertionError; } Loading tests/src/com/android/launcher3/util/rule/FailureWatcher.java +9 −2 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ public class FailureWatcher extends TestWatcher { @Override protected void failed(Throwable e, Description description) { onError(mDevice, description, e); onError(mLauncher, description, e); } static File diagFile(Description description, String prefix, String ext) { Loading @@ -93,7 +93,9 @@ public class FailureWatcher extends TestWatcher { + description.getMethodName() + "." + ext); } public static void onError(UiDevice device, Description description, Throwable e) { public static void onError(LauncherInstrumentation launcher, Description description, Throwable e) { final UiDevice device = launcher.getDevice(); Log.d("b/196820244", "onError 1"); if (device == null) return; Log.d("b/196820244", "onError 2"); Loading Loading @@ -128,6 +130,11 @@ public class FailureWatcher extends TestWatcher { } dumpCommand("logcat -d -s TestRunner", diagFile(description, "FilteredLogcat", "txt")); // Dump bugreport if (launcher.getSystemAnomalyMessage(false, false) != null) { dumpCommand("bugreportz -s", diagFile(description, "Bugreport", "zip")); } } private static void dumpStringCommand(String cmd, OutputStream out) throws IOException { Loading tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +1 −1 Original line number Diff line number Diff line Loading @@ -426,7 +426,7 @@ public final class LauncherInstrumentation { } } private String getSystemAnomalyMessage( public String getSystemAnomalyMessage( boolean ignoreNavmodeChangeStates, boolean ignoreOnlySystemUiViews) { try { { Loading Loading
quickstep/tests/src/com/android/quickstep/NavigationModeSwitchRule.java +1 −1 Original line number Diff line number Diff line Loading @@ -220,7 +220,7 @@ public class NavigationModeSwitchRule implements TestRule { if (!condition) { final AssertionError assertionError = new AssertionError(message); if (description != null) { FailureWatcher.onError(launcher.getDevice(), description, assertionError); FailureWatcher.onError(launcher, description, assertionError); } throw assertionError; } Loading
tests/src/com/android/launcher3/util/rule/FailureWatcher.java +9 −2 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ public class FailureWatcher extends TestWatcher { @Override protected void failed(Throwable e, Description description) { onError(mDevice, description, e); onError(mLauncher, description, e); } static File diagFile(Description description, String prefix, String ext) { Loading @@ -93,7 +93,9 @@ public class FailureWatcher extends TestWatcher { + description.getMethodName() + "." + ext); } public static void onError(UiDevice device, Description description, Throwable e) { public static void onError(LauncherInstrumentation launcher, Description description, Throwable e) { final UiDevice device = launcher.getDevice(); Log.d("b/196820244", "onError 1"); if (device == null) return; Log.d("b/196820244", "onError 2"); Loading Loading @@ -128,6 +130,11 @@ public class FailureWatcher extends TestWatcher { } dumpCommand("logcat -d -s TestRunner", diagFile(description, "FilteredLogcat", "txt")); // Dump bugreport if (launcher.getSystemAnomalyMessage(false, false) != null) { dumpCommand("bugreportz -s", diagFile(description, "Bugreport", "zip")); } } private static void dumpStringCommand(String cmd, OutputStream out) throws IOException { Loading
tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +1 −1 Original line number Diff line number Diff line Loading @@ -426,7 +426,7 @@ public final class LauncherInstrumentation { } } private String getSystemAnomalyMessage( public String getSystemAnomalyMessage( boolean ignoreNavmodeChangeStates, boolean ignoreOnlySystemUiViews) { try { { Loading