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 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
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit d1cf536a678b8853c690abe1c515510688a5995a
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Jan 19 13:05:13 2022
Integrate CreationExtras into NavBackStackEntry
Providing access to default CreationExtras from NavBackStackEntry so
they can be used by custom ViewModelProvider factories.
Also updated navGraphViewModel() to use extas.
RelNote: "`NavBackStackEntry` now provides `CreationExtras` via the
`getDefaultViewModelCreationExtras()` function."
Test: NavBackStackEntryTest
Bug: 207012490
Change-Id: Ib9fe2eadbad3bb89e1685e3f3409acca92ab5b95
M navigation/navigation-runtime/src/androidTest/java/androidx/navigation/NavBackStackEntryTest.kt
M navigation/navigation-common/build.gradle
M navigation/navigation-fragment/src/main/java/androidx/navigation/NavGraphViewModelLazy.kt
M navigation/navigation-common/src/main/java/androidx/navigation/NavBackStackEntry.kt
https://android-review.googlesource.com/1947312
Branch: androidx-main
commit d1cf536a678b8853c690abe1c515510688a5995a
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Jan 19 13:05:13 2022
Integrate CreationExtras into NavBackStackEntry
Providing access to default CreationExtras from NavBackStackEntry so
they can be used by custom ViewModelProvider factories.
Also updated navGraphViewModel() to use extas.
RelNote: "`NavBackStackEntry` now provides `CreationExtras` via the
`getDefaultViewModelCreationExtras()` function."
Test: NavBackStackEntryTest
Bug: 207012490
Change-Id: Ib9fe2eadbad3bb89e1685e3f3409acca92ab5b95
M navigation/navigation-runtime/src/androidTest/java/androidx/navigation/NavBackStackEntryTest.kt
M navigation/navigation-common/build.gradle
M navigation/navigation-fragment/src/main/java/androidx/navigation/NavGraphViewModelLazy.kt
M navigation/navigation-common/src/main/java/androidx/navigation/NavBackStackEntry.kt
jb...@google.com <jb...@google.com> #5
We've fixed this issue internally and it will be available in the Navigation 2.5.0-alpha01
release.
Description
Component used: Navigation
ViewModel added new APIs for providing information from
CreationExtras
ViewModelStoreOwner
s to ViewModel factories. This should be integrated intoNavBackStackEntry
so that custom factories can rely on these extras being available.