Fixed
Status Update
Comments
ra...@google.com <ra...@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?
Description
Devices/Android versions reproduced on: Google Pixel, P DP4
As presently implemented, setAllConstraintsMet() needs to be called *after* the work is enqueued in WorkManager. If you call setAllConstraintsMet() before the call to enqueue(), the subsequent enqueue() call returns immediately without actually executing the work.
Ideally, the order of events here should not matter -- we should be able to call setAllConstraintsMet() before or after enqueuing the work, particularly when using the SynchronousExecutor. However, if there are technical reasons why the work needs to be enqueued first before setAllConstraintsMet() is called, the documentation should be much plainer about that order-of-execution requirement.
Thanks!