Defensive check

This commit is contained in:
fanchao 2024-05-21 14:55:10 +10:00
parent fbc82d7831
commit 27fcc66e7f

View File

@ -45,7 +45,8 @@ public class AudioRecorder {
Log.i(TAG, "Running startRecording() + " + Thread.currentThread().getId()); Log.i(TAG, "Running startRecording() + " + Thread.currentThread().getId());
try { try {
if (audioCodec != null) { if (audioCodec != null) {
throw new AssertionError("We can only record once at a time."); Log.e(TAG, "We can only record once at a time.");
return;
} }
ParcelFileDescriptor fds[] = ParcelFileDescriptor.createPipe(); ParcelFileDescriptor fds[] = ParcelFileDescriptor.createPipe();