aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornchalko <nchalko@google.com>2018-02-16 16:04:19 -0800
committerNick Chalko <nchalko@google.com>2018-02-21 11:08:35 -0800
commitbe6b235a227709662a4872edd9bc7d4ad1f2b7f5 (patch)
tree30c3488af0d969c9aa0d396777ad6f9e72482542
parent5fd510a7097761e386845a325c64d26cd66e4998 (diff)
downloadTV-be6b235a227709662a4872edd9bc7d4ad1f2b7f5.tar.gz
CLEANUP: Write a log statement CommonUtils#isRunningInTest is true
PiperOrigin-RevId: 186059781 Change-Id: If3811a66d5fe10cb6a9e5aab312ade5ba928deef
-rw-r--r--common/src/com/android/tv/common/util/CommonUtils.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/src/com/android/tv/common/util/CommonUtils.java b/common/src/com/android/tv/common/util/CommonUtils.java
index 00574586..305431d3 100644
--- a/common/src/com/android/tv/common/util/CommonUtils.java
+++ b/common/src/com/android/tv/common/util/CommonUtils.java
@@ -21,6 +21,7 @@ import android.content.Intent;
import android.media.tv.TvInputInfo;
import android.os.Build;
import android.util.ArraySet;
+import android.util.Log;
import com.android.tv.common.BuildConfig;
import com.android.tv.common.CommonConstants;
import com.android.tv.common.actions.InputSetupActionUtils;
@@ -34,6 +35,7 @@ import java.util.Set;
/** Util class for common use in TV app and inputs. */
@SuppressWarnings("AndroidApiChecker") // TODO(b/32513850) remove when error prone is updated
public final class CommonUtils {
+ private static final String TAG = "CommonUtils";
private static final ThreadLocal<SimpleDateFormat> ISO_8601 =
new ThreadLocal() {
private final SimpleDateFormat value =
@@ -94,6 +96,10 @@ public final class CommonUtils {
if (sRunningInTest == null) {
try {
Class.forName("com.android.tv.testing.utils.Utils");
+ Log.i(
+ TAG,
+ "Assumed to be running in a test because"
+ + " com.android.tv.testing.utils.Utils is found");
sRunningInTest = true;
} catch (ClassNotFoundException e) {
sRunningInTest = false;