Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2be1f8c3 authored by Yuling Liang's avatar Yuling Liang Committed by Android Git Automerger
Browse files

am 69a9d925: am eea94f06: Merge "Revert "Followon fix for 14276128 Clipping at...

am 69a9d925: am eea94f06: Merge "Revert "Followon fix for 14276128 Clipping at bottom of TextView"" into klp-modular-dev

* commit '69a9d925':
  Revert "Followon fix for 14276128 Clipping at bottom of TextView"
parents d8e6a5f1 69a9d925
Loading
Loading
Loading
Loading
+6 −10
Original line number Diff line number Diff line
@@ -632,11 +632,7 @@ public class StaticLayout extends Layout {
            bottom = fm.bottom;
        }

        boolean firstLine = (j == 0);
        boolean currentLineIsTheLastVisibleOne = (j + 1 == mMaximumVisibleLineCount);
        boolean lastLine = currentLineIsTheLastVisibleOne || (end == bufEnd);

        if (firstLine) {
        if (j == 0) {
            if (trackPad) {
                mTopPadding = top - above;
            }
@@ -645,10 +641,7 @@ public class StaticLayout extends Layout {
                above = top;
            }
        }

        int extra;

        if (lastLine) {
        if (end == bufEnd) {
            if (trackPad) {
                mBottomPadding = bottom - below;
            }
@@ -658,8 +651,9 @@ public class StaticLayout extends Layout {
            }
        }

        int extra;

        if (needMultiply && !lastLine) {
        if (needMultiply && end != bufEnd) {
            double ex = (below - above) * (spacingmult - 1) + spacingadd;
            if (ex >= 0) {
                extra = (int)(ex + EXTRA_ROUNDING);
@@ -696,6 +690,8 @@ public class StaticLayout extends Layout {
        if (ellipsize != null) {
            // If there is only one line, then do any type of ellipsis except when it is MARQUEE
            // if there are multiple lines, just allow END ellipsis on the last line
            boolean firstLine = (j == 0);
            boolean currentLineIsTheLastVisibleOne = (j + 1 == mMaximumVisibleLineCount);
            boolean forceEllipsis = moreChars && (mLineCount + 1 == mMaximumVisibleLineCount);

            boolean doEllipsis =