-
Notifications
You must be signed in to change notification settings - Fork 26
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: ANR when recording an audio (WPB-9528) #3066
Conversation
Test Results928 tests 928 ✅ 10m 8s ⏱️ Results for commit 3d797ca. |
APKs built during tests are available here. Scroll down to Artifacts! |
Build 5126 succeeded. The build produced the following APK's: |
audioMediaRecorder.stop() | ||
} | ||
audioMediaRecorder.release() | ||
viewModelScope.launch(dispatchers.default()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we keep the viewModelScope.launch
as it is and switch dispatchers for generateAudioFileWithEffects here
Line 39 in 7b1afb5
val audioEffectsResult = AudioEffect(context) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not only for generateAudioFileWithEffects
, we need also to run getPlayableAudioFile()
, and getAudioLengthInMs()
and stop()
in worker thread
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then we can change of them individual, updating the state from a background thread can cause some issues.
Happy to talk about this in a 1:1 or in the next collective
Quality Gate passedIssues Measures |
Co-authored-by: Yamil Medina <[email protected]>
APKs built during tests are available here. Scroll down to Artifacts! |
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
Issues
ANR happens when user try to record an audio
Causes (Optional)
Some oprations related to recording audio is are done on Main thread
Solutions
Change the audio recording to be done on worker thread instead
Needs releases with:
Testing
Test Coverage (Optional)
How to Test
Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.
Notes (Optional)
Specify here any other facts that you think are important for this issue.
Attachments (Optional)
Attachments like images, videos, etc. (drag and drop in the text box)
PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764
.