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 3f3a176fdcec1d69140b531fec2a4d2bc2ed7350
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Jan 12 09:06:28 2022
Integrate CreationExtras into Fragment
Providing access to default CreationExtras from Fragment so they can be
used by custom ViewModelProvider factories.
Also did the same for the FragmentViewLifecycleOwner.
The error message before you the call to enableSavedStateHandles() is
currently not very helpful to devs since it is does not indicate that
you need to wait until onCreate(), but we will address that separately.
RelNote: "`Fragment` and `FragmentViewLifecycleOwner` now provide `CreationExtras` via the `getDefaultViewModelCreationExtras()` method."
Test: ViewModelTest, FragmentViewLifecycleOwnerTest
Bug: 207012585
Change-Id: I3060ba63bae3019489fc54eb116c3b4c1e50d8a1
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentViewLifecycleOwnerTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
M fragment/fragment/src/androidTest/java/androidx/fragment/app/ViewModelTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentViewLifecycleOwner.java
https://android-review.googlesource.com/1946887
Branch: androidx-main
commit 3f3a176fdcec1d69140b531fec2a4d2bc2ed7350
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Jan 12 09:06:28 2022
Integrate CreationExtras into Fragment
Providing access to default CreationExtras from Fragment so they can be
used by custom ViewModelProvider factories.
Also did the same for the FragmentViewLifecycleOwner.
The error message before you the call to enableSavedStateHandles() is
currently not very helpful to devs since it is does not indicate that
you need to wait until onCreate(), but we will address that separately.
RelNote: "`Fragment` and `FragmentViewLifecycleOwner` now provide `CreationExtras` via the `getDefaultViewModelCreationExtras()` method."
Test: ViewModelTest, FragmentViewLifecycleOwnerTest
Bug: 207012585
Change-Id: I3060ba63bae3019489fc54eb116c3b4c1e50d8a1
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentViewLifecycleOwnerTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
M fragment/fragment/src/androidTest/java/androidx/fragment/app/ViewModelTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentViewLifecycleOwner.java
jb...@google.com <jb...@google.com> #5
This has been fixed internally and will be available in the Fragment 1.5.0-alpha01
release.
Description
Component used: Fragment
ViewModel added new APIs for providing information from
CreationExtras
ViewModelStoreOwner
s to ViewModel factories. This should be integrated intoFragment
so that custom factories can rely on these extras being available.