am b224594a: Merge "Fix a concurrency bug that ends up in a crash."

* commit 'b224594aca568be0353404a26e101dd5f7f23f8b':
  Fix a concurrency bug that ends up in a crash.
main
Jean Chalard 2014-10-23 09:19:07 +00:00 committed by Android Git Automerger
commit f3864708d9
1 changed files with 3 additions and 1 deletions

View File

@ -367,7 +367,9 @@ public final class RichInputConnection implements PrivateCommandPerformer {
}
// This never calls InputConnection#getCapsMode - in fact, it's a static method that
// never blocks or initiates IPC.
return CapsModeUtils.getCapsMode(mCommittedTextBeforeComposingText, inputType,
// TODO: don't call #toString() here. Instead, all accesses to
// mCommittedTextBeforeComposingText should be done on the main thread.
return CapsModeUtils.getCapsMode(mCommittedTextBeforeComposingText.toString(), inputType,
spacingAndPunctuations, hasSpaceBefore);
}