summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorRoozbeh Pournader <roozbeh@google.com>2015-10-16 21:54:12 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-10-16 21:54:12 +0000
commit5362f273e91885041b7cb246667cff3ceca74703 (patch)
treed1e56ed56075c7f29dd8b50a604100044cd51737 /core/java
parent70ea857859b78a708fb99ac708ead7bdaddf79a7 (diff)
parent431e506b53e59b21a7d18bf46476b8c1528fabf1 (diff)
downloadframeworks_base-5362f273e91885041b7cb246667cff3ceca74703.zip
frameworks_base-5362f273e91885041b7cb246667cff3ceca74703.tar.gz
frameworks_base-5362f273e91885041b7cb246667cff3ceca74703.tar.bz2
Merge "Fix line height problem with inline images in StaticLayout." into mnc-dr-dev
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/text/StaticLayout.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/java/android/text/StaticLayout.java b/core/java/android/text/StaticLayout.java
index b0b08db..fdc6cb1 100644
--- a/core/java/android/text/StaticLayout.java
+++ b/core/java/android/text/StaticLayout.java
@@ -627,7 +627,9 @@ public class StaticLayout extends Layout {
chooseHt = getParagraphSpans(spanned, paraStart, paraEnd, LineHeightSpan.class);
- if (chooseHt.length != 0) {
+ if (chooseHt.length == 0) {
+ chooseHt = null; // So that out() would not assume it has any contents
+ } else {
if (chooseHtv == null ||
chooseHtv.length < chooseHt.length) {
chooseHtv = ArrayUtils.newUnpaddedIntArray(chooseHt.length);
@@ -810,7 +812,7 @@ public class StaticLayout extends Layout {
v = out(source, here, endPos,
fmAscent, fmDescent, fmTop, fmBottom,
- v, spacingmult, spacingadd, chooseHt,chooseHtv, fm, flags[breakIndex],
+ v, spacingmult, spacingadd, chooseHt, chooseHtv, fm, flags[breakIndex],
needMultiply, chdirs, dir, easy, bufEnd, includepad, trackpad,
chs, widths, paraStart, ellipsize, ellipsizedWidth,
lineWidths[breakIndex], paint, moreChars);