Fixed
Status Update
Comments
ra...@google.com <ra...@google.com>
ap...@google.com <ap...@google.com> #2
Thanks for filing the issue.
This is a particularly hard device to come by - do you happen to have access to the device? If so could you provide us with the output of: adb shell dumpsys media.camera > info.txt
Thanks!
This is a particularly hard device to come by - do you happen to have access to the device? If so could you provide us with the output of: adb shell dumpsys media.camera > info.txt
Thanks!
Description
Component used: WorkManager Testing
Version used: 2.4.0
Devices/Android versions reproduced on: N/A
TestListenableWorkerBuilder
extension:If using the Hilt Work integration, this code doesn't work. You need to add the
HiltWorkerFactory
to the builder. But since the extension function doesn't include the factory in it's parameters, you need to set it afterwards using the Builder's.setWorkerFactory()
method. At this point, the reified type parameter is lost, and you have to cast the result of thebuild()
method to your worker type, as in the following modified example:If we have to do this cast to use the rest of the builder methods not supported by the extension, it defeats the purpose of the extension function's reification.
Thus, please add the ability to set the worker factory to the extension function, so we can get rid of the cast.