Skip to content

Commit

Permalink
Add logging for voice note recording events.
Browse files Browse the repository at this point in the history
  • Loading branch information
clark-signal authored and greyson-signal committed Jan 25, 2023
1 parent 6e5b4bb commit 7745ae6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ public void onRecordMoved(float offsetX, float absoluteX) {

@Override
public void onRecordCanceled(boolean byUser) {
Log.d(TAG, "Recording canceled byUser=" + byUser);
onRecordHideEvent();
if (listener != null) listener.onRecorderCanceled(byUser);
}
Expand Down

0 comments on commit 7745ae6

Please sign in to comment.