问题 The code below crashes in Kotlin/Android with the stack trace provided on the bottom. It was converted from Java/Android, which didn't have such a problem. Original Java code is provided as well. The crash happens when I try to add a character to a password field. Editing existing characters works well. I've two questions about it: What was Kotlin's motivation to replace java.lang.CharSequence with a Kotlin's CharSequence? These two are quite different, and I suspect that it causes the crash.