Fixed
Status Update
Comments
jb...@google.com <jb...@google.com> #2
Could you please provide a sample project that reproduces your issue?
You are right about restoring the request codes, but under normal usage of the API, that should not cause this failure.
jb...@google.com <jb...@google.com> #3
Unfortunately I'm unable to reproduce the issue neither in a sample nor in the real project.
These crashes are received from the users of production app. I'll try to add more logs for better understanding what users do before the crash.
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit b2a3eca325760e3686411e619048e2bc52befda8
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Sep 16 16:55:46 2020
Ensure request code start is consistent after restore
When the ActivityResultRegistry is recreated due to either config change
or process death, the next request code is started at the number of
current request codes without including the initial offset.
We should make sure to include the initial offset on restore to remain
consistent.
Relnote: "When restoring the ActivityResultRegistry, the request codes
are now properly started from their previous value instead of the value
of the number of existing request codes."
Test: all ActivityResultRegistryTest pass
Bug: 168374000
Change-Id: I463711fe19233877f1b534e4a7a3325fcfd8f983
M activity/activity/src/main/java/androidx/activity/result/ActivityResultRegistry.java
https://android-review.googlesource.com/1428862
Branch: androidx-master-dev
commit b2a3eca325760e3686411e619048e2bc52befda8
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Sep 16 16:55:46 2020
Ensure request code start is consistent after restore
When the ActivityResultRegistry is recreated due to either config change
or process death, the next request code is started at the number of
current request codes without including the initial offset.
We should make sure to include the initial offset on restore to remain
consistent.
Relnote: "When restoring the ActivityResultRegistry, the request codes
are now properly started from their previous value instead of the value
of the number of existing request codes."
Test: all ActivityResultRegistryTest pass
Bug: 168374000
Change-Id: I463711fe19233877f1b534e4a7a3325fcfd8f983
M activity/activity/src/main/java/androidx/activity/result/ActivityResultRegistry.java
jb...@google.com <jb...@google.com> #5
This change ensures the request code matches, if your issue is not solved and you find a way to reproduce it, please file another bug.
na...@google.com <na...@google.com> #7
This bug was linked in a change in the following release(s):
androidx.fragment:fragment:1.5.3
na...@google.com <na...@google.com> #8
This bug was linked in a change in the following release(s):
androidx.fragment:fragment:1.6.0-alpha03
Description
Version used: 1.5.2
Devices/Android versions reproduced on: Android 11 phone, but actually I believe it does not matter
If this is a bug in the library, we would appreciate if you could attach:
see README in the project for details including how to reproduce the issue.
This behavior appeared in 1.5.2 library version. Version 1.4.* do not have such problem.