Fixed
Status Update
Comments
kr...@gmail.com <kr...@gmail.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 57ca221882695bd6a52549f4d9ea3b812e6fe87c
Author: Simon Schiller <simonschiller@users.noreply.github.com>
Date: Mon Mar 22 16:09:30 2021
[GH] [FragmentStrictMode] Detect <fragment> tag usage
## Proposed Changes
- Detect `<fragment>` tag usage inside XML layouts
## Testing
Test: See `FragmentStrictModeTest#detectFragmentTagUsage`
## Issues Fixed
Fixes: 153738235
This is an imported pull request fromhttps://github.com/androidx/androidx/pull/141 .
Resolves #141
Github-Pr-Head-Sha: 4ea052596e4341b9f11bcf335e2bc38045a91f19
GitOrigin-RevId: 62e7487aa4874eef6bb556490e193717cf937251
Change-Id: Iae48578e85e4e4897f806d7ade2e2a660adf9479
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/FragmentLayoutInflaterFactory.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentStrictMode.java
A fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentTagUsageViolation.java
https://android-review.googlesource.com/1649748
Branch: androidx-main
commit 57ca221882695bd6a52549f4d9ea3b812e6fe87c
Author: Simon Schiller <simonschiller@users.noreply.github.com>
Date: Mon Mar 22 16:09:30 2021
[GH] [FragmentStrictMode] Detect <fragment> tag usage
## Proposed Changes
- Detect `<fragment>` tag usage inside XML layouts
## Testing
Test: See `FragmentStrictModeTest#detectFragmentTagUsage`
## Issues Fixed
Fixes: 153738235
This is an imported pull request from
Resolves #141
Github-Pr-Head-Sha: 4ea052596e4341b9f11bcf335e2bc38045a91f19
GitOrigin-RevId: 62e7487aa4874eef6bb556490e193717cf937251
Change-Id: Iae48578e85e4e4897f806d7ade2e2a660adf9479
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/FragmentLayoutInflaterFactory.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentStrictMode.java
A fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentTagUsageViolation.java
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit ce926c1290a188c0ae8b363f2d8c31dbd7738df1
Author: Jeremy Woods <jbwoods@google.com>
Date: Fri Sep 13 21:57:52 2024
Consider seeking when cancelling transition effects
Currently if you run a seekable transitions, when the operation is
cancelled, we always attempt to reverse the transition. The problem is
that there are cases when we actually want to finish the transition.
If the operation is cancelled by another incoming operation, (i.e. there
was a fragment transaction) we have been interrupted and should try to
reverse the transition. However, if the operation is cancelled by
forceComplete (i.e. fragment manager state changes, another back event,
executePendingActions, etc), we want to finish the transition.
This change looks at the seeking status of the operation, inside the
effect so that effects can now cancel with and without seeking. This
allows the TransitionEffect to consider seeking when deciding whether to
reverse the transition.
RelNote: "Fixed an issue where quickly pressing system back or doing
fast gesture back will cause Fragments to crash."
Test: Added test in transition
Bug: 364804225
Fixes: 364914301
Change-Id: Ibc038d8db7c3e7903a4dc8bfa556883705d27ee8
M fragment/fragment/src/main/java/androidx/fragment/app/DefaultSpecialEffectsController.kt
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.kt
M transition/transition/src/androidTest/java/androidx/transition/FragmentTransitionSeekingTest.kt
https://android-review.googlesource.com/3263864
Branch: androidx-main
commit ce926c1290a188c0ae8b363f2d8c31dbd7738df1
Author: Jeremy Woods <jbwoods@google.com>
Date: Fri Sep 13 21:57:52 2024
Consider seeking when cancelling transition effects
Currently if you run a seekable transitions, when the operation is
cancelled, we always attempt to reverse the transition. The problem is
that there are cases when we actually want to finish the transition.
If the operation is cancelled by another incoming operation, (i.e. there
was a fragment transaction) we have been interrupted and should try to
reverse the transition. However, if the operation is cancelled by
forceComplete (i.e. fragment manager state changes, another back event,
executePendingActions, etc), we want to finish the transition.
This change looks at the seeking status of the operation, inside the
effect so that effects can now cancel with and without seeking. This
allows the TransitionEffect to consider seeking when deciding whether to
reverse the transition.
RelNote: "Fixed an issue where quickly pressing system back or doing
fast gesture back will cause Fragments to crash."
Test: Added test in transition
Bug: 364804225
Fixes: 364914301
Change-Id: Ibc038d8db7c3e7903a4dc8bfa556883705d27ee8
M fragment/fragment/src/main/java/androidx/fragment/app/DefaultSpecialEffectsController.kt
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.kt
M transition/transition/src/androidTest/java/androidx/transition/FragmentTransitionSeekingTest.kt
jb...@google.com <jb...@google.com> #4
This has been fixed internally and will be available in the Fragment 1.8.4
release.
pr...@google.com <pr...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.fragment:fragment:1.8.4
kr...@gmail.com <kr...@gmail.com> #6
I just updated the example project and both crashes are indeed fixed. Thanks a lot!
pr...@google.com <pr...@google.com> #7
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.transition:transition:1.6.0-alpha01
Description
Component used: Fragment
Version used:
Devices/Android versions reproduced on:
(this was already marked as fixed in https://issuetracker.google.com/issues/338624457 , but the crash still exists in the latest library versions)
You can find a minimal sample repo here:https://github.com/kroegerama/android-fragment-crash-sample
Setup in fragment:
I'm getting this crash, when I navigate forward multiple times (navigate(FragFooDirections.actionFooBar())) and then repeatedly in quick succession use the back gesture or back button (popBackStack()).