summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishal Bhoj <vishal.bhoj@linaro.org>2012-08-17 07:11:18 +0000
committerBernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>2013-10-15 22:00:26 +0200
commitfea57a4c099879fa2f71aa420b4c995996ae4e89 (patch)
tree7d028cadd05d18f6b22637de10a14e12581012ba
parent9d6b2667246eae75c6a5f7e34c14d59d0b4a9534 (diff)
downloadbase-fea57a4c099879fa2f71aa420b4c995996ae4e89.tar.gz
frameworks/base:(Hack)Print the content of textview
This hack allows us to print content of Textview when ro.debug.textview is set . This allows us to capture the contents of textview which will help us capture benchmark results for thirdparty apps which use TextView to display results. Change-Id: I3500cc35b37c08d93e24ccaf12dcce359fc84da2 Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
-rw-r--r--core/java/android/widget/TextView.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 04c407032d63..7ed472bf8bb1 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -41,6 +41,7 @@ import android.os.Message;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.SystemClock;
+import android.os.SystemProperties;
import android.provider.Settings;
import android.text.BoringLayout;
import android.text.DynamicLayout;
@@ -3639,6 +3640,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
text = "";
}
+ if (SystemProperties.getBoolean("ro.debug.textview",false)) {
+ Log.d(LOG_TAG, "" + text);
+ }
+
// If suggestions are not enabled, remove the suggestion spans from the text
if (!isSuggestionsEnabled()) {
text = removeSuggestionSpans(text);