Discard voice note recording on error.

This commit is contained in:
Nicholas Tinsley
2023-06-22 13:32:27 -04:00
parent bc1fbd9b6c
commit 88f50da4fb
2 changed files with 3 additions and 2 deletions

View File

@@ -3730,6 +3730,7 @@ public class ConversationParentFragment extends Fragment
public void onError(Throwable t) {
Toast.makeText(requireContext(), R.string.ConversationActivity_unable_to_record_audio, Toast.LENGTH_LONG).show();
Log.e(TAG, "Error in RecordingSession.", t);
recordingSession.discardRecording();
recordingSession.dispose();
recordingSession = null;
}