Skip to content

Commit

Permalink
Unregister callback before stopping recording
Browse files Browse the repository at this point in the history
  • Loading branch information
avazirna committed May 6, 2024
1 parent 246f153 commit 93e8e8f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/src/org/commcare/views/widgets/RecordingFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -327,15 +327,15 @@ private boolean isPauseSupported() {
}

private void saveRecording() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
unregisterAudioRecordingConfigurationChangeCallback();
}
if (inPausedState) {
stopRecording();
}
if (listener != null) {
listener.onRecordingCompletion(fileName);
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
unregisterAudioRecordingConfigurationChangeCallback();
}
dismiss();
}

Expand Down

0 comments on commit 93e8e8f

Please sign in to comment.