Infeasible
Status Update
Comments
ji...@gmail.com <ji...@gmail.com> #2
I guess hidden should just be defined. Meaning, right now, hidden should just defined as "whether this fragment was hidden as part of a transaction". Hidden is not equivalent with visibility. I think that's where the confusion comes from.
dn...@google.com <dn...@google.com>
dn...@google.com <dn...@google.com> #3
We have passed this to the development team and will update this issue with more information as it becomes available.
ji...@gmail.com <ji...@gmail.com> #4
Yeah, I'm seeing this issue as well, currently this is the workaround that I've come up with:
// This method is called when hide()/show() methods are called on the transaction. Unfortunately Android doesn't
// propagate it to the child fragments (even though their visibility is affected by the parent visibility), so we
// do it manually.
override fun onHiddenChanged(hidden: Boolean) {
super.onHiddenChanged(hidden)
childFragmentManager.fragments.forEach { it.onHiddenChanged(hidden) }
}
// This method is called when hide()/show() methods are called on the transaction. Unfortunately Android doesn't
// propagate it to the child fragments (even though their visibility is affected by the parent visibility), so we
// do it manually.
override fun onHiddenChanged(hidden: Boolean) {
super.onHiddenChanged(hidden)
childFragmentManager.fragments.forEach { it.onHiddenChanged(hidden) }
}
pa...@gmail.com <pa...@gmail.com> #5
@4 That actually won't technically fix as isHidden() will technically mismatch with the state passed into the child fragment. Each child fragment legitimately needs to have their state set to hidden.
wa...@gmail.com <wa...@gmail.com> #6
Yeah, I realized that as I kept working further on it. Nevermind that solution, it doesn't work.
dn...@google.com <dn...@google.com> #7
@6 I don't know what the ramifications are, but when you iterate, you can save the "currentState" and then hide them all via a transaction. When restoring to visible, restore to the original state.
ji...@gmail.com <ji...@gmail.com> #8
Project: platform/frameworks/support
Branch: androidx-main
commit 02290cddca3d5e4dc94e2c5f77a6728ad970b204
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Oct 07 13:11:45 2021
Dispatch onHiddenChanged to child fragments
When a parent fragment is hidden all of its children will automatically
be hidden, but we never call onHiddenChanged on any of the children.
We should dispatch onHiddenChanged down parent's entire hierarchy and
ensure that `isHidden()` also considers the parent's state.
RelNote: "Parent fragments will now dispatch `onHiddenChanged()` down
their entire hierarchy before launching their own call back."
Test: added test
Bug: 77504618
Change-Id: Iedc201ab435cb963e81bc02d203d4d37ff827e01
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentViewTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentStateManager.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
M fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
https://android-review.googlesource.com/1850016
Branch: androidx-main
commit 02290cddca3d5e4dc94e2c5f77a6728ad970b204
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Oct 07 13:11:45 2021
Dispatch onHiddenChanged to child fragments
When a parent fragment is hidden all of its children will automatically
be hidden, but we never call onHiddenChanged on any of the children.
We should dispatch onHiddenChanged down parent's entire hierarchy and
ensure that `isHidden()` also considers the parent's state.
RelNote: "Parent fragments will now dispatch `onHiddenChanged()` down
their entire hierarchy before launching their own call back."
Test: added test
Bug: 77504618
Change-Id: Iedc201ab435cb963e81bc02d203d4d37ff827e01
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentViewTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentStateManager.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
M fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
pa...@gmail.com <pa...@gmail.com> #9
This has been fixed internally and will be available in the Fragment 1.4.0-beta01
release.
dn...@google.com <dn...@google.com> #10
OK please share the bugreport for the same.
Android bug report:
After reproducing the issue, navigate to developer settings, ensure ‘USB debugging’ is enabled, then enable ‘Bug report shortcut’. To take bug report, hold the power button and select the ‘Take bug report’ option.
Note: Please upload the files to google drive and share the folder to android-bugreport@google.com, then share the link here.
Android bug report:
After reproducing the issue, navigate to developer settings, ensure ‘USB debugging’ is enabled, then enable ‘Bug report shortcut’. To take bug report, hold the power button and select the ‘Take bug report’ option.
Note: Please upload the files to google drive and share the folder to android-bugreport@google.com, then share the link here.
dn...@google.com <dn...@google.com> #11
We are closing this issue as we don't have enough actionable information. If you are still facing this problem on latest android version, please open new issue and add the relevant information along with reference to earlier issue.
ji...@gmail.com <ji...@gmail.com> #12
Closing this bug is pretty disappointing to be honest.
I gave you everything you needed to be able reproduce this bug yourself.
Others comments on this bug suggest it happens on later model phones and
still with the current version of Android.
All users were able to use my work-around to stop the problem from
happening.
In comment #5 a user even wrote and supplied a program to help you
reproduce the problem.
I mean, what more information do you want?
This bug is likely to be affecting users in many corporate environments
that use proxy auto configuration scripts, and I would have thought it
would be in your interest to fix the bug.
If you don't want to fix it, why not assign it to someone else who does?
I gave you everything you needed to be able reproduce this bug yourself.
Others comments on this bug suggest it happens on later model phones and
still with the current version of Android.
All users were able to use my work-around to stop the problem from
happening.
In
reproduce the problem.
I mean, what more information do you want?
This bug is likely to be affecting users in many corporate environments
that use proxy auto configuration scripts, and I would have thought it
would be in your interest to fix the bug.
If you don't want to fix it, why not assign it to someone else who does?
pa...@gmail.com <pa...@gmail.com> #13
New bug report with the requested details:
https://code.google.com/p/android/issues/detail?id=225052
Everyone who starred/voted for this bug should star the new issue now.
Everyone who starred/voted for this bug should star the new issue now.
Description
The problem was not affecting Chrome.
When on 4G web browsing worked fine.
My WiFi network is configured to use 'proxy auto-config' and I have it pointing to the URL for a PAC script.
If I changed from a PAC script to manual proxy settings the browsing problem went away.
Network packet captures with wireshark showed that there was no attempt to send traffic to the websites I was requesting.
Eventually I stumbled onto the fact that everything started working if I plugged my phone into the charger.
If I unplugged it from the charger, web browsing stopped working again (I restarted Firefox each time).
So that lead me to investigate the new Battery Optimisation settings that were introduced with Android 6.
I found that if I disable Battery Optimisation for the ProxyHandler app, then the problem is resolved.
I'm reporting this so that it can be investigated so that in future versions of Android, the ProxyHandler app may be able to work with auto-config while in Battery Optimisation mode.