From 7e4d19f842a80bb72b107babba6f1e0d9913b073 Mon Sep 17 00:00:00 2001 From: vadimt Date: Thu, 14 May 2020 19:52:01 -0700 Subject: [PATCH] Rename closeEvents to reduce confusion Change-Id: I73f083c568846ec8f96b4b403afdaf10d75a106e --- .../android/launcher3/tapl/LauncherInstrumentation.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index b333100393..974956770e 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java @@ -362,7 +362,7 @@ public final class LauncherInstrumentation { public void checkForAnomaly() { final String systemAnomalyMessage = getSystemAnomalyMessage(); if (systemAnomalyMessage != null) { - Assert.fail(formatSystemHealthMessage(closeEvents( + Assert.fail(formatSystemHealthMessage(formatErrorWithEvents( "http://go/tapl : Tests are broken by a non-Launcher system error: " + systemAnomalyMessage, false))); } @@ -424,7 +424,7 @@ public final class LauncherInstrumentation { return message; } - private String closeEvents(String message, boolean checkEvents) { + private String formatErrorWithEvents(String message, boolean checkEvents) { if (sCheckingEvents) { sCheckingEvents = false; if (checkEvents) { @@ -454,7 +454,7 @@ public final class LauncherInstrumentation { private void fail(String message) { checkForAnomaly(); - Assert.fail(formatSystemHealthMessage(closeEvents( + Assert.fail(formatSystemHealthMessage(formatErrorWithEvents( "http://go/tapl : " + getContextDescription() + message + " (visible state: " + getVisibleStateMessage() + ")", true))); } @@ -1315,7 +1315,8 @@ public final class LauncherInstrumentation { if (mOnLauncherCrashed != null) mOnLauncherCrashed.run(); checkForAnomaly(); Assert.fail( - formatSystemHealthMessage(closeEvents("Launcher crashed", false))); + formatSystemHealthMessage( + formatErrorWithEvents("Launcher crashed", false))); } if (sCheckingEvents) {