Fixed
Status Update
Comments
jb...@google.com <jb...@google.com> #2
Hi Ed, Thank you so much for these suggestions. I've been reviewing them and merging them in. Hopefully it should be live. I've included a thank you note too in the article.
jb...@google.com <jb...@google.com> #3
Great! Thanks a lot, I'll look for the live updates soon!
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 448093dd529e151c486343aedcfb1f656abe9819
Author: Jeremy Woods <jbwoods@google.com>
Date: Tue Sep 13 13:34:06 2022
Dispatch config change on added fragmentManagers
With the new provider callbacks, each fragment manager registers for
config change with the host once it is attached, and does not unregister
until it is destroyed. This means that even after fragments have been
put on the back stack, their childFragmentManagers can still dispatch
config changes, even though the fragment is not currently added.
We need to make it so that only added fragments (and their child
fragment managers) dispatch config changes.
RelNote: "Fixed an error that caused fragments on the back stack to get
onConfigurationChanged() callbacks."
Test: Added ProviderCallbackTest
Bug: 242570955
Fixes: 243982866
Change-Id: I8dfe68f7b8700f0c1d3b13a3d5b826fc924b7452
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
M fragment/fragment/src/androidTest/java/androidx/fragment/app/ProviderCallbackTest.kt
https://android-review.googlesource.com/2216147
Branch: androidx-main
commit 448093dd529e151c486343aedcfb1f656abe9819
Author: Jeremy Woods <jbwoods@google.com>
Date: Tue Sep 13 13:34:06 2022
Dispatch config change on added fragmentManagers
With the new provider callbacks, each fragment manager registers for
config change with the host once it is attached, and does not unregister
until it is destroyed. This means that even after fragments have been
put on the back stack, their childFragmentManagers can still dispatch
config changes, even though the fragment is not currently added.
We need to make it so that only added fragments (and their child
fragment managers) dispatch config changes.
RelNote: "Fixed an error that caused fragments on the back stack to get
onConfigurationChanged() callbacks."
Test: Added ProviderCallbackTest
Bug: 242570955
Fixes: 243982866
Change-Id: I8dfe68f7b8700f0c1d3b13a3d5b826fc924b7452
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
M fragment/fragment/src/androidTest/java/androidx/fragment/app/ProviderCallbackTest.kt
jb...@google.com <jb...@google.com> #5
This has been fixed internally and will be available in the Fragment 1.5.3
release.
na...@google.com <na...@google.com> #6
This bug was linked in a change in the following release(s):
androidx.fragment:fragment:1.6.0-alpha03
na...@google.com <na...@google.com> #7
This bug was linked in a change in the following release(s):
androidx.fragment:fragment:1.5.3
na...@google.com <na...@google.com> #8
This bug was linked in a change in the following release(s):
androidx.fragment:fragment:1.6.0-alpha03
Description
Version used: 1.5.2
Devices/Android versions reproduced on: Android 11 phone, but actually I believe it does not matter
If this is a bug in the library, we would appreciate if you could attach:
see README in the project for details including how to reproduce the issue.
This behavior appeared in 1.5.2 library version. Version 1.4.* do not have such problem.