You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure manually adding a fragment to the back stack fails
If you are using Navigation and do a manual fragment transaction that
attempts to add a fragment to the fragment manager's back stack, the
fragment manager and Navigation back stacks will fall out of sync and
cause unexpected behavior.
Instead of allowing this, we should always throw whenever a fragment
transaction attempts to add a fragment to the fragment manager back
stack.
RelNote: "When using Navigation with Fragments, attempting to manually
do a `FragmentTransaction` that adds a fragment to the
`FragmentManager`'s back stack will now throw an
`IllegalArgumentException`. You should always add fragments via the
`navigate()` API."
Test: added FragmentNavigatorTest
Change-Id: I6d38e3fac4b7552881655d18304d5efec6168d03
0 commit comments