Pixel were missing on the last line of text when using MaxLines.

Bug 3295544

Only the last line of text includes the bottomPadding (extra line
spacing below the characters' descent. When The text is clipped using
maxLines, the desired height correctly added this value, but getLineTop
and getLineDescent are also used when the layout is drawn.

The fix is to make the layout aware of its clipping so that these
values are correctly updated.

Change-Id: I703656cf45022d34a90f55f0ed8fc5e4b30f80b1
diff --git a/core/java/android/text/Layout.java b/core/java/android/text/Layout.java
index 3fe4f4c..8700af8 100644
--- a/core/java/android/text/Layout.java
+++ b/core/java/android/text/Layout.java
@@ -1764,4 +1764,15 @@
         new Directions(new int[] { 0, RUN_LENGTH_MASK });
     /* package */ static final Directions DIRS_ALL_RIGHT_TO_LEFT =
         new Directions(new int[] { 0, RUN_LENGTH_MASK | RUN_RTL_FLAG });
+
+    /**
+     * Inform this layout that not all of its lines will be displayed, because a maximum number of
+     * lines has been set on the associated TextView.
+     *
+     * A non positive value means that all lines are displayed.
+     *
+     * @param line line number of the last visible line (line numbers start at 1 for the first line)
+     * @hide
+     */
+    public void setMaximumVisibleLineCount(int line) {}
 }