OSDN Git Service

Faster and simpler replace in SSB
authorGilles Debunne <debunne@google.com>
Wed, 4 Apr 2012 22:35:30 +0000 (15:35 -0700)
committerGilles Debunne <debunne@google.com>
Wed, 4 Apr 2012 22:52:38 +0000 (15:52 -0700)
commitebd9a23817052c4d2aaa1058efa2b80b08003d4a
treed632e87ca661ed0dc3c01f857673f072f8fbfc90
parent75cf9e19a575c28c200c02c0ab6f83bb79f5c50d
Faster and simpler replace in SSB

The original method was adding a suspicious space that was eventually
removed with a series of 3 calls to change.

This should not be necessary. I have tested this with various gap
positions and lengths, for all replace cases I could think of.

The test can not be added to the CTS as it would need to expose the
internal resizeFor and moveGapTo methods.

Change-Id: I194457fbcfd758fa69a7f380665cfd5ae4d3f1d4
core/java/android/text/SpannableStringBuilder.java