Fixed
Status Update
Comments
il...@google.com <il...@google.com>
jb...@google.com <jb...@google.com>
cl...@google.com <cl...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 42d5037be3a80f5ff840eee1f0a74bfb8f287d66
Author: Ben Weiss <benweiss@google.com>
Date: Thu Dec 10 16:20:02 2020
Add factory functions for DynamicNavHostFragment
Bug: 175222619
Test: updateApi and cAT
RelNote: Add factory functions for DynamicNavHostFragment
Change-Id: Icd51523a8f3cc3f93fffc1796c6a270bc28eaede
M navigation/navigation-dynamic-features-fragment/api/current.txt
M navigation/navigation-dynamic-features-fragment/api/public_plus_experimental_current.txt
M navigation/navigation-dynamic-features-fragment/api/restricted_current.txt
M navigation/navigation-dynamic-features-fragment/src/androidTest/java/androidx/navigation/dynamicfeatures/fragment/DynamicFragmentNavigatorDestinationBuilderTest.kt
M navigation/navigation-dynamic-features-fragment/src/androidTest/java/androidx/navigation/dynamicfeatures/fragment/DynamicNavHostFragmentTest.kt
M navigation/navigation-dynamic-features-fragment/src/main/java/androidx/navigation/dynamicfeatures/fragment/DynamicNavHostFragment.kt
M navigation/navigation-fragment/src/main/java/androidx/navigation/fragment/NavHostFragment.java
https://android-review.googlesource.com/1523818
Branch: androidx-master-dev
commit 42d5037be3a80f5ff840eee1f0a74bfb8f287d66
Author: Ben Weiss <benweiss@google.com>
Date: Thu Dec 10 16:20:02 2020
Add factory functions for DynamicNavHostFragment
Bug: 175222619
Test: updateApi and cAT
RelNote: Add factory functions for DynamicNavHostFragment
Change-Id: Icd51523a8f3cc3f93fffc1796c6a270bc28eaede
M navigation/navigation-dynamic-features-fragment/api/current.txt
M navigation/navigation-dynamic-features-fragment/api/public_plus_experimental_current.txt
M navigation/navigation-dynamic-features-fragment/api/restricted_current.txt
M navigation/navigation-dynamic-features-fragment/src/androidTest/java/androidx/navigation/dynamicfeatures/fragment/DynamicFragmentNavigatorDestinationBuilderTest.kt
M navigation/navigation-dynamic-features-fragment/src/androidTest/java/androidx/navigation/dynamicfeatures/fragment/DynamicNavHostFragmentTest.kt
M navigation/navigation-dynamic-features-fragment/src/main/java/androidx/navigation/dynamicfeatures/fragment/DynamicNavHostFragment.kt
M navigation/navigation-fragment/src/main/java/androidx/navigation/fragment/NavHostFragment.java
ap...@google.com <ap...@google.com> #3
I couldn't seem to find the create method in my codebase on the latest Navigation release 2.3.5. Has this change been merged into latest release?
cl...@google.com <cl...@google.com> #4
This adds new APIs therefore will be available in Navigation 2.4.0-alpha01.
pr...@google.com <pr...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.2
androidx.lifecycle:lifecycle-viewmodel-savedstate:2.7.0-alpha02
Description
Component used:
androidx.navigation.compose
Version used:
2.6.0
Devices/Android versions reproduced on: Emulator (Resizable, API 33), but seen of many devices in the wild.
Summary
When using the
dialog
extension method to add a navigation destination. If the content inside has aViewModel
that uses theSavedStateHandle
. When the app is sent to the background, killed by the system, and then restored, theSavedStateHandle
is empty.In addition the use of a
rememberSaveable
in the content of thedialog
doesn't restore its value after process death either.Sample Project
A demo project Available on GitHub with reproduction steps.
Screen recording
Screen recording is attached, in which "Don't Keep Activities" is turned on to simulate the process death.