Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
This appears to be coming from ActivityResultRegistry
, which is part of the Activity library (that Fragment just happens to use). Moving over to that component.
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 17da1e5bcb62fa2662fefc8df65b73677647454c
Author: Jeremy Woods <jbwoods@google.com>
Date: Tue Mar 16 18:39:47 2021
Ensure ActivityResult works correctly with custom parcelables
When using launching an activity for result, if the app leaves its process
and uses custom parcelables in the intent returned from the
ActivityResultContract, there will be a ClassNotFoundException.
We need to check the returned intent for extras and if there are any
present we must call setExtrasClassLoader() with the ClassLoader from
the ComponentActivity.
RelNote: "ComponentActivity now properly launches
ActivityResultContracts that create intents with parcelable
extras even if the process is left"
Test: ComponentActivityResultTest
Bug: 182906230
Change-Id: Ieff0578bfd0875f22d42b19040ee24999bb23c89
M activity/activity/src/androidTest/AndroidManifest.xml
M activity/activity/src/androidTest/java/androidx/activity/ComponentActivityResultTest.kt
M activity/activity/src/main/java/androidx/activity/ComponentActivity.java
https://android-review.googlesource.com/1640956
Branch: androidx-main
commit 17da1e5bcb62fa2662fefc8df65b73677647454c
Author: Jeremy Woods <jbwoods@google.com>
Date: Tue Mar 16 18:39:47 2021
Ensure ActivityResult works correctly with custom parcelables
When using launching an activity for result, if the app leaves its process
and uses custom parcelables in the intent returned from the
ActivityResultContract, there will be a ClassNotFoundException.
We need to check the returned intent for extras and if there are any
present we must call setExtrasClassLoader() with the ClassLoader from
the ComponentActivity.
RelNote: "ComponentActivity now properly launches
ActivityResultContracts that create intents with parcelable
extras even if the process is left"
Test: ComponentActivityResultTest
Bug: 182906230
Change-Id: Ieff0578bfd0875f22d42b19040ee24999bb23c89
M activity/activity/src/androidTest/AndroidManifest.xml
M activity/activity/src/androidTest/java/androidx/activity/ComponentActivityResultTest.kt
M activity/activity/src/main/java/androidx/activity/ComponentActivity.java
jb...@google.com <jb...@google.com> #4
This has been addressed internally and will be available in both the Activity 1.2.2
and 1.3.0-alpha05
releases.
mr...@gmail.com <mr...@gmail.com> #5
Great news! Thanks for fixing the issue so fast :)
Description
Version used: 1.3.0, 1.3.1
Devices/Android versions reproduced on: API 21, 28, 30
If this is a bug in the library, we would appreciate if you could attach:
- Sample project to trigger the issue.
- A screenrecord or screenshots showing the issue (if UI related).
GitHub repo: