diff options
author | Vishal Bhoj <vishal.bhoj@linaro.org> | 2012-08-17 07:11:18 +0000 |
---|---|---|
committer | Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> | 2014-07-03 02:38:34 +0200 |
commit | 1c2897b029a6a7bbe4a83de119ee35acc74676e0 (patch) | |
tree | ca54c4978523a0945b356760cfce378495338fe5 | |
parent | b66708a281f997c92d6ad751770b1468bccb91f8 (diff) | |
download | base-1c2897b029a6a7bbe4a83de119ee35acc74676e0.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 37121e210fd0..3cd7c5bfd096 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -42,6 +42,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; @@ -3681,6 +3682,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); |