Skip to content

Fix crash when getting the system ringtone for ringing calls #3131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

jmartinesp
Copy link
Member

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Wrap the call to get the system ringtone in a runCatching so we can recover if it fails. The app will use the default notification sound in that case, we should add a fallback one in the future.

Motivation and context

Fixes #3121.

Tests

This seems to depend on your OS/vendor version, so there's no easy way to test it.

Checklist

  • Changes have been tested on an Android device or Android emulator with API 23
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • Pull request includes a sign off
  • You've made a self review of your PR

@jmartinesp jmartinesp added the PR-Bugfix For bug fix label Jul 2, 2024
@jmartinesp jmartinesp requested a review from a team as a code owner July 2, 2024 15:39
@jmartinesp jmartinesp requested review from bmarty and removed request for a team July 2, 2024 15:39
Copy link

sonarqubecloud bot commented Jul 2, 2024

Copy link
Contributor

github-actions bot commented Jul 2, 2024

📱 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/eFBXeZ

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this

Copy link

codecov bot commented Jul 2, 2024

Codecov Report

Attention: Patch coverage is 14.28571% with 12 lines in your changes missing coverage. Please review.

Project coverage is 75.97%. Comparing base (37eaa5e) to head (8db86e1).
Report is 9 commits behind head on develop.

Files Patch % Lines
...mpl/notifications/channels/NotificationChannels.kt 10.00% 7 Missing and 2 partials ⚠️
...pl/notifications/RingingCallNotificationCreator.kt 25.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3131      +/-   ##
===========================================
- Coverage    76.00%   75.97%   -0.03%     
===========================================
  Files         1636     1636              
  Lines        38591    38595       +4     
  Branches      7458     7462       +4     
===========================================
- Hits         29330    29322       -8     
- Misses        5373     5381       +8     
- Partials      3888     3892       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jmartinesp jmartinesp added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jul 2, 2024
@jmartinesp jmartinesp enabled auto-merge (squash) July 2, 2024 15:53
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jul 2, 2024
@jmartinesp jmartinesp merged commit 05df1f2 into develop Jul 2, 2024
32 of 34 checks passed
@jmartinesp jmartinesp deleted the fix/jme/3121-crash-when-creating-notification-channels-caused-by-setting-ringtone branch July 2, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Bugfix For bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Catasthrophic error, I can't even report error inside the app because of the immediate crashing.
2 participants