Bug P3
Status Update
Comments
ma...@gmail.com <ma...@gmail.com> #2
I'm not sure how to edit the description. But forgot to add that this will work when the app is in the foreground. It just doesn't work when you lock your device. I test this by moving the app to the background and then locking my device and checking the logs in Android Studio.
Description
I was using
WorkManager
with a configuration that injects aHiltWorkerFactory
so the individual workers can in-turn inject things they need (e.g., DAOs).This was working fine, no lint errors.
I modified this to move the
WorkManager
initialisation to anandroidx.startup.Initializer
.This works with no problem, as expected -- e.g.,
WorkManager.initialize()
documentation is explicit that this method can be called in a content provider.However, the
BadConfigurationProvider
lint error only checks to see if theApplication
implementsConfiguration.Provider
, and doesn't check content providers. This is a fatal lint error.It's a reasonable limitation of the lint check, but the error message is overly specific. It's currently:
If the rest of the documentation is correct the "must" in that error is too strong. A better error message might be:
and the severity should probably be warning.
androidx.startup
withHiltWorkerFactory
.