summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishal Bhoj <vishal.bhoj@linaro.org>2012-08-17 07:11:18 +0000
committerBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2012-11-14 12:43:32 +0100
commit6d11c19f78a4b8d10a5b3eabfba4383d177fb31d (patch)
treef0e4e5cc61f0f53f19d976010a760f22f540aade
parent72575ad54e53497d6494a26032a695daf184c577 (diff)
downloadbase-6d11c19f78a4b8d10a5b3eabfba4383d177fb31d.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 5d904004cf02..cea79dfca5b4 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -40,6 +40,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;
@@ -3435,6 +3436,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);