AAPT2: Fix issue with styled string indices
Styled strings use spans to denote which part
is styled (<b>, <i>, etc). Spans are simply a range
of indices into the original string.
In Java, we use String and its internal representation, meaning
we must encode the indices using UTF16 lengths.
When the internal AAPT2 representation of strings switched to UTF8,
the indices also began to index into the UTF8 string.
This change reverts the indices to use UTF16 lengths.
Bug:31170115
Change-Id: I07b8b5b67d2542c7e0a855b601cdbd3ac4ebffb0
4 files changed