From 331ebfa7751a99a9e740d125c5ac4381a0151090 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Tue, 12 Apr 2016 18:09:56 -0700 Subject: [PATCH] (Test only) A little more debug output for voice interaction test Seeing the font size and stuff is useful. Change-Id: I6fac69db97c0b81c09546be644d0784650b6f8ca --- .../android/test/voiceinteraction/AssistVisualizer.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/VoiceInteraction/src/com/android/test/voiceinteraction/AssistVisualizer.java b/tests/VoiceInteraction/src/com/android/test/voiceinteraction/AssistVisualizer.java index 005a483dc496b..c1f0038aee684 100644 --- a/tests/VoiceInteraction/src/com/android/test/voiceinteraction/AssistVisualizer.java +++ b/tests/VoiceInteraction/src/com/android/test/voiceinteraction/AssistVisualizer.java @@ -37,6 +37,8 @@ public class AssistVisualizer extends View { final int parentLeft, parentTop; final Matrix matrix; final String className; + final float textSize; + final int textColor; final CharSequence text; final int scrollY; final int[] lineCharOffsets; @@ -50,6 +52,8 @@ public class AssistVisualizer extends View { this.parentTop = parentTop; this.matrix = new Matrix(matrix); this.className = node.getClassName(); + this.textSize = node.getTextSize(); + this.textColor = node.getTextColor(); this.text = node.getText() != null ? node.getText() : node.getContentDescription(); this.scrollY = node.getScrollY(); this.lineCharOffsets = node.getTextLineCharOffsets(); @@ -113,7 +117,9 @@ public class AssistVisualizer extends View { TextEntry te = mTextRects.get(i); Log.d(TAG, "View " + te.className + " " + te.bounds.toShortString() + " in " + te.parentLeft + "," + te.parentTop - + " matrix=" + te.matrix.toShortString() + ": " + + " matrix=" + te.matrix.toShortString() + + " size=" + te.textSize + " color=#" + Integer.toHexString(te.textColor) + + ": " + te.text); if (te.lineCharOffsets != null && te.lineBaselines != null) { final int num = te.lineCharOffsets.length < te.lineBaselines.length