From 316fc9fe9d73d67f2151d3784059932c5512cc3c Mon Sep 17 00:00:00 2001 From: Ashish Yadav <48384865+criticalAY@users.noreply.github.com> Date: Sat, 12 Oct 2024 13:33:34 +0530 Subject: [PATCH] fix: audio rec init twice --- .../java/com/ichi2/anki/multimedia/AudioRecordingFragment.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AnkiDroid/src/main/java/com/ichi2/anki/multimedia/AudioRecordingFragment.kt b/AnkiDroid/src/main/java/com/ichi2/anki/multimedia/AudioRecordingFragment.kt index 41c3c7510aa5..e8dbe0e817ef 100644 --- a/AnkiDroid/src/main/java/com/ichi2/anki/multimedia/AudioRecordingFragment.kt +++ b/AnkiDroid/src/main/java/com/ichi2/anki/multimedia/AudioRecordingFragment.kt @@ -114,6 +114,8 @@ class AudioRecordingFragment : MultimediaFragment(R.layout.fragment_audio_record @NeedsTest("AudioRecordingController is correctly initialized") private fun initializeAudioRecorder() { + if (audioRecordingController != null) return + Timber.d("Initialising AudioRecordingController") try { audioRecordingController = AudioRecordingController( context = requireActivity(),