Fixed
Status Update
Comments
il...@google.com <il...@google.com>
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #2
The removal of the nested graphs and using popUpTo the given fragment appears to prevent the crash from happening in 1.0.0-alpha11.
il...@google.com <il...@google.com> #3
Project: platform/prebuilts/androidx/internal
Branch: androidx-master-dev
commit 63bc1ff1fe7c348138295ee7efb8cdc2999622c0
Author: Ian Lake <ilake@google.com>
Date: Sun Feb 03 15:18:53 2019
Update prebuilts for Navigation 1.0.0-beta01
Include fix for b/123803044
Test: ./gradlew bOS
Change-Id: Icb2a50975541a7bd3327054c72a591c7689c9741
M android/arch/navigation/navigation-common/1.0.0-beta01/navigation-common-1.0.0-beta01.aar
M android/arch/navigation/navigation-common/1.0.0-beta01/navigation-common-1.0.0-beta01.aar.md5
M android/arch/navigation/navigation-common/1.0.0-beta01/navigation-common-1.0.0-beta01.aar.sha1
M android/arch/navigation/navigation-fragment/1.0.0-beta01/navigation-fragment-1.0.0-beta01-sources.jar
M android/arch/navigation/navigation-fragment/1.0.0-beta01/navigation-fragment-1.0.0-beta01-sources.jar.md5
M android/arch/navigation/navigation-fragment/1.0.0-beta01/navigation-fragment-1.0.0-beta01-sources.jar.sha1
M android/arch/navigation/navigation-fragment/1.0.0-beta01/navigation-fragment-1.0.0-beta01.aar
M android/arch/navigation/navigation-fragment/1.0.0-beta01/navigation-fragment-1.0.0-beta01.aar.md5
M android/arch/navigation/navigation-fragment/1.0.0-beta01/navigation-fragment-1.0.0-beta01.aar.sha1
M android/arch/navigation/navigation-runtime/1.0.0-beta01/navigation-runtime-1.0.0-beta01.aar
M android/arch/navigation/navigation-runtime/1.0.0-beta01/navigation-runtime-1.0.0-beta01.aar.md5
M android/arch/navigation/navigation-runtime/1.0.0-beta01/navigation-runtime-1.0.0-beta01.aar.sha1
M android/arch/navigation/navigation-ui/1.0.0-beta01/navigation-ui-1.0.0-beta01.aar
M android/arch/navigation/navigation-ui/1.0.0-beta01/navigation-ui-1.0.0-beta01.aar.md5
M android/arch/navigation/navigation-ui/1.0.0-beta01/navigation-ui-1.0.0-beta01.aar.sha1
https://android-review.googlesource.com/892878
https://goto.google.com/android-sha1/63bc1ff1fe7c348138295ee7efb8cdc2999622c0
Branch: androidx-master-dev
commit 63bc1ff1fe7c348138295ee7efb8cdc2999622c0
Author: Ian Lake <ilake@google.com>
Date: Sun Feb 03 15:18:53 2019
Update prebuilts for Navigation 1.0.0-beta01
Include fix for
Test: ./gradlew bOS
Change-Id: Icb2a50975541a7bd3327054c72a591c7689c9741
M android/arch/navigation/navigation-common/1.0.0-beta01/navigation-common-1.0.0-beta01.aar
M android/arch/navigation/navigation-common/1.0.0-beta01/navigation-common-1.0.0-beta01.aar.md5
M android/arch/navigation/navigation-common/1.0.0-beta01/navigation-common-1.0.0-beta01.aar.sha1
M android/arch/navigation/navigation-fragment/1.0.0-beta01/navigation-fragment-1.0.0-beta01-sources.jar
M android/arch/navigation/navigation-fragment/1.0.0-beta01/navigation-fragment-1.0.0-beta01-sources.jar.md5
M android/arch/navigation/navigation-fragment/1.0.0-beta01/navigation-fragment-1.0.0-beta01-sources.jar.sha1
M android/arch/navigation/navigation-fragment/1.0.0-beta01/navigation-fragment-1.0.0-beta01.aar
M android/arch/navigation/navigation-fragment/1.0.0-beta01/navigation-fragment-1.0.0-beta01.aar.md5
M android/arch/navigation/navigation-fragment/1.0.0-beta01/navigation-fragment-1.0.0-beta01.aar.sha1
M android/arch/navigation/navigation-runtime/1.0.0-beta01/navigation-runtime-1.0.0-beta01.aar
M android/arch/navigation/navigation-runtime/1.0.0-beta01/navigation-runtime-1.0.0-beta01.aar.md5
M android/arch/navigation/navigation-runtime/1.0.0-beta01/navigation-runtime-1.0.0-beta01.aar.sha1
M android/arch/navigation/navigation-ui/1.0.0-beta01/navigation-ui-1.0.0-beta01.aar
M android/arch/navigation/navigation-ui/1.0.0-beta01/navigation-ui-1.0.0-beta01.aar.md5
M android/arch/navigation/navigation-ui/1.0.0-beta01/navigation-ui-1.0.0-beta01.aar.sha1
Description
Version used:android.arch.navigation:navigation-ui:1.0.0-beta01
Devices/Android versions reproduced on: any
Navigation to a fragment destination with SingleTop option breaks back stack. The issue was introduced in beta01 update in commit 45818ac652ba3a43b07f980cf22ab78be886d81d by Ian Lake <ilake@google.com> on Wed Jan 30 10:45:37 2019 -0800.
I believe that the root of the issue is unnecessary "+ 1" in line 25 of androidx.navigation.fragment.FragmentNavigator.java:
ft.addToBackStack(generateBackStackName(mBackStack.size() + 1, destId));
When navigation is performed in SingleTop mode, the last fragment is being replaced making back stack 1 frame smaller.