summaryrefslogtreecommitdiff
path: root/core/java/android/widget/TextViewTranslationCallback.java
diff options
context:
space:
mode:
authorJoanne Chung <joannechung@google.com>2021-06-21 22:43:03 +0800
committerJoanne Chung <joannechung@google.com>2021-06-29 18:09:03 +0800
commitbec597e4ccd11c1be42c7980c0d2a8bbf3670d24 (patch)
treef7402f387733b25bc53aaee823047b2360893a44 /core/java/android/widget/TextViewTranslationCallback.java
parent293b6bf6a2b3b3cfc582711d1de991fc6bb6db6e (diff)
Disable log default dumps in debug ROM
We enable the logs dump in debug rom, we should only dump logs when the debug flag is on. Bug: 182433547 Test: Make sure the flag is disable after test and enable during test. Change-Id: I0a719ee9c545b4e66f3414d7f57f3d959004071e
Diffstat (limited to 'core/java/android/widget/TextViewTranslationCallback.java')
-rw-r--r--core/java/android/widget/TextViewTranslationCallback.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/core/java/android/widget/TextViewTranslationCallback.java b/core/java/android/widget/TextViewTranslationCallback.java
index e1b04f8957e5..9d60009031f9 100644
--- a/core/java/android/widget/TextViewTranslationCallback.java
+++ b/core/java/android/widget/TextViewTranslationCallback.java
@@ -22,7 +22,6 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.content.res.ColorStateList;
import android.graphics.Color;
-import android.os.Build;
import android.text.TextUtils;
import android.text.method.TransformationMethod;
import android.text.method.TranslationTransformationMethod;
@@ -43,10 +42,7 @@ public class TextViewTranslationCallback implements ViewTranslationCallback {
private static final String TAG = "TextViewTranslationCb";
- // TODO(b/182433547): remove Build.IS_DEBUGGABLE before ship. Enable the logging in debug build
- // to help the debug during the development phase
- private static final boolean DEBUG = Log.isLoggable(UiTranslationManager.LOG_TAG, Log.DEBUG)
- || Build.IS_DEBUGGABLE;
+ private static final boolean DEBUG = Log.isLoggable(UiTranslationManager.LOG_TAG, Log.DEBUG);
private TranslationTransformationMethod mTranslationTransformation;
private boolean mIsShowingTranslation = false;
@@ -124,7 +120,6 @@ public class TextViewTranslationCallback implements ViewTranslationCallback {
}
} else {
if (DEBUG) {
- // TODO(b/182433547): remove before S release
Log.w(TAG, "onHideTranslation(): no translated text.");
}
return false;
@@ -145,7 +140,6 @@ public class TextViewTranslationCallback implements ViewTranslationCallback {
mContentDescription = null;
} else {
if (DEBUG) {
- // TODO(b/182433547): remove before S release
Log.w(TAG, "onClearTranslation(): no translated text.");
}
return false;