Infeasible
Status Update
Comments
vi...@google.com <vi...@google.com>
vi...@google.com <vi...@google.com> #2
Thank you for reporting this issue. For us to further investigate this issue, please provide the following additional information:
Device used -- Device Make, Model, Android OS Version
Which device did you use to reproduce this issue?
Please provide sample project or apk to reproduce the issue. Also mention the steps to be followed for reproducing the issue with the given sample project or apk.
Expected output
What is the expected output?
Current output
What is the current output?
Android bug report (to be captured after reproducing the issue)
For steps to capture a bug report, please refer:https://developer.android.com/studio/debug/bug-report#bugreportdevice
Alternate method
Navigate to “Developer options”, ensure “USB debugging” is enabled, then enable “Bug report shortcut”. Capture bug report by holding the power button and selecting the “Take bug report” option.
Screen Record of the Issue
Please capture screen record or video of the issue using following steps:
adb shell screenrecord /sdcard/video.mp4
Subsequently use following command to pull the recorded file:
adb pull /sdcard/video.mp4
Attach the file to this issue.
Note: Please upload the bug report and screenshot to google drive and share the folder to android-bugreport@google.com, then share the link here.
Device used -- Device Make, Model, Android OS Version
Which device did you use to reproduce this issue?
Please provide sample project or apk to reproduce the issue. Also mention the steps to be followed for reproducing the issue with the given sample project or apk.
Expected output
What is the expected output?
Current output
What is the current output?
Android bug report (to be captured after reproducing the issue)
For steps to capture a bug report, please refer:
Alternate method
Navigate to “Developer options”, ensure “USB debugging” is enabled, then enable “Bug report shortcut”. Capture bug report by holding the power button and selecting the “Take bug report” option.
Screen Record of the Issue
Please capture screen record or video of the issue using following steps:
adb shell screenrecord /sdcard/video.mp4
Subsequently use following command to pull the recorded file:
adb pull /sdcard/video.mp4
Attach the file to this issue.
Note: Please upload the bug report and screenshot to google drive and share the folder to android-bugreport@google.com, then share the link here.
vi...@google.com <vi...@google.com> #3
Please provide the information as requested in comment #2 , for us to further investigate this issue.
pp...@gmail.com <pp...@gmail.com> #4
Hi, sorry for the delay. The stack I've posted merely came from the log on the Firebase, and unfortunately we also can't reproduce it. So I can't give the specific steps to reproduce the bug. But I can say it only occur on Android 7+.
We did try to injector the possible solution into the library source and seemed to solve it successfully, which only take within 2 steps on our side:
- Prepare the function for reseting the
mNextRc
in the project. - Use Transform API to inject code at the end of
onRestoreInstanceState()
to call the function .
The function is:
fun afterOnRestoreInstanceState(rcSet: Set<Int>, nextRc: AtomicInteger) {
// 0xffff is the default value of mNextRc
val rc = (rcSet.max() ?: 0xffff) + 1
nextRc.set(rc)
}
Hope this would help, Thanks.
vi...@google.com <vi...@google.com> #5
As the issue seems to have been solved. Can we close this issue?
an...@gmail.com <an...@gmail.com> #6
Yeah, sure :). Thanks for your help
vi...@google.com <vi...@google.com> #7
Closing this issue as per comment #6 .
Description
Problem description
There's the ClassCastException on Firebase from users after upgrading
androidx.activity
to1.2.0-alpha05
:After checking the source code, that might because of the change:
The default start number of the request code is changed to
0xffff
, but inonRestoreInstanceState
the value will be reset to the key map size:It's used to be correct since the the change, the default request code start from 0.
Possible solution
Rewrite to usehttps://android.googlesource.com/platform/frameworks/support/+/refs/heads/androidx-master-dev/activity/activity/src/main/java/androidx/activity/result/ActivityResultRegistry.java#263
0xffff+numKeys
as the start number of the request code on restoring: