Closed zwarm closed 4 weeks ago
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code
App Name | WordPress | |
Flavor | Jalapeno | |
Build Type | Debug | |
Version | pr20650-1cecdbc | |
Commit | 1cecdbcef88f8eeaffb8d9d78e9aa7f4dec834a4 | |
Direct Download | wordpress-prototype-build-pr20650-1cecdbc.apk |
App Name | Jetpack | |
Flavor | Jalapeno | |
Build Type | Debug | |
Version | pr20650-1cecdbc | |
Commit | 1cecdbcef88f8eeaffb8d9d78e9aa7f4dec834a4 | |
Direct Download | jetpack-prototype-build-pr20650-1cecdbc.apk |
Fixes #20643
This PR addresses an issue where the app may encounter an
IllegalStateException
when attempting to set a fragment result after its lifecycle has reached the STOPPED state or beyond. To prevent this potential issue the following changes have been made:Changed the lifecycle state in the observeCameraPermissionState from Lifecycle.State.CREATED to Lifecycle.State.STARTED. This ensures that the code block is executed only when the fragment is at least in the STARTED state, eliminating potential IllegalStateExceptions.
Introduced a check for isAdded in the setFragmentResultAndPopStack method. The isAdded property returns true if the fragment is currently added to its activity, providing a way to ensure that the fragment is still attached to its activity before executing UI-related code.
I was unable to recreate this crash, but according to the logs it happens when the app is backgrounded while the scanner is opened for QR Code login.
To Test:
Pre-req
[JP] Scan Login Code Step.1:
Step.2:
(STOP) Step.3:
[JP] Super Fast Media Upload
Regression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on) Manul testing
What automated tests I added (or what prevented me from doing so) N/A
PR Submission Checklist:
RELEASE-NOTES.txt
if necessary.Testing Checklist (strike-out the not-applying and unnecessary ones): N/A