From 0c39c155b6335db9791738b842a6f5e185a23084 Mon Sep 17 00:00:00 2001 From: Sergey Solovyev Date: Sat, 19 Jan 2013 15:15:14 +0400 Subject: [PATCH] new plotter --- .../android/calculator/AndroidCalculatorNotifier.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/android-app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorNotifier.java b/android-app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorNotifier.java index 532bf880..d14e8cc8 100644 --- a/android-app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorNotifier.java +++ b/android-app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorNotifier.java @@ -25,10 +25,17 @@ public class AndroidCalculatorNotifier implements CalculatorNotifier { @NotNull private final Handler uiHandler = new Handler(); + private final boolean showDebugMessages; + public AndroidCalculatorNotifier(@NotNull Application application) { + this(application, false); + } + + public AndroidCalculatorNotifier(@NotNull Application application, boolean showDebugMessages) { assert AndroidUtils.isUiThread(); this.application = application; + this.showDebugMessages = showDebugMessages; } @Override @@ -48,7 +55,7 @@ public class AndroidCalculatorNotifier implements CalculatorNotifier { @Override public void showDebugMessage(@Nullable final String tag, @NotNull final String message) { - if (AndroidUtils.isDebuggable(application)) { + if (showDebugMessages) { showMessageInUiThread(tag == null ? message : tag + ": " + message); } }