Add logging for voice note recording events.

This commit is contained in:
Clark
2023-01-24 15:05:56 -05:00
committed by Greyson Parrelli
parent 6e5b4bbc15
commit 7745ae62ea
2 changed files with 5 additions and 1 deletions

View File

@@ -36,7 +36,10 @@ public class AudioRecorder {
public AudioRecorder(@NonNull Context context) {
this.context = context;
audioFocusManager = AudioRecorderFocusManager.create(context, focusChange -> stopRecording());
audioFocusManager = AudioRecorderFocusManager.create(context, focusChange -> {
Log.i(TAG, "Audio focus change " + focusChange + " stopping recording");
stopRecording();
});
}
public @NonNull Single<VoiceNoteDraft> startRecording() {

View File

@@ -439,6 +439,7 @@ public class InputPanel extends LinearLayout
@Override
public void onRecordCanceled(boolean byUser) {
Log.d(TAG, "Recording canceled byUser=" + byUser);
onRecordHideEvent();
if (listener != null) listener.onRecorderCanceled(byUser);
}