Avoid ambiguous overloads in SpannableStringInternal.
As documented in Effective Java (http://go/ej3e#page=259), overloaded
methods with the same number of parameters can be confusing when the
parameters are in the same type hierarchy.
Aside from readability concerns, this may be related to some crashes
observed in Photos Android. For example in b/144849105 AutoCompleteViewBinder
calls the SpannedString constructor, which delegates to SpannedStringInternal.
The overload of copySpans that accepts a SpannedStringInternal has a call to
isOutOfCopyRange that should make the failure in checkRange impossible.
Bug: 144849105
Test: Simple refactor.
Change-Id: I47d01cffe6f66c4d631a9ef1341bf118fb6e51e4
1 file changed