Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 84aea5ac44a2f97a76802e4b84bb3cb8c0c3432b
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Dec 08 10:37:29 2021
Change flans to ToT dependencies
Move Activity, Fragment, and Navigation to use ToT dependencies for
Lifecycle and Activity.
As a result of aosp/1804059 there will now be a dependency conflict
for any modules that rely on compose:ui and activity. Until compose
updates to the ToT Lifecycle dependencies, the modules will need to
resolve the conflict by explicit depending on the proper version.
Test: ./gradlew bOS
Bug: 207012584
Bug: 207012585
Bug: 207012490
Change-Id: I73830d0e00edfb3d917dbbc8f53d9942de98477c
M navigation/navigation-fragment/build.gradle
M compose/runtime/runtime/compose-runtime-benchmark/build.gradle
M navigation/navigation-compose/build.gradle
M settings.gradle
M fragment/fragment/build.gradle
M compose/integration-tests/material-catalog/build.gradle
M activity/activity/build.gradle
M fragment/fragment-testing/build.gradle
M compose/integration-tests/docs-snippets/build.gradle
M lifecycle/lifecycle-viewmodel-compose/build.gradle
M compose/foundation/foundation-layout/build.gradle
M navigation/navigation-common/build.gradle
M activity/activity-compose/samples/build.gradle
M fragment/fragment-ktx/build.gradle
M activity/activity-ktx/build.gradle
M compose/integration-tests/macrobenchmark-target/build.gradle
M navigation/navigation-runtime/build.gradle
M navigation/navigation-dynamic-features-fragment/build.gradle
M compose/ui/ui-tooling/build.gradle
M wear/compose/integration-tests/navigation/build.gradle
M activity/activity-compose/build.gradle
M compose/test-utils/build.gradle
https://android-review.googlesource.com/1915142
Branch: androidx-main
commit 84aea5ac44a2f97a76802e4b84bb3cb8c0c3432b
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Dec 08 10:37:29 2021
Change flans to ToT dependencies
Move Activity, Fragment, and Navigation to use ToT dependencies for
Lifecycle and Activity.
As a result of aosp/1804059 there will now be a dependency conflict
for any modules that rely on compose:ui and activity. Until compose
updates to the ToT Lifecycle dependencies, the modules will need to
resolve the conflict by explicit depending on the proper version.
Test: ./gradlew bOS
Bug: 207012584
Bug: 207012585
Bug: 207012490
Change-Id: I73830d0e00edfb3d917dbbc8f53d9942de98477c
M navigation/navigation-fragment/build.gradle
M compose/runtime/runtime/compose-runtime-benchmark/build.gradle
M navigation/navigation-compose/build.gradle
M settings.gradle
M fragment/fragment/build.gradle
M compose/integration-tests/material-catalog/build.gradle
M activity/activity/build.gradle
M fragment/fragment-testing/build.gradle
M compose/integration-tests/docs-snippets/build.gradle
M lifecycle/lifecycle-viewmodel-compose/build.gradle
M compose/foundation/foundation-layout/build.gradle
M navigation/navigation-common/build.gradle
M activity/activity-compose/samples/build.gradle
M fragment/fragment-ktx/build.gradle
M activity/activity-ktx/build.gradle
M compose/integration-tests/macrobenchmark-target/build.gradle
M navigation/navigation-runtime/build.gradle
M navigation/navigation-dynamic-features-fragment/build.gradle
M compose/ui/ui-tooling/build.gradle
M wear/compose/integration-tests/navigation/build.gradle
M activity/activity-compose/build.gradle
M compose/test-utils/build.gradle
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 3ed399947074201dab7d204f52dd808209061516
Author: Jeremy Woods <jbwoods@google.com>
Date: Fri Jan 07 11:52:11 2022
Allow providing extras to MutableCreationExtras
This provides an easy way for developers to merge provided
CreationExtras with extras of their own.
Also changed CreationExtras to a sealed class and removed
CombinedCreationExtras since MutableCreationExtras will now work for
that usecase.
RelNote: "You can now instantiate `MutableCreationExtras` with other
`CreationExtras` to easily retrieve elements from both."
Test: modified ViewModelProviderTest
Bug: 207012584
Change-Id: Ic096f586b9edd78f0eefdfc529ad1be13f9f331f
M lifecycle/lifecycle-viewmodel/api/current.txt
M lifecycle/lifecycle-viewmodel/src/main/java/androidx/lifecycle/viewmodel/CreationExtras.kt
M lifecycle/lifecycle-viewmodel/build.gradle
M lifecycle/lifecycle-viewmodel/api/restricted_current.txt
M lifecycle/lifecycle-viewmodel/src/test/java/androidx/lifecycle/ViewModelProviderTest.java
M lifecycle/lifecycle-viewmodel/api/public_plus_experimental_current.txt
A lifecycle/lifecycle-viewmodel/src/androidTest/java/androidx/lifecycle/CreationExtrasTest.kt
M lifecycle/lifecycle-viewmodel/src/main/java/androidx/lifecycle/ViewModelProvider.kt
https://android-review.googlesource.com/1941185
Branch: androidx-main
commit 3ed399947074201dab7d204f52dd808209061516
Author: Jeremy Woods <jbwoods@google.com>
Date: Fri Jan 07 11:52:11 2022
Allow providing extras to MutableCreationExtras
This provides an easy way for developers to merge provided
CreationExtras with extras of their own.
Also changed CreationExtras to a sealed class and removed
CombinedCreationExtras since MutableCreationExtras will now work for
that usecase.
RelNote: "You can now instantiate `MutableCreationExtras` with other
`CreationExtras` to easily retrieve elements from both."
Test: modified ViewModelProviderTest
Bug: 207012584
Change-Id: Ic096f586b9edd78f0eefdfc529ad1be13f9f331f
M lifecycle/lifecycle-viewmodel/api/current.txt
M lifecycle/lifecycle-viewmodel/src/main/java/androidx/lifecycle/viewmodel/CreationExtras.kt
M lifecycle/lifecycle-viewmodel/build.gradle
M lifecycle/lifecycle-viewmodel/api/restricted_current.txt
M lifecycle/lifecycle-viewmodel/src/test/java/androidx/lifecycle/ViewModelProviderTest.java
M lifecycle/lifecycle-viewmodel/api/public_plus_experimental_current.txt
A lifecycle/lifecycle-viewmodel/src/androidTest/java/androidx/lifecycle/CreationExtrasTest.kt
M lifecycle/lifecycle-viewmodel/src/main/java/androidx/lifecycle/ViewModelProvider.kt
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit fca6251684a11f480ced8fffca6783f87f187f47
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Dec 09 14:59:49 2021
Integrate CreationExtras into ComponentActivity
Providing access to default CreationExtras from ComponentActivity so
that they can be used by custom ViewModelProvider factories.
RelNote: "`ComponentActivity` now provides CreationExtras via the
`getDefaultViewModelCreationExtras()` method."
Test: ComponentActivityViewModelTest
Bug: 207012584
Change-Id: Ie7e00cf560026d19de728920f8c233a128ec24f3
M activity/activity/src/androidTest/java/androidx/activity/ComponentActivityViewModelTest.kt
M activity/activity/src/main/java/androidx/activity/ComponentActivity.java
https://android-review.googlesource.com/1917658
Branch: androidx-main
commit fca6251684a11f480ced8fffca6783f87f187f47
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Dec 09 14:59:49 2021
Integrate CreationExtras into ComponentActivity
Providing access to default CreationExtras from ComponentActivity so
that they can be used by custom ViewModelProvider factories.
RelNote: "`ComponentActivity` now provides CreationExtras via the
`getDefaultViewModelCreationExtras()` method."
Test: ComponentActivityViewModelTest
Bug: 207012584
Change-Id: Ie7e00cf560026d19de728920f8c233a128ec24f3
M activity/activity/src/androidTest/java/androidx/activity/ComponentActivityViewModelTest.kt
M activity/activity/src/main/java/androidx/activity/ComponentActivity.java
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit 223bd2a9d70bbbd235909c733ac8b821e887a4fa
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Dec 09 15:18:57 2021
Provide creation extras to ViewModel lazy
When using by viewModels, since they are normally called as part of
initialization, there is normally no application context attached yet.
This means creation extras passes has a null application associated with
its key, causing a failure. We should make sure the Creation extras are
accessed just in time.
RelNote: "The `by viewModels()` and `by activityViewModels()` Kotlin property extensions
now correctly pass `CreationExtras` to your `ViewModelProvider.Factory` when your `ViewModelStoreOwner` implements `getDefaultViewModelCreationExtras()`."
Test: modified existing tests
Bug: 207012584
Bug: 207012585
Bug: 207012490
Change-Id: I79f2bbd8ae78103d3ef764fd527674cdfb592936
M lifecycle/lifecycle-viewmodel/api/current.txt
M fragment/fragment-ktx/api/public_plus_experimental_current.txt
M activity/activity-ktx/src/main/java/androidx/activity/ActivityViewModelLazy.kt
M lifecycle/lifecycle-viewmodel/api/restricted_current.txt
M fragment/fragment-ktx/src/androidTest/java/androidx/fragment/app/FragmentViewModelLazyTest.kt
M fragment/fragment-ktx/api/current.txt
M fragment/fragment-ktx/src/main/java/androidx/fragment/app/FragmentViewModelLazy.kt
M fragment/fragment-ktx/api/restricted_current.txt
M lifecycle/lifecycle-viewmodel/api/public_plus_experimental_current.txt
M lifecycle/lifecycle-viewmodel/src/main/java/androidx/lifecycle/ViewModelLazy.kt
https://android-review.googlesource.com/1917657
Branch: androidx-main
commit 223bd2a9d70bbbd235909c733ac8b821e887a4fa
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Dec 09 15:18:57 2021
Provide creation extras to ViewModel lazy
When using by viewModels, since they are normally called as part of
initialization, there is normally no application context attached yet.
This means creation extras passes has a null application associated with
its key, causing a failure. We should make sure the Creation extras are
accessed just in time.
RelNote: "The `by viewModels()` and `by activityViewModels()` Kotlin property extensions
now correctly pass `CreationExtras` to your `ViewModelProvider.Factory` when your `ViewModelStoreOwner` implements `getDefaultViewModelCreationExtras()`."
Test: modified existing tests
Bug: 207012584
Bug: 207012585
Bug: 207012490
Change-Id: I79f2bbd8ae78103d3ef764fd527674cdfb592936
M lifecycle/lifecycle-viewmodel/api/current.txt
M fragment/fragment-ktx/api/public_plus_experimental_current.txt
M activity/activity-ktx/src/main/java/androidx/activity/ActivityViewModelLazy.kt
M lifecycle/lifecycle-viewmodel/api/restricted_current.txt
M fragment/fragment-ktx/src/androidTest/java/androidx/fragment/app/FragmentViewModelLazyTest.kt
M fragment/fragment-ktx/api/current.txt
M fragment/fragment-ktx/src/main/java/androidx/fragment/app/FragmentViewModelLazy.kt
M fragment/fragment-ktx/api/restricted_current.txt
M lifecycle/lifecycle-viewmodel/api/public_plus_experimental_current.txt
M lifecycle/lifecycle-viewmodel/src/main/java/androidx/lifecycle/ViewModelLazy.kt
jb...@google.com <jb...@google.com> #6
This has been added internally and will be available in the Activity 1.5.0-alpha01
release.
ro...@gmail.com <ro...@gmail.com> #7 Restricted+
Restricted+
Comment has been deleted.
Description
Component used: Activity
ViewModel added new APIs for providing information from
CreationExtras
ViewModelStoreOwner
s to ViewModel factories. This should be integrated intoComponentActivity
so that custom factories can rely on these extras being available.