diff options
author | Vishal Bhoj <vishal.bhoj@linaro.org> | 2012-08-17 07:11:18 +0000 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2013-07-25 11:10:56 +0530 |
commit | 681e0fbb81a6c37b51ae917070d4d1223e07f680 (patch) | |
tree | 9918eff2c49b9634496caae76d1b4027cb142141 | |
parent | df7674f52c2c46378b14aa93f1c002890e35a0e1 (diff) | |
download | base-681e0fbb81a6c37b51ae917070d4d1223e07f680.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.java | 5 |
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); |