summaryrefslogtreecommitdiff
path: root/core/java/android/widget/TextViewTranslationCallback.java
diff options
context:
space:
mode:
authorJoanne Chung <joannechung@google.com>2021-04-12 17:57:39 +0800
committerJoanne Chung <joannechung@google.com>2021-04-13 13:58:03 +0800
commit8960d6667b18a42f63000025d380492c5520874f (patch)
treed3da52c55aa77de7279633dd7cad2bc334b3d5c5 /core/java/android/widget/TextViewTranslationCallback.java
parentaabfff1f73209fc458fade31458cc1cd77d7bb06 (diff)
Add debug log to help to debug translation problem.
There are some issues the resume/finish seems not work well. The debug flag should be enabled manually, but in the most time the user may forget to enable it before testing. Try to enable it in the debug rom to help debugging, we use b/182433547 to trace the disable this check before rom release. Bug: 182433547 Test: manual Change-Id: I2f85a0e17f8a2b8a4b93252044cf48d739b4eca2
Diffstat (limited to 'core/java/android/widget/TextViewTranslationCallback.java')
-rw-r--r--core/java/android/widget/TextViewTranslationCallback.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/java/android/widget/TextViewTranslationCallback.java b/core/java/android/widget/TextViewTranslationCallback.java
index 296d93c88554..a479b8ac4760 100644
--- a/core/java/android/widget/TextViewTranslationCallback.java
+++ b/core/java/android/widget/TextViewTranslationCallback.java
@@ -17,6 +17,7 @@
package android.widget;
import android.annotation.NonNull;
+import android.os.Build;
import android.text.method.TranslationTransformationMethod;
import android.util.Log;
import android.view.View;
@@ -34,7 +35,10 @@ public class TextViewTranslationCallback implements ViewTranslationCallback {
private static final String TAG = "TextViewTranslationCallback";
- private static final boolean DEBUG = Log.isLoggable(UiTranslationManager.LOG_TAG, Log.DEBUG);
+ // 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 TranslationTransformationMethod mTranslationTransformation;