Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Version used: androidx.startup:startup-runtime:1.1.1, androidx.work:work-runtime:2.8.1
Devices/Android versions reproduced on: 13, 14
The startup system allows you to disable certain Initializers using the AndroidManifest. Disablinghttps://developer.android.com/training/dependency-injection/hilt-jetpack#workmanager
WorkManagerInitializer
and implementingConfiguration.Provider.getWorkManagerConfiguration
is recommended practice e.g. when you want to use Hilt for WorkManagers:However, if you need to usehttps://developer.android.com/topic/libraries/app-startup#startup-initialize
WorkManager
in your own customInitializer
, documentation suggests to let yourInitializer
depend onWorkManagerInitializer
:Now the latter will prevent the first mechanism from working, because your customhttps://github.com/urbanairship/android-library/issues/202#issuecomment-1816426396
Initializer
will pull inWorkManagerInitializer
even though it is removed from AppStartup. This becomes especially dangerous and will lead to unexpected behaviour, if you pull in an external library which provides a Initializer depending onWorkManagerInitializer
. The external library will break your existing app without getting a compile error. See Airship for an example of this problem: