Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 92cb6fd8779a37ccf693c06d7d3608259106271c
Author: Sanura N'Jaka <sanura@google.com>
Date: Tue Sep 27 18:06:02 2022
Remove tests allowing nested fragments without childFragmentManager
Since having nested fragments without using
childFragmentManager should not be supported,
we want to remove the tests that allow this
and put the functionality behind a flag in
FragmentStrictMode in a subsequent change.
RelNote: "When nesting Fragments, always use the
appropriate FragmentManager."
Test: bOS
Bug: 249299268
Change-Id: I23cb2c8a00657772f5a6634c82a9a8cd068965ea
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentManagerTest.kt
https://android-review.googlesource.com/2235295
Branch: androidx-main
commit 92cb6fd8779a37ccf693c06d7d3608259106271c
Author: Sanura N'Jaka <sanura@google.com>
Date: Tue Sep 27 18:06:02 2022
Remove tests allowing nested fragments without childFragmentManager
Since having nested fragments without using
childFragmentManager should not be supported,
we want to remove the tests that allow this
and put the functionality behind a flag in
FragmentStrictMode in a subsequent change.
RelNote: "When nesting Fragments, always use the
appropriate FragmentManager."
Test: bOS
Bug: 249299268
Change-Id: I23cb2c8a00657772f5a6634c82a9a8cd068965ea
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentManagerTest.kt
il...@google.com <il...@google.com>
sa...@google.com <sa...@google.com>
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 5020e04fbdb1e3c8de4e0d7da9f45a097c60a13f
Author: sanura <sanura@google.com>
Date: Mon Nov 14 23:25:08 2022
Put nested fragment without childFragmentManager behind flag
When nesting fragments, the child fragment should
be added using the parent's childFragmentManager.
However, since we previously allowed this
functionality, we want to put its removal behind
a flag in FragmentStrictMode.
RelNote: "The functionality of nested fragments
without the use of the parent's
`childFragmentManager` is now behind a flag in
`FragmentStrictMode`, which can be enabled to
check for violations."
Bug: 249299268
Test: ./gradlew checkApi
Change-Id: I725210f957b9be5875f7c0eadaaa992deda6614a
M fragment/fragment/api/current.txt
M fragment/fragment/api/public_plus_experimental_current.txt
M fragment/fragment/api/restricted_current.txt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/strictmode/FragmentStrictModeTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentStateManager.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentStrictMode.kt
A fragment/fragment/src/main/java/androidx/fragment/app/strictmode/WrongNestedHierarchyViolation.kt
https://android-review.googlesource.com/2288634
Branch: androidx-main
commit 5020e04fbdb1e3c8de4e0d7da9f45a097c60a13f
Author: sanura <sanura@google.com>
Date: Mon Nov 14 23:25:08 2022
Put nested fragment without childFragmentManager behind flag
When nesting fragments, the child fragment should
be added using the parent's childFragmentManager.
However, since we previously allowed this
functionality, we want to put its removal behind
a flag in FragmentStrictMode.
RelNote: "The functionality of nested fragments
without the use of the parent's
`childFragmentManager` is now behind a flag in
`FragmentStrictMode`, which can be enabled to
check for violations."
Bug: 249299268
Test: ./gradlew checkApi
Change-Id: I725210f957b9be5875f7c0eadaaa992deda6614a
M fragment/fragment/api/current.txt
M fragment/fragment/api/public_plus_experimental_current.txt
M fragment/fragment/api/restricted_current.txt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/strictmode/FragmentStrictModeTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentStateManager.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentStrictMode.kt
A fragment/fragment/src/main/java/androidx/fragment/app/strictmode/WrongNestedHierarchyViolation.kt
sa...@google.com <sa...@google.com> #4
This has been completed internally and will be available in the Fragment 1.6.0-alpha04 release.
ju...@google.com <ju...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.fragment:fragment:1.6.0-alpha04
Description
In aosp/1244918, we added checks for developers using nested fragments without using the childFragmentManager. Since this is not how nested fragments should be used, we want to remove this functionality. However, since it may break people, let's put this behind a flag in FragmentStrictMode.