OSDN Git Service

TextUtils: track behavior change of Pattern.split() when targeting > 28.
authorTobias Thierer <tobiast@google.com>
Thu, 21 Jun 2018 09:31:39 +0000 (10:31 +0100)
committerTobias Thierer <tobiast@google.com>
Tue, 26 Jun 2018 13:48:47 +0000 (14:48 +0100)
commit3e76c04c964e798723c4686e82425c4c182aa57b
tree2fef8877715bc94e5d887d30169aece105c8dafb
parentb1fc5a4c7ee9dffe48f143c580d88ee4862f3c2e
TextUtils: track behavior change of Pattern.split() when targeting > 28.

Another CL in this topic changes the behavior of String.split() and
Pattern.split() to omit a "" generated by a leading zero-width match.
TextUtils.split() is implemented on top of these methods and therefore
adopts the behavior change by default.

The behavior change only affects apps targeting API versions > 28.

Test: cts-tradefed run singleCommand cts-dev -m CtsTextTestCases \
      -t android.text.cts.TextUtilsTest
Test: cts-tradefed run singleCommand cts-dev -m CtsLibcoreTestCases
Bug: 109659282

Change-Id: I8abe251353f8eacf1429ac9a8e272d50a0944c29
core/java/android/text/TextUtils.java