Spans added during a text change are broadcasted
More consistent with the SpanWatcher design.
Change-Id: I3a1e4d92fb422f4cc689dabcdef1473d93fef5ad
diff --git a/core/java/android/text/SpannableStringBuilder.java b/core/java/android/text/SpannableStringBuilder.java
index b708750..d0c87c6 100644
--- a/core/java/android/text/SpannableStringBuilder.java
+++ b/core/java/android/text/SpannableStringBuilder.java
@@ -338,7 +338,7 @@
en = tbend;
if (getSpanStart(spans[i]) < 0) {
- setSpan(false, spans[i],
+ setSpan(true, spans[i],
st - tbstart + start,
en - tbstart + start,
sp.getSpanFlags(spans[i]));
@@ -579,8 +579,7 @@
mSpanEnds[i] = end;
mSpanFlags[i] = flags;
- if (send)
- sendSpanChanged(what, ostart, oend, nstart, nend);
+ if (send) sendSpanChanged(what, ostart, oend, nstart, nend);
return;
}
@@ -610,8 +609,7 @@
mSpanFlags[mSpanCount] = flags;
mSpanCount++;
- if (send)
- sendSpanAdded(what, nstart, nend);
+ if (send) sendSpanAdded(what, nstart, nend);
}
/**