am 989699a6: Fix unit tests (InputLogicTestsDeadKeys).

* commit '989699a69003e1af89309692eb88b7611ebe071f':
  Fix unit tests (InputLogicTestsDeadKeys).
main
Keisuke Kuroyanagi 2014-10-23 13:22:52 +00:00 committed by Android Git Automerger
commit 1d947b3ff7
1 changed files with 4 additions and 1 deletions

View File

@ -218,7 +218,10 @@ public class DeadKeyCombiner implements Combiner {
@Nonnull
private static Event createEventChainFromSequence(final @Nonnull CharSequence text,
@Nonnull final Event originalEvent) {
Event lastEvent = originalEvent;
if (text.length() <= 0) {
return originalEvent;
}
Event lastEvent = null;
int codePoint = 0;
for (int i = text.length(); i > 0; i -= Character.charCount(codePoint)) {
codePoint = Character.codePointBefore(text, i);