diff options
| author | Siyamed Sinir <siyamed@google.com> | 2017-10-05 11:22:12 -0700 |
|---|---|---|
| committer | Siyamed Sinir <siyamed@google.com> | 2017-10-10 12:40:47 -0700 |
| commit | a273a70ecbb0d1aaf9aeceec7aa91591290a4871 (patch) | |
| tree | c437002f83ee0b14d1db8d33af1b01b1cc4137ef /core/java/android/text/StaticLayout.java | |
| parent | c51777b9b87d6b9f12f80cc998c30f6dea8de7d0 (diff) | |
Removed unused variables from text layout code
Test: None
Change-Id: I890c3d260edd0570259db5089dcb37f79c2e56e9
Diffstat (limited to 'core/java/android/text/StaticLayout.java')
| -rw-r--r-- | core/java/android/text/StaticLayout.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/core/java/android/text/StaticLayout.java b/core/java/android/text/StaticLayout.java index 961cd8eef530..7628e755eceb 100644 --- a/core/java/android/text/StaticLayout.java +++ b/core/java/android/text/StaticLayout.java @@ -441,8 +441,6 @@ public class StaticLayout extends Layout { private Pair<String, long[]> getLocaleAndHyphenatorIfChanged(TextPaint paint) { final LocaleList locales = paint.getTextLocales(); - final String languageTags; - long[] hyphenators; if (!locales.equals(mLocales)) { mLocales = locales; return new Pair(locales.toLanguageTags(), getHyphenators(locales)); @@ -521,7 +519,7 @@ public class StaticLayout extends Layout { private LocaleList mLocales; - private static final SynchronizedPool<Builder> sPool = new SynchronizedPool<Builder>(3); + private static final SynchronizedPool<Builder> sPool = new SynchronizedPool<>(3); } public StaticLayout(CharSequence source, TextPaint paint, @@ -947,10 +945,10 @@ public class StaticLayout extends Layout { boolean moreChars = (endPos < bufEnd); final int ascent = fallbackLineSpacing - ? Math.min(fmAscent, (int) Math.round(ascents[breakIndex])) + ? Math.min(fmAscent, Math.round(ascents[breakIndex])) : fmAscent; final int descent = fallbackLineSpacing - ? Math.max(fmDescent, (int) Math.round(descents[breakIndex])) + ? Math.max(fmDescent, Math.round(descents[breakIndex])) : fmDescent; v = out(source, here, endPos, ascent, descent, fmTop, fmBottom, @@ -1177,7 +1175,7 @@ public class StaticLayout extends Layout { mWorkPaint.set(paint); do { final float ellipsizedWidth = guessEllipsis(text, lineStart, lineEnd, widths, - widthStart, tempAvail, where, line, textWidth, mWorkPaint, forceEllipsis, dir); + widthStart, tempAvail, where, line, mWorkPaint, forceEllipsis, dir); if (ellipsizedWidth <= avail) { lineFits = true; } else { @@ -1207,7 +1205,7 @@ public class StaticLayout extends Layout { // This method temporarily modifies the TextPaint passed to it, so the TextPaint passed to it // should not be accessed while the method is running. private float guessEllipsis(CharSequence text, int lineStart, int lineEnd, float[] widths, - int widthStart, float avail, TextUtils.TruncateAt where, int line, float textWidth, + int widthStart, float avail, TextUtils.TruncateAt where, int line, TextPaint paint, boolean forceEllipsis, int dir) { final int savedHyphenEdit = paint.getHyphenEdit(); paint.setHyphenEdit(0); |
