Fixed
Status Update
Comments
ka...@gmail.com <ka...@gmail.com> #2
Seems to be a DNS problem with systems that have 'obtain DNS server address automatically'. Changed my system to a manual setting and the browser etc now work. SDK 2.2 didn't seem to mind the auto setting though.
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #3
Could you please describe how/where you changed your system to a manual setting?
jb...@google.com <jb...@google.com> #4
Based on its date, this issue was originally reported before Android 2.3. Because of the many changes that existed in Android 4.x compared to previous versions, it's very likely that this issue doesn't exist in recent versions of Android like 4.2.2 or newer. Because of the high likelihood that this issue is obsolete, it is getting closed automatically by a script, without a human looking at it in detail. If the issue still exists on a Nexus 4 or Nexus 7 running Android 4.2.2 and is not related to Google applications, please open a new report accordingly.
Description
Component used: Fragment Version used: 1.3.3 Devices/Android versions reproduced on: Emulator Android 10
Currently there is a crash trying to get parcelable from result after process restoration.
Setup:
MainActivity
,FirstFragment
andSecondFragment
.FirstFragment
toSecondFragment
.FirstFragment
callsgetParentFragmentManager().setFragmentResultListener()
inonViewCreated()
and listens for result.getParentFragmentManager().setResult()
on submit button click. Submit button does only that and doesn't navigate back toFirstFragment
.Bundle
viaputParcelable()
. We send backExampleClass
which implementsParcelable
using@kotlinx.parcelize.Parcelize
.Steps to reproduce:
SecondFragment
.FirstFragment
receives result inFragmentResultListener#onFragmentResult
and callsresult.getParcelable()
.android.os.BadParcelableException
There two ways to avoid crash:
result.setClassLoader(context.classLoader)
beforeresult.getParcelable()
.Is this something that should be fixed on Fragment or platform side?
What is the preferred workaround for the app developers in the meantime?