Status Update
Comments
jb...@google.com <jb...@google.com> #2
da...@gmail.com <da...@gmail.com> #3
Great! Thanks a lot, I'll look for the live updates soon!
va...@gmail.com <va...@gmail.com> #4
Yes we do see this crash with the latest activity version you mentioned. Thanks for the repro from #3
jb...@google.com <jb...@google.com> #5
Trying this with the provided test app and I still can't get a crash? Are there any other instructions that may help here?
da...@gmail.com <da...@gmail.com> #6
You can see in the screen record back_all_crash_20240912_114158.webm
Is also is possible to do it clicking very fast on hardware back button you can see in the screen record:
human_click_crash_20240912_115148.webm
jb...@google.com <jb...@google.com>
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-main
Author: Jeremy Woods <
Link:
Fix failing PredictiveBackHandler enabled changes
Expand for full commit details
Fix failing PredictiveBackHandler enabled changes
As part of asop/3164566 we attempted to fix an error with
PredictiveBackHandler by closing the internal onBackInstance when the
enabled status changed. This would have worked, except by the time we
made it to the LaunchedEffect the onBackInstance was always null, so we
weren't closing anything.
I believe the cause of this is that `onBackInstance` was a field of a
function and we couldn't reference it across different calls. Because we
needed to change it as part of the backCallback, it also could not be
remembered.
So instead of using the onBackInstance, we can just use the callback
`isEnabled` state directly by passing the callback to the
`OnBackInstance`. This ensures that we only fire the `onBack` callback
when the function is actually enabled.
Test: PredictiveBackHandlerTest, tested and confirmed in sample app
Bug: 365027664
Bug: 340202286
RelNote: "`PredictiveBackHandler` will no longer fire it's callback
after the handler has been disabled. This will fix an issue where
the `NavHost` from Navigation Compose would throw an
`IndexOutOfBoundsException`."
Change-Id: I3f75eb2415f39b914f18cf4b87bf4ed57bb5a483
Files:
- M
activity/activity-compose/src/androidTest/java/androidx/activity/compose/PredictiveBackHandlerTest.kt
- M
activity/activity-compose/src/main/java/androidx/activity/compose/PredictiveBackHandler.kt
Hash: 1658eca1da25d8092f3cd48806946edcdec73688
Date: Thu Sep 26 18:15:59 2024
jb...@google.com <jb...@google.com> #8
This has been fixed internally and is available in the Activity 1.9.3
release.
na...@google.com <na...@google.com> #9
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.activity:activity-compose:1.9.3
pr...@google.com <pr...@google.com> #10
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.activity:activity-compose:1.10.0-alpha03
Description
Component used: Navigation Version used: 2.8.0 Devices/Android versions reproduced on: A13 Samsung Galaxy A51, A10 Huawei Mate 20 pro.
When quickly popping multiple destinations with nested graphs, the nav controller will throw in navigateUp()
Our graph structure:
Expected behavior: Please add safeguards to check for graph emptiness.