Skip to content
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

fix: audio converting error on lower APIs [WPB-11242] #3467

Merged
merged 5 commits into from
Sep 25, 2024

Conversation

saleniuk
Copy link
Contributor

@saleniuk saleniuk commented Sep 25, 2024

BugWPB-11242 [Android] Crash on Android 9 when sending recorded audio


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

On Android 9, the app is crashing when sending a recorded audio.

Causes (Optional)

Crash due to out of order frames.

Solutions

Change the way presentationTimeUs is calculated, it looks like starting from some value different than 0 is error-prone, so make sure that it starts with 0. Returning success to not send faulty file if something wrong happened during the conversion.

Testing

How to Test

It was crashing on device with Android 9 when clicking "send" after user finished recording audio message.


PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@saleniuk saleniuk requested review from Garzas, a team, borichellow, MohamadJaara, vitorhugods and ohassine and removed request for a team September 25, 2024 10:49
Copy link

sonarcloud bot commented Sep 25, 2024

@codecov-commenter
Copy link

codecov-commenter commented Sep 25, 2024

Codecov Report

Attention: Patch coverage is 0% with 28 lines in your changes missing coverage. Please review.

Project coverage is 44.70%. Comparing base (7c0cc88) to head (7c8da69).
Report is 199 commits behind head on release/candidate.

Files with missing lines Patch % Lines
.../messagecomposer/recordaudio/AudioMediaRecorder.kt 0.00% 28 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##           release/candidate    #3467      +/-   ##
=====================================================
- Coverage              44.73%   44.70%   -0.04%     
=====================================================
  Files                    456      456              
  Lines                  15454    15466      +12     
  Branches                2584     2586       +2     
=====================================================
  Hits                    6914     6914              
- Misses                  7810     7822      +12     
  Partials                 730      730              
Files with missing lines Coverage Δ
.../messagecomposer/recordaudio/AudioMediaRecorder.kt 0.00% <0.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7c0cc88...7c8da69. Read the comment docs.

@saleniuk saleniuk added this pull request to the merge queue Sep 25, 2024
Copy link
Contributor

Built wire-android-staging-compat-pr-3467.apk is available for download

Merged via the queue into release/candidate with commit 23126ee Sep 25, 2024
12 of 13 checks passed
@saleniuk saleniuk deleted the fix/record-audio-storage-error branch September 25, 2024 11:35
github-actions bot pushed a commit that referenced this pull request Sep 25, 2024
@echoes-hq echoes-hq bot added the echoes: unplanned Any work item that isn’t part of the product or technical roadmap. label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes: unplanned Any work item that isn’t part of the product or technical roadmap. size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants