diff --git a/core/tests/coretests/src/android/widget/TextViewActivityTest.java b/core/tests/coretests/src/android/widget/TextViewActivityTest.java index b03552f9e908f..2eb9cdb6a856d 100644 --- a/core/tests/coretests/src/android/widget/TextViewActivityTest.java +++ b/core/tests/coretests/src/android/widget/TextViewActivityTest.java @@ -186,4 +186,29 @@ public class TextViewActivityTest extends ActivityInstrumentationTestCase2 targetLine) { + diffY -= mTextView.getLineHeight() * LINE_SLOP_MULTIPLIER; + } else if (currentLine < targetLine) { + diffY += mTextView.getLineHeight() * LINE_SLOP_MULTIPLIER; + } return new float[] {targetCoordinates[0] + diffX, targetCoordinates[1] + diffY}; } }