3463c04b515426b74c5a92cb8de7d657b7c255c0 |
|
06-Jan-2016 |
Siyamed Sinir <siyamed@google.com> |
Fix SpannableStringBuilder.replace() exception. When SpannableStringBuilder.replace is called with a source text that contains a span with SPAN_PARAGRAPH flag, the code tries to retain the spans. However when the paragraph boundary constraint is not satisfied, setSpan method throws an exception. Updated the rule as: if the source text has a span with SPAN_PARAGRAPH flag check if it can be copied into the target. If not, discard the span. Also updated the JavaDoc for Spanned and Editable. Bug: 22521443 Change-Id: Ie8541e00bfdf5b8b0115ad7b26cb9f83a6a3ee55
/frameworks/base/core/java/android/text/Editable.java
|