Fixed
Status Update
Comments
[Deleted User] <[Deleted User]> #2
Project: platform/frameworks/support
Branch: androidx-main
commit c46d3e79b2ea8b839358f0215b0a432ef8fad7a2
Author: Clara Fok <clarafok@google.com>
Date: Fri Nov 04 15:23:25 2022
Convert androidx.activity.Cancellable to kotlin
Test: ./gradlew activity:activity:cC
Bug: 257291701
Change-Id: I057f3e54811e7399e40083ef5e3915adc4fa425d
M activity/activity/src/main/java/androidx/activity/Cancellable.kt
https://android-review.googlesource.com/2288554
Branch: androidx-main
commit c46d3e79b2ea8b839358f0215b0a432ef8fad7a2
Author: Clara Fok <clarafok@google.com>
Date: Fri Nov 04 15:23:25 2022
Convert androidx.activity.Cancellable to kotlin
Test: ./gradlew activity:activity:cC
Bug: 257291701
Change-Id: I057f3e54811e7399e40083ef5e3915adc4fa425d
M activity/activity/src/main/java/androidx/activity/Cancellable.kt
vi...@google.com <vi...@google.com>
vi...@google.com <vi...@google.com>
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 7fd8a3206a49baefee8340f0839fcd4de7716788
Author: Clara Fok <clarafok@google.com>
Date: Fri Nov 04 15:13:23 2022
Rename androidx.activity.Cancellable from .java to .kt
Test: n/a
Bug:257291701
Change-Id: I7f2ff8ce79af41c6437fb9a0f1be90e8990495e8
M activity/activity/src/main/java/androidx/activity/Cancellable.kt
https://android-review.googlesource.com/2288553
Branch: androidx-main
commit 7fd8a3206a49baefee8340f0839fcd4de7716788
Author: Clara Fok <clarafok@google.com>
Date: Fri Nov 04 15:13:23 2022
Rename androidx.activity.Cancellable from .java to .kt
Test: n/a
Bug:257291701
Change-Id: I7f2ff8ce79af41c6437fb9a0f1be90e8990495e8
M activity/activity/src/main/java/androidx/activity/Cancellable.kt
Description
androidX version: androidx.appcompat:appcompat:1.1.0-alpha04
It's not easy to reproduce this bug. But I can show you guys the stack when crash occured:
#main(1)
ComponentActivity.java:288
Caused by:androidx.activity.ComponentActivity.onBackPressed
Can not perform this action after onSaveInstanceState
Fatal Exception:java.lang.IllegalStateException
androidx.activity.ComponentActivity.onBackPressed(ComponentActivity.java:288)
android.app.Activity.onBackPressed(Activity.java:2523)
android.app.FragmentManagerImpl.popBackStackImmediate(FragmentManagerImpl.java:498)
android.app.FragmentManagerImpl.checkStateLoss(FragmentManagerImpl.java:1337)
stack above is the crash point. Focus on the last line, the point where exception was thrown is at checkStateLoss. why this, I found the reason.
link:
Older versions will throw an exception from the framework {@code FragmentManager.popBackStackImmediate}, but the commit above remove these workaround code. you can review the change by the link above or open the picture in the attachment.
I know the code related in 1.1.0 stable version was changed and you guys refactor this already, but I still can not find the workaround code so you guys should check this problem with 1.1.0-alpha04 and newest code both.