Fixed
Status Update
Comments
kl...@google.com <kl...@google.com>
ap...@google.com <ap...@google.com> #2
A couple of questions:
1. Have you saw crash in real device or only in simulators?
2. Do you use dynamic feature for language ID?
1. Have you saw crash in real device or only in simulators?
2. Do you use dynamic feature for language ID?
na...@google.com <na...@google.com> #3
Tested on Android 12 Emulator with custom executor, but cannot repro this issue.
Description
We have tests for things like that certain types of text changes don't cause too many recompositions. Those tests pass when sending commands through the IME command code path, but fail when going through the semantics code path. The semantics code path is very different than IME: we just directly invoke the
onValueChanged
callback.This is an opportunity for other bugs as well – internal state can get out of sync because one way of mutating it updates internal state directly, and the other asks the composition to update our state on the next frame.
Semantics actions should go through the same code paths as IME commands, or as close as possible.
For example, the
TextFieldTests.textField_stringOverload_doesNotCallOnValueChange_whenCompositionUpdatesOnly
test fails if text clearance is performed via theSetText
action instead of IME commands. They should behave the same.