Perform Hilt Activity injection on a OnContextAvailableListener.
Delay Hilt activity injection to a OnContextAvailableListener to enable member injecting ViewModels with SavedStateHandle. Note that this means base Hilt classes should not rely on their fields being injected before their onCreate() since injection is moved into super.onCreate() as opposed to before.
RELNOTES=Delay Hilt activity injection to a OnContextAvailableListener to enable member injecting ViewModels with SavedStateHandle. To use the ContextAware APIs androidx.activity, androidx.fragment and androidx.lifecycle dependencies are updated across the Dagger libraries.
PiperOrigin-RevId: 357829271
diff --git a/WORKSPACE b/WORKSPACE
index 6c2b6b0..07724c9 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -104,10 +104,10 @@
artifacts = [
"androidx.annotation:annotation:1.1.0",
"androidx.appcompat:appcompat:1.2.0",
- "androidx.activity:activity:1.1.0",
- "androidx.fragment:fragment:1.2.5",
- "androidx.lifecycle:lifecycle-viewmodel:2.2.0",
- "androidx.lifecycle:lifecycle-viewmodel-savedstate:2.2.0",
+ "androidx.activity:activity:1.2.0",
+ "androidx.fragment:fragment:1.3.0",
+ "androidx.lifecycle:lifecycle-viewmodel:2.3.0",
+ "androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.0",
"androidx.multidex:multidex:2.0.1",
"androidx.savedstate:savedstate:1.0.0",
"androidx.test:monitor:1.1.1",