Skip to content
Commit e57886e6 authored by Roozbeh Pournader's avatar Roozbeh Pournader
Browse files

Don't crash in TextUtil.concat() with paragraph spans

This switches TextUtils.concat() to use SpannableStringBuilder
if there are any spans in the input strings. As a result, we can
avoid crashes when concatenating two CharSequences can result in
paragraph spans that now don't happen to be at paragraph boundaries.

Also document the exact behavior of the method for edge cases based
on the previous implementation.

Change-Id: I9caffbe95ed729b9c10d63a9e7d22b1e8c7185a3
Fixes: 28271770
Test: CTS tests added and old CTS tests continue to pass.
Test: cts-tradefed run cts-dev --module CtsTextTestCases --test android.text.cts.TextUtilsTest
parent 5f0e4365
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment