element-hq / element-x-android

Android Matrix messenger application using the Matrix Rust Sdk and Jetpack Compose
GNU Affero General Public License v3.0
1k stars 136 forks source link

Fix various crashes #3533

Closed bmarty closed 3 days ago

bmarty commented 4 days ago

Content

Fix various crashes reported by Sentry. Also cleanup the code at a few location.

To be reviewed commit per commit.

Motivation and context

More stable application.

Screenshots / GIFs

Tests

Not always easy to repro the crashes. For the PDF crash, changing the extension of a Gif file (for instance), then send it to a room and try to open it made the application crash. It's no fixed and display an inlined error.

Tested devices

Checklist

github-actions[bot] commented 4 days ago

:iphone: Scan the QR code below to install the build (arm64 only) for this PR. QR code If you can't scan the QR code you can install the build via this link: https://i.diawi.com/VhvJpv

codecov[bot] commented 4 days ago

Codecov Report

Attention: Patch coverage is 33.96226% with 35 lines in your changes missing coverage. Please review.

Project coverage is 82.63%. Comparing base (41126c7) to head (53fc2f3). Report is 17 commits behind head on develop.

Files with missing lines Patch % Lines
...es/mediaviewer/api/local/pdf/PdfRendererManager.kt 0.00% 13 Missing :warning:
...d/libraries/mediaviewer/api/local/pdf/PdfViewer.kt 65.38% 7 Missing and 2 partials :warning:
...droid/libraries/androidutils/system/SystemUtils.kt 0.00% 6 Missing :warning:
...droid/libraries/mediapickers/api/PickerLauncher.kt 0.00% 4 Missing :warning:
...droid/features/call/impl/ui/ElementCallActivity.kt 0.00% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #3533 +/- ## =========================================== - Coverage 82.68% 82.63% -0.06% =========================================== Files 1732 1732 Lines 40904 40940 +36 Branches 4973 4980 +7 =========================================== + Hits 33823 33829 +6 - Misses 5316 5343 +27 - Partials 1765 1768 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sonarcloud[bot] commented 4 days ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud